ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It looks like you're missing some <arg>
tags above your <node>
tag. Try this:
<launch>
<!-- name is the name of the variable, default is the default value if no value is specified -->
<arg name="vel_cmd_topic" default="default_topic"/>
<arg name="max_speed" default="a.bc"/>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find car_navigation)/param/teb_local_planner_params.yaml" command="load" />
<!-- Here are the params shared by several nodes -->
<rosparam file="$(find car_bringup)/param/common_params.yaml" command="load" />
<!-- Here is getting the parameter from the previous file and working properly-->
<param name="x_size" value="$(arg x_size)" />
<!-- Here I am having the problem when remapping -->
<remap from="cmd_vel" to="$(arg vel_cmd_topic)"/>
<remap from="max_speed" to="$(arg max_speed)"/>
</node>
</launch>
From the terminal, type:
roslaunch package_name launch_file_name.launch vel_cmd_topic:=topic_name max_speed:=x.yz
and replace these placeholders with your own values. I've never done this with <remap>
tags, but I don't see why it wouldn't work.