f1: namespace the car by entity so N of them can run together#769
Closed
anishk85 wants to merge 1 commit into
Closed
f1: namespace the car by entity so N of them can run together#769anishk85 wants to merge 1 commit into
anishk85 wants to merge 1 commit into
Conversation
javizqh
requested changes
Jul 10, 2026
| from launch_ros.parameter_descriptions import ParameterValue | ||
|
|
||
|
|
||
| def _render_bridge(package_dir, namespace): |
Member
There was a problem hiding this comment.
Absolutely not. There are much better ways of handling launching a ROS bridge.
For example in the dingo robot in this repo
| @@ -1,66 +1,86 @@ | |||
| import os | |||
| import re | |||
| Y = LaunchConfiguration("Y") | ||
| sensor = LaunchConfiguration("sensor") | ||
| mode = LaunchConfiguration("mode") | ||
| sensor = LaunchConfiguration("sensor").perform(context) |
Member
There was a problem hiding this comment.
Perform must not be used directly
|
|
||
| <xacro:f1_velocity topic="/F1ROS/cmd_vel"/> | ||
| <xacro:f1_odom topic="/F1ROS/odom" freq="50"/> | ||
| <xacro:f1_velocity topic="/$(arg namespace)/F1ROS/cmd_vel"/> |
| <visualize>1</visualize> | ||
| <update_rate>20</update_rate> | ||
| <topic>f1/laser/scan</topic> | ||
| <topic>/$(arg namespace)/f1/laser/scan</topic> |
| <xacro:arg name="ackermann" default="false"/> | ||
| <xacro:arg name="camera" default="true"/> | ||
| <xacro:arg name="laser" default="false"/> | ||
| <!-- entity name = ROS/gz namespace, so N cars don't share topics --> |
javizqh
requested changes
Jul 10, 2026
Member
There was a problem hiding this comment.
You do not pass the namespace to the macro
Member
|
Closed in favor of a cleaner and working approach #770 |
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.
f1: namespace the car by entity so N of them can run together
lets the same robot be spawned more than once in one simulation. pairs with the
multi-robot support in RoboticsApplicationManager and RoboticsAcademy.
what changed
the launch file takes a new
entityargument (defaultf1, so a single-carlaunch behaves exactly as before) and uses it as the ros/gazebo namespace:
namespacemapping, so the model's plugintopics become
/<entity>/F1ROS/cmd_vel,/<entity>/F1ROS/odom, the camera andthe laser scan
fixed gz topics
robot_state_publisher, the gz bridge and the image bridge all run inside thenamespace, and the car spawns as
-name <entity>from/<entity>/robot_descriptionso two cars come up as
/f1_0/...and/f1_1/...and never share a topic or anode name. RAM passes the entity it generated for each robot.