-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix ROS2FrameComponent::UpdateNamespaceConfiguration #771
Conversation
I think it should point to development, and could be added to the stabilization branch for point release. |
I have added tests for all other namespace strategies |
I agree. The only problem is that the |
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.
The code works as expected: it allows to spawn multiple robots with different namespaces.
It works correct with ROS2FleetTemplate
:
jhanca@robo-pc-051 ~/devroot/projects/R2Fleet_dev/Examples
% ros2 topic list | grep scan
/robot1/scan
/robot2/scan
/robot3/scan
jhanca@robo-pc-051 ~/devroot/projects/R2Fleet_dev/Examples
% ros2 topic list | grep odom
/robot1/odom
/robot2/odom
/robot3/odom
Spawning works correctly outside of the script as well:
jhanca@robo-pc-051 ~/devroot/projects/R2Fleet_dev/Examples
% ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: proteus, robot_namespace: first }' ; ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: proteus, robot_namespace: second }'
requester: making request: gazebo_msgs.srv.SpawnEntity_Request(name='proteus', xml='', robot_namespace='first', initial_pose=geometry_msgs.msg.Pose(position=geometry_msgs.msg.Point(x=0.0, y=0.0, z=0.0), orientation=geometry_msgs.msg.Quaternion(x=0.0, y=0.0, z=0.0, w=1.0)), reference_frame='')
response:
gazebo_msgs.srv.SpawnEntity_Response(success=True, status_message='proteus_8')
requester: making request: gazebo_msgs.srv.SpawnEntity_Request(name='proteus', xml='', robot_namespace='second', initial_pose=geometry_msgs.msg.Pose(position=geometry_msgs.msg.Point(x=0.0, y=0.0, z=0.0), orientation=geometry_msgs.msg.Quaternion(x=0.0, y=0.0, z=0.0, w=1.0)), reference_frame='')
response:
gazebo_msgs.srv.SpawnEntity_Response(success=True, status_message='proteus_9')
jhanca@robo-pc-051 ~/devroot/projects/R2Fleet_dev/Examples
% ros2 topic list
/clock
/first/cmd_vel
/first/scan
/parameter_events
/rosout
/second/cmd_vel
/second/scan
/tf
/tf_static
Switched the target to |
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.
big commit, dont see anything wrong
Signed-off-by: Mateusz Żak <[email protected]>
Signed-off-by: Mateusz Żak <[email protected]>
Signed-off-by: Jan Hanca <[email protected]>
b233f83
to
ddbe596
Compare
I rebased the commit and force pushed to the branch of the author, the PR is now very compact. The code itself was also reviewed and pushed to the |
I'm not sure where this PR should be targeted since it is right after the release. Please adjust as necessary.
What does this PR do?
Solves #770.
How was this PR tested?
Added Unit Test. Also tested following the scenario from the issue.