Robotics StackExchange | Archived questions

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/41433/multiple-robots-simulation-and-navigation/)

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/263415/simplest-multiple-robot-scenario/) uses a similar method.

Asked by canatan on 2018-10-02 09:29:31 UTC

Comments

Did you fix this problem?

Asked by Andromeda on 2021-07-16 09:34:50 UTC

No but someone had a stage simulation that I ended up using.

Asked by canatan on 2022-02-04 05:33:26 UTC

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

Asked by Andromeda on 2022-05-19 02:40:44 UTC

Answers