multiple robots in rviz with different urdfs - robot models not showing
I have a stage simulation with four robots. I wanted to add robot models to the rviz visualization. I was able to add a single urdf for all the robot models easily using:
<param name="robot_description" command="cat $(arg urdf_file)"/>
in the launch file before the individual robot namespaces were defined. (https://answers.ros.org/question/4143...)
However when I do the following:
<group ns="$(arg robot_id)">
<!-- set robot model-->
<param name="tf_prefix" value="$(arg robot_id)"/>
<arg name="urdf_file" default="$(find multi_rob_sim)/models/$(arg robot_id)_model.urdf"/>
I can't see any of the robotmodels in rviz.
I checked if the urdf was loaded using a rosparam get $robot_id/robot_description
and it had the right urdfs. My urdfs for now are really simple - (since the robots in stage are just circles too)
<?xml version="1.0"?>
<robot name="robot_0">
<link name="base_link">
<visual>
<geometry>
<cylinder length="0.6" radius="1.0"/>
</geometry>
</visual>
</link>
</robot>
I don't understand why the robot models are not being displayed in rviz using this method. (https://answers.ros.org/question/2634...) uses a similar method.
Did you fix this problem?
No but someone had a stage simulation that I ended up using.
Maybe is a stupid question, but did you check, whether your LC_NUMERIC en.EN_UTF-8 is? If not, the URDF file is not going to be parsed