ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I managed to figure it out.

The 'remap' command seems to change parameters that the node uses 'from' some original value 'to' a new value specified by the user. In this case, the 'from' parts are correct, but the 'to' parts need to be changed to reflect your particular robot. For example, if your robot's joint_states are being published to /myrobot/joint_states, and if you load your URDF to the parameter server with this line:

<param name="myrobot" textfile="$(find mypackage)/urdf/myrobot.urdf" />

And then you should write the robot state publisher node as below:

<launch>
    <node pkg="robot_state_publisher" type="state_publisher" name="rob_st_pub" >
        <remap from="robot_description" to="myrobot" />
        <remap from="joint_states" to="myrobot/joint_states" />
    </node>
</launch>

*Note that there was also a mistake in the 'node' line of the launch file that I have corrected. I can't be certain that this is correct for all ROS versions, but I can verify that it works on ROS Fuerte perfectly.