ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You have to specify the remapping directly where the gazebo node is started (Internally, the XML-based remapping is converted to arguments provided to the executable). So the one option is to copy the empty_world.launch
launch file from gazebo_ros
and add the appropriate remapping, e.g. change this part to:
<node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="false" output="screen"
args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics) $(arg extra_gazebo_args) $(arg world_name)">
<remap from="tf" to="tf_remapped_away" />
</node>
</node>
As another (potential) option, the original empty_world.launch
also provides a extra_gazebo_args
argument, that can be used to provide additional arguments. I tried manually adding the remapping there (for my test the /clock
topic) This however doesn't work, likely due to the duplicate :=
(would probably need to be escaped somehow):
roslaunch gazebo_ros empty_world.launch extra_gazebo_args:=/clock:=/clock_remapped_away