Load two urdf models in one launch file
Hello,
i'm trying to load two models in one lunch file. I have one file for a robot arm and one for the base, that is intended to carry the robot arm around. Each separated works but as i try to load them together only the last model is loaded. Basically that's not surprising for me since i load both with the "robot_description" parameter and therefor overwrite the first loaded model. But how is it done the correct way? As i name the descriptions different, rviz complains about not having a properly set "robot_description" parameter. Keeping one "robot_description" and naming the other different leads to a white model with TF complaining about not having a transform tor every of the links. So, how to load both models from one launch file?
Thanks to everyone.
UPDATE:
I tried what gvdhorn suggested. I created a file "jaco_mp470.xacro", that only contains the following lines:
<robot xmlns::xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find mp470_description)/urdf/mp470.xacro"/>
<xacro:include filename="$(find kinova_description)/urdf/j2s7s300.xacro"/>
<xacro:mp470 prefix="mp470" />
<xacro:j2s7s300 base_parent="root" /> <!-- taken from another xacro_macro file -->
<joint name="jaco_to_base" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0"/>
<parrent link="mount"/>
<chiled link="root"/>
</joint>
</robot>
And than tried to load it with:
<param name="robot_description" command="$(find xacro)/xacro.py '$(find total_model)/urdf/jaco_mp470.xacro'" />
<node name="joint_state_publisher" pkg="....... />
<node name="robot_state_publisher" pkg="....... />
But rviz tells me that the robot_description parameter is not loaded. So what do i miss?
Snippet of old launch file:
<!-- platform, designed by myself-->
<param name="mp470_description" command="cat $(find mp470_description)/urdf/mp470.xacro" />
<!-- just the model of the arm, no controlers and no MoveIt -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find kinova_description)/urdf/j2s7s300_standalone.xacro'"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="/use_gui" value="false"/>
<rosparam param="/source_list">[/move_group/fake_controller_joint_states]</rosparam>
<param name="zeros/j2s7s300_joint_2" value="3.1415"/>
<param name="zeros/j2s7s300_joint_4" value="3.1415"/>
<param name="zeros/j2s7s300_joint_6" value="3.1415"/>
</node>
<!-- rviz told me to use this line just once -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />