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

Motoros2 issue 203 cycle switch mode #10

Merged

Conversation

yai-rosejo
Copy link
Contributor

Added in an enum for when the cycle mode isn't set to continuous.
Relates to issue 203

@ted-miller
Copy link
Collaborator

@yai-rosejo, when we were discussing, you mentioned you had an issue until you properly sourced these messages in your VM.

Was the issue that you forgot to source them entirely? Or was it that you were sourcing the old version of the messages?

As I think about this some more, I'm concerned about we enforce version compatibility.

@yai-rosejo
Copy link
Contributor Author

I had forgot to source them entirely in my VM. After following this ReadMe, I was fine. I was also worried about version compatibility but the display in my VM worked without any modifications to that readme.

user@ROS2:~/colcon_ws$ ros2 service call /start_traj_mode motoros2_interfaces/srv/StartTrajMode
waiting for service to become available...
requester: making request: motoros2_interfaces.srv.StartTrajMode_Request()


response:
motoros2_interfaces.srv.StartTrajMode_Response(result_code=motoros2_interfaces.msg.MotionReadyEnum(value=115), message='Continuous cycle mode not set. Please set the cycle mode to continuous')

@gavanderhoorn
Copy link
Collaborator

gavanderhoorn commented Feb 19, 2024

The reason this works is because we're only using this message as a file to define some constants.

If we'd somehow embedded the .msg itself in the service response we'd have to version things.

But that's not what we're going, we're basically just setting an int to a value from the enum.

(this was why I set up this structure like this)

Copy link
Collaborator

@ted-miller ted-miller left a comment

Choose a reason for hiding this comment

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

This is required for Yaskawa-Global/motoros2#212

@ted-miller ted-miller merged commit 95e21f7 into Yaskawa-Global:main Feb 23, 2024
1 check passed
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.

3 participants