ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The remap
command is only used to "rename" parameters that are already loaded to the parameter server. In your case, you want to load new data to the parameter server, so you'll need to do something different.
There are multiple ways to load URDF data from a file to the parameter server:
1) Use <param>
with the command
attribute, as shown in this URDF tutorial:
<launch>
<param name="robot_description" command="cat $(find museumGuide)/urdf_model/peoplebot.xml" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
</launch>
2) Use <param>
with the <textfile>
argument as shown here:
<param name="robot_description" textfile="$(find museumGuide)/urdf_model/peoplebot.xml"/>
I think it is generally preferred to use option #2. That's also the method that is used for packages generated by the internal ROS wizards for Arm Navigation and MoveIt.
2 | No.2 Revision |
The remap
command is only used to "rename" parameters that are already loaded to the parameter server. In your case, you want to load new data to the parameter server, so you'll need to do something different.
There are multiple ways to load URDF data from a file to the parameter server:
1) Use <param>
with the command
attribute, as shown in this URDF tutorial:
<launch>
<param name="robot_description" command="cat $(find museumGuide)/urdf_model/peoplebot.xml" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
</launch>
2) Use <param>
with the <textfile>
argument as shown here:
<param name="robot_description" textfile="$(find museumGuide)/urdf_model/peoplebot.xml"/>
I think it is generally preferred to use option #2. That's also the method that is used for packages generated by the internal ROS wizards for Arm Navigation and MoveIt.
Edit:
In response to Cerin's comment below, here's a 3rd option showing how to load an XACRO file to the parameter server:
3) Use <param>
with the command
attribute and the xacro
script, as shown in the very first example on the XACRO Tutorial page:
<param name="robot_description" command="$(find xacro)/xacro '$(find mypackage)/path/to/robot.xacro'" />