-
Notifications
You must be signed in to change notification settings - Fork 147
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 option to change material color from ROS. #486
Conversation
This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
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.
can you add a test?
Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
Yes, I was planning to wait and make sure this change was desired in upstream before spending any extra time to add a test. |
@ahcorde Test added. |
Test for the MaterialColor message ROS<->GZ. Signed-off-by: Benjamin Perseghetti <[email protected]>
401f536
to
6c708b0
Compare
Signed-off-by: Benjamin Perseghetti <[email protected]>
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.
you included some changes related with renaming ign
to gz
. Do you mind to remove them?
So that readme is in the ros_gz_bridge instead of the ros_ign_bridge, should it not be changed to match the naming? |
Signed-off-by: Benjamin Perseghetti <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
I think we should stick with |
But to be clear this is not the main README but this is the one inside ros_gz_bridge. The one inside ros_ign_bridge should just say it's a shim on the other and have ign listed in it, right? I guess I should just swap them. |
Signed-off-by: Benjamin Perseghetti <[email protected]>
https://github.com/gazebosim/ros_gz/tree/humble/ros_ign_bridge does say it's a shim |
Well I did also just change that so you know it's a shim but it has different interface and that gives you the interface of it. |
Signed-off-by: Benjamin Perseghetti <[email protected]>
This change allows for a simpler mapping from `MaterialColor` msg in gz to the much more cumbersome Visual msg. By doing this and adding a topic listener it allows users to rapidly change the colors of a entities visual material color components, including from the [ROS side using the gz bridge](gazebosim/ros_gz#486). This is especially useful for simulating status lighting. --------- Signed-off-by: Benjamin Perseghetti <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
@osrf-jenkins run tests please |
Signed-off-by: Benjamin Perseghetti <[email protected]>
This PR is targeting |
Alternatively, you can do something like ros_gz/ros_gz_bridge/include/ros_gz_bridge/ros_gz_bridge.hpp Lines 26 to 38 in 84d5d27
|
Co-authored-by: Addisu Z. Taddese <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
7c6b72d
to
e27a19c
Compare
Signed-off-by: Addisu Z. Taddese <[email protected]>
Suggestions for gazebosim#486
Co-authored-by: Addisu Z. Taddese <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
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.
linters
"ros_gz_bridge" "--output-file" "/github/home/ws/build/ros_gz_bridge/ament_flake8/flake8.txt" "--command" "/opt/ros/rolling/bin/ament_flake8" "--xunit-file" "/github/home/ws/build/ros_gz_bridge/test_results/ros_gz_bridge/flake8.xunit.xml"
2024-02-01T03:46:02.0622501Z 10: Test timeout computed to be: 60
2024-02-01T03:46:02.1111404Z 10: -- run_test.py: invoking following command in '/github/home/ws/src/ros_gz/ros_gz_bridge':
2024-02-01T03:46:02.1112566Z 10: - /opt/ros/rolling/bin/ament_flake8 --xunit-file /github/home/ws/build/ros_gz_bridge/test_results/ros_gz_bridge/flake8.xunit.xml
2024-02-01T03:46:02.4909897Z 10: from ros_gz_bridge.mappings import MAPPINGS, MAPPINGS_8_4_0, MAPPINGS_10_1_0
2024-02-01T03:46:02.4911413Z 10: ^
2024-02-01T03:46:02.4913079Z 10: 1 I101 Imported names are in the wrong order. Should be MAPPINGS, MAPPINGS_10_1_0, MAPPINGS_8_4_0
2024-02-01T03:46:02.4914637Z 10:
2024-02-01T03:46:02.4916618Z 10: ./ros_gz_bridge/__init__.py:19:1: I101 Imported names are in the wrong order. Should be MAPPINGS, MAPPINGS_10_1_0, MAPPINGS_8_4_0
2024-02-01T03:46:02.4918587Z 10:
2024-02-01T03:46:02.4919517Z 10:
2024-02-01T03:46:02.4921177Z 10: 5 files checked
2024-02-01T03:46:02.4922615Z 10: 1 errors
2024-02-01T03:46:02.4924329Z 10:
2024-02-01T03:46:02.4926578Z 10: 'I'-type errors: 1
2024-02-01T03:46:02.4928273Z 10:
2024-02-01T03:46:02.4929977Z 10: Checked files:
Co-authored-by: Alejandro Hernández Cordero <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]> Signed-off-by: Benjamin Perseghetti <[email protected]>
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.
@azeey any other comment?
@bperseghetti could you please cherry-pick this into |
Yep, I can do it later today! |
friendly ping @bperseghetti do you have any plans to forward port these changes? |
Sorry, my bad, I let this one slip through the cracks on my side, will create the PRs after my meetings today. |
Forward port of gazebosim#486 * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Forward port of gazebosim#486 * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Forward port of gazebosim#486 * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Forward port of gazebosim#486. * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Randomly remembered to do this, sorry about the dealy, please see associated "forward feature ports": |
Forward port of #486 * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Forward port of #486. * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
Forward port of #486. * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]> (cherry picked from commit 78dc482)
Forward port of #486. * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]> (cherry picked from commit 78dc482)
Forward port of gazebosim#486. * Message and bridge for MaterialColor. This allows bridging MaterialColor from ROS to GZ and is important for allowing simulation users to create status lights. Signed-off-by: Benjamin Perseghetti <[email protected]>
🎉 New feature
Summary
Allows for setting a GZ entities visual material color from ROS. This is highly valuable for creating noticeable LED status lighting. And depends on associated gz-msgs.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.