Repository navigation
feat(bringup): add robot_ns to sim_robot.launch.py - #67
Merged
Merged
Conversation
For a simulation shared by several robots (the arena of the KPI Rover hub): - robot_ns names the Gazebo model, prefixes the Gazebo topics of the lidar and the IMU and is the namespace of the controller manager. The controller manager topics (robot_description, joint_states, cmd_vel, odom) move under /<robot_ns>, so what runs the shared simulation bridges them; /scan, /imu_broadcaster/imu, /clock and the frames stay the same. - load_controllers:=false leaves loading the controllers to what runs the shared simulation. - The controller config matches the controller manager in any namespace (/**/).
AksonovSergei
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64
What and why
A simulation shared by several robots (the arena of the KPI Rover hub) needs every robot under its own name.
sim_robot.launch.pygets two launch arguments; with the defaults the single-robot simulation is unchanged.robot_ns(default empty): names the Gazebo model, prefixes the Gazebo topics of the lidar and the IMU and is thenamespace of the controller manager (gz_ros2_control). The controller manager topics (
robot_description,joint_states,diff_drive_controller/cmd_vel,diff_drive_controller/odom) move under/<robot_ns>, sorobot_nsworks with what runs the shared simulation and bridges them./scan,/imu_broadcaster/imu,/clockand the frames stay the same.
load_controllers(defaulttrue):falseleaves loading the controllers to the shared simulation.kpi_rover_controllers.yamlmatches the controller manager in any namespace (/**/), andtf_frame_prefix_enable: falsekeeps the framesodom/base_footprint. The real robot (hw.launch.py) usesthe same file without a namespace: nothing changes for it.
gz_bridge.yaml: absolute ROS topic names, the bridge runs in the namespace and expands only the Gazebo topics.How it was tested
Simulation:
sim.launch.py world:=emptywithoutrobot_ns: the controllers are active, the robot drives (/odomvx 0.3at
/cmd_vel0.3),/scancomes inlaser_frame.robot_ns:=<login> load_controllers:=false, separate topics, RTF 1.0,a robot is removed from the arena when its launch stops.
Real robot: not tested.
hw.launch.pygets only the/**/keys andtf_frame_prefix_enable: falsein the controllerconfig, which give the same names and frames without a namespace.
Checklist
!in the title