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

[ROS2] Using a robot_namespace in a spawn request has no effect #770

Closed
zakmat opened this issue Oct 10, 2024 · 3 comments
Closed

[ROS2] Using a robot_namespace in a spawn request has no effect #770

zakmat opened this issue Oct 10, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. sig/simulation Categorizes an issue or PR as relevant to SIG Simulation

Comments

@zakmat
Copy link
Contributor

zakmat commented Oct 10, 2024

Describe the bug
ROS2 Spawner does not handle robot_namespace field correctly. The robot is spawned however no namespace is set.

Assets required
https://github.com/o3de/o3de-extras/tree/development/Gems/RosRobotSample can be used for convenience

Steps to reproduce

  1. Create a project with ROS2 and RosRobotSample Gems
  2. Open Default Level and add Entity with ROS2 Spawner Component
  3. Add rosbot_xl.prefab with rosbot name to the spawner and Start Game Mode
  4. Spawn two robots with the following commands:
ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: rosbot, robot_namespace: first }'
ros2 service call /spawn_entity gazebo_msgs/srv/SpawnEntity '{name: rosbot, robot_namespace: second }'
  1. See available topics using ros2 topic list

Expected behavior
Two rosbots are spawned in the scene.
Topic list includes both first/cmd_vel and second/cmd_vel.
Actual behavior
Topic list has only one /cmd_vel that can be used to control both robots.

Found in Branch
main (2409)

Commit ID from o3de/o3de and o3de/o3de-extras repositories
o3de: e8570f9d635c0abbf3d733d0524a3c0ae75d726c
o3de-extras: f71979b52a9f18f0313780d389e009f007ce2c36

Desktop/Device (please complete the following information):

  • Device: PC
  • OS: Ubuntu 22.04

Additional context
Add any other context about the problem here.

@zakmat zakmat added kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 10, 2024
@michalpelka michalpelka added sig/simulation Categorizes an issue or PR as relevant to SIG Simulation priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 10, 2024
@michalpelka
Copy link
Contributor

michalpelka commented Oct 10, 2024

I can reproduce the issue, and assign blocker priority since it breaks existing projects (e.g. fleet template).

Peek.2024-10-11.01-25.mp4

@michalpelka
Copy link
Contributor

The bug was introduced in PR #759

@jhanca-robotecai
Copy link
Contributor

The fix for this problem was pushed to development and to stabilization/2409 branches; from stabilization/2409 it was then released in binary form for ROS 2 Gem 3.1.1. The issue can be closed as solved (it is still missing in main, but this will not change until the next release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/blocker Highest priority. Must be actively worked on right now as it is blocking other work. sig/simulation Categorizes an issue or PR as relevant to SIG Simulation
Projects
None yet
Development

No branches or pull requests

3 participants