-
Notifications
You must be signed in to change notification settings - Fork 406
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
Added a service to setup the active payload #50
Conversation
<< " set_payload(" << req.payload << ", [" << req.center_of_gravity.x << ", " << req.center_of_gravity.y | ||
<< ", " << req.center_of_gravity.z << "])" << std::endl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is relying on <<
to convert floats/doubles to string
locale -safe?
Could end up with multiple commas in the string, which would probably upset UR's parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not think about that. I would never have though about the stream operator using locales in the background.
In a quick example I could not get a stream into locale-like formatting without explicitly setting the locale of the stream. However, to make sure, we could set the string's locale explicitly to classic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to avoid another ros/urdfdom_headers#41.
If stream io doesn't suffer from this, all the better.
Is there anything holding this up that I can help with? We (Shadow robot) want this functionality as soon as possible, though we can run on a branch in the meantime. |
Any update on this PR? Thanks very much in advance |
The referenced PR has been merged into ros-industrial/ur_msgs. @fmauch: I'd appreciate it if you could test the service a bit before I release it into Melodic. |
Sure thing! |
Just tested with a
and verified with
|
It would be nice if we could add a check for success into the service. Currently, it succeeds, as soon as the script code got successfully sent to the socket. Unfortunately, this isn't very easy to do as far as I understand. To my knowledge, there is no interface to get information about the payload data in
It could be implemented together with #171, where we would receive a Another option would be of course to send payload data back through a custom socket, but then we would be highly dependent on our actual program script code. |
Update: Edit: until Melodic sees a sync, the main repositories will not provide |
I am not sure whether this is necessary, but this will make sure that decimal divider will be a dot.
This PR adds a service to setup the active payload through a ROS service.
This PR depends on ros-industrial/universal_robot#470 being accepted which is why this is a draft PR.