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

Fix ROS2FrameComponent::UpdateNamespaceConfiguration #771

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

zakmat
Copy link
Contributor

@zakmat zakmat commented Oct 10, 2024

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.

@zakmat zakmat requested review from a team as code owners October 10, 2024 21:44
@michalpelka
Copy link
Contributor

I think it should point to development, and could be added to the stabilization branch for point release.

@zakmat
Copy link
Contributor Author

zakmat commented Oct 11, 2024

I have added tests for all other namespace strategies

@jhanca-robotecai
Copy link
Contributor

I think it should point to development, and could be added to the stabilization branch for point release.

I agree. The only problem is that the development branch is outdated compared to stabilization/2409. This code does not exist in the development branch, hence your PR should wait for #773

Copy link
Contributor

@jhanca-robotecai jhanca-robotecai left a 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

@jhanca-robotecai jhanca-robotecai changed the base branch from main to development October 14, 2024 16:11
@jhanca-robotecai jhanca-robotecai requested review from a team as code owners October 14, 2024 16:11
@jhanca-robotecai
Copy link
Contributor

Switched the target to development, the branch will be rebased after #773 is merged

@byrcolin byrcolin added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Oct 15, 2024
Copy link
Contributor

@byrcolin byrcolin left a 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

@jhanca-robotecai jhanca-robotecai added sig/simulation Categorizes an issue or PR as relevant to SIG Simulation and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 20, 2024
@jhanca-robotecai
Copy link
Contributor

big commit, dont see anything wrong

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 stabilization/2409 branch.

@jhanca-robotecai jhanca-robotecai merged commit 5c8b208 into o3de:development Oct 29, 2024
2 checks passed
@jhanca-robotecai jhanca-robotecai deleted the mzak/fix_770 branch October 29, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/simulation Categorizes an issue or PR as relevant to SIG Simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants