Is there a way in launch.py to use $(var arg) to pass text arguments from file A to file B?

asked 2022-06-19 22:28:34 -0500

miku54 gravatar image

updated 2023-04-05 10:46:50 -0500

bvbdort gravatar image

My system is ROS2 galactic. I want to implement the ROS2 conversion corresponding to this code.

ROS1 :
<launch>
<arg name="car_mode"  default="" />
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find catkin_ws)/costmap_params/param_$(arg car_mode)/teb_local_planner_params.yaml"  command="load"/>
  </node>
</launch>

How can I modify the $(arg car_mode) place in ROS2?

edit retag flag offensive close merge delete