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

Forward Init_Trajectory_Status error message to queue_traj_point #341

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimmy-mcelwain
Copy link
Collaborator

#336

All FAILURE error codes/messages from Ros_MotionControl_InitPointQueue (and further Ros_MotionControl_Init) previously got squashed into success/failure. This commit maintains the error meaning

All FAILURE error codes/messages from Ros_MotionControl_InitPointQueue (and further Ros_MotionControl_Init) previously got squashed into success/failure. This commit maintains the error meaning
@jimmy-mcelwain jimmy-mcelwain marked this pull request as draft December 9, 2024 15:38
@jimmy-mcelwain
Copy link
Collaborator Author

I am going to make changes to this for sure but I wanted feedback. I did a pretty straightforward forwarding of errors here. I think that it works fine (in my limited testing) and it's an improvement over what it was before, but there are other changes that should be made to improve clarity and durability.

The other changes that I think should happen are:
1.) At the very least, if we go with the forwarding approach I took here, in motoros2_interfaces, QueueResultEnum.msg uses UINT8 as the value and InitTrajEnum.msg uses UINT16 as the value. Those should be the same.
2.) This is more of an organization complaint. But I don't really like that sending a /follow_joint_trajectory goal (indirectly) returns an InitTrajEnum value that gets reported without modification. However, submitting a point using queue_traj_point returns either a QueueResultEnum value or an InitTrajEnum value which gets either squashed (current state of main) or forwarded (behavior in this PR). The fact that queue_traj_point can send a message that is defined in a different msg file for a different action seems messy. Especially since the messages reference "trajectory" and /start_traj_mode. I don't know what the solution would be (duplicating the relevant codes between the 2 messages, having both queue_traj_point and follow_joint_trajectory share the same msg file, or having both messages inherit some of the same constants (not sure how this would be implemented)). It should be okay to keep it the same, it just seems a bit messy/hard to follow.

@ted-miller
Copy link
Collaborator

At the very least, if we go with the forwarding approach I took here, in motoros2_interfaces, QueueResultEnum.msg uses UINT8 as the value and InitTrajEnum.msg uses UINT16 as the value. Those should be the same.

Agreed. My only concern is breaking compatibility of messages. But I'm not sure that can be helped.

This is more of an organization complaint. But I don't really like that sending a /follow_joint_trajectory goal (indirectly) returns an InitTrajEnum value that gets reported without modification. However, submitting a point using queue_traj_point returns either a QueueResultEnum value or an InitTrajEnum value

Personally, I'm ok with this. Ultimately, both the service and the action are initializing a trajectory. It's just a matter of "when" the points get submitted.

To me, I don't mind it. But if you have some suggestion of how to reorganize, we can take a look. Maybe some superset message for "motion init result"?

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.

2 participants