Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message string to MoveItErrorCode msg #171

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

Abishalini
Copy link

When planning with MoveIt and MTC, we often assign the FAILURE error code. This is in an effort to add more description on why planning/execution failed.

Copy link

@sjahr sjahr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding an optional source string too?
E.g. like this:

// Name of the component that created the status
string source;

msg/MoveItErrorCodes.msg Outdated Show resolved Hide resolved
Copy link

@sjahr sjahr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe consider removing the error_* prefix to avoid code like this:

MoveItErrorCode error_code;
error.error_message = "Ahh";

msg/MoveItErrorCodes.msg Outdated Show resolved Hide resolved
msg/MoveItErrorCodes.msg Outdated Show resolved Hide resolved
Copy link

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is conflating a bunch of things.

It makes more sense to me to have a MoveItError message which contains the MoveItErrorCode code plus a string message?

@adlarkin adlarkin self-requested a review November 10, 2023 16:15
Abishalini and others added 2 commits November 10, 2023 09:19
Co-authored-by: Sebastian Jahr <sebastian.jahr@tuta.io>
Co-authored-by: Sebastian Jahr <sebastian.jahr@tuta.io>
@sjahr
Copy link

sjahr commented Nov 10, 2023

I think this is conflating a bunch of things.

It makes more sense to me to have a MoveItError message which contains the MoveItErrorCode code plus a string message?

We'd need to do a lot of integration work by introducing an additional message type for that. What I like about having it in this message is that the message + the source information is immediately everywhere available where this message is used and we don't need to break anything

@simonschmeisser
Copy link

Please consider extending the 'enum' where necessary as well. Strings are hard to translate and error prone to handle in logic/error mitigation

@sea-bass
Copy link

What I like about having it in this message is that the message + the source information is immediately everywhere available where this message is used and we don't need to break anything

If this error message will be used as the "human-readable" description of the enum, that's very good and let's go ahead.

@rhaschke
Copy link
Contributor

If this error message will be used as the "human-readable" description of the enum, that's very good and let's go ahead.

The message shouldn't serve as a description of the enum - this can be created statically and we already have a method to do so. Rather, the message should be used (if at all) to provide some more specific reason of the failure, e.g. why planning failed.

@sjahr sjahr merged commit 2cbb6fd into moveit:ros2 Nov 14, 2023
9 checks passed
@Abishalini Abishalini deleted the pr-add-error-string branch November 14, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants