-
Notifications
You must be signed in to change notification settings - Fork 299
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
Support field selection #174
Conversation
@gonzodepedro Thanks for taking a look. I'd like to finish this PR, I expect to have that complete by early next week |
I have added support for field selection on ROS 2 messages, and a description of field selections in the documentation. I have also tested this on my laptop with success, with a modification of the demo publisher that publishes messages of type Please let me know if anything is missing |
LGTM |
If the PR is ready to be reviewed please replace the "in progress" label with the "in review" label (which will move the ticket into the review column on waffle.io). |
Gist for vsc-export: https://gist.github.com/juanrh/32e5809a70980e989abd9935bf8733f6 |
@juanrh the nightly is fine but not this build so there is something we need to fix there - https://ci.ros2.org/view/packaging/job/packaging_linux/1414/ Can you investigate? |
@thomas-moulard - run the following CI job:
|
@juanrh when you get the chance, could you please rebase this change and request a CI re-run? Thanks! |
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.
Currently this conflicts when rebasing to master.
is a sequence of field names separated by `.`, that specifies the path to a field starting from a message. | ||
For example starting from the message `rosgraph_msgs/Log` the field selection `header.stamp` specifies a | ||
path that goes through the field `header` of `rosgraph_msgs/Log`, that has a message of type `std_msgs/Header`, | ||
and ending up in the field `stamp` of `std_msgs/Header`, that has type `time`. |
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.
Perhaps it would be good to state that the mapping works for ROS1 and ROS2 messages.
Thanks @gonzodepedro. I'm coming out of vacation but I should be able to rebase by the end of this week |
Feature freeze for Dashing is scheduled for this Thursday (see https://index.ros.org/doc/ros2/Releases/Release-Dashing-Diademata/#timeline-before-the-release). |
@juanrh I think I'll take care of the rebase, so we can get this into Dashing feature freeze. |
ok @gonzodepedro thanks for taking care of that. Please let me know if I can help with anything |
Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com>
Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com>
Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com>
Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com>
Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>
5efb222
to
32911db
Compare
Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>
Please run a CI build for this change and post the badge here. Have you tried this patch together with ros2/rcl_interfaces#67 and can confirm that bridging the log message works with the not-FastRTPS RMW impl.? |
Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>
I've tried. I confirm it works with the not-FastRTPS RMW imp. And with FastRTPS RMW imp using the workaround for /ros2/rcl_interfaces#61 _log_disable_rosout:=true |
* Add field selection for ROS 1 fields to mappings Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com> * Add field selection for ROS 2 fields to mappings Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com> * Add documentation for field selection Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com> * Fix linting issues with flake8 and pep257 Signed-off-by: Juan Rodriguez Hortala <hortala@amazon.com> * rebase consolidation Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar> * Linter and review comments Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar> * Use isinstance instead of type() Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar> Signed-off-by: Dhananjay Sathe <dhananjay.sathe@rapyuta-robotics.com>
Signed-off-by: Juan Rodriguez Hortala hortala@amazon.com
This change extends the mapping file format to supported selecting sub-fields for the ROS 1 part of the entries of the
fields_1_to_2
section. Before the change only field names can be used, after the change the user can specify a.
separated list of fields, corresponding to a sequence of field selection.For example that allows using
header.stamp: 'stamp'
in the mapping fromrosgraph_msgs.Log
torcl_interfaces.Log
, which would help fixing #159 by adding a new mapping file for rcl_interfacesThis is a work in progress pull request, this change hasn't been fully tested. Also, this PR should be extended to support field selection for ROS 2 fields too.