multiple robots in rviz with different urdfs - robot models not showing

asked 2018-10-02 09:29:31 -0500

canatan gravatar image

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.

edit retag flag offensive close merge delete

Comments

Did you fix this problem?

Andromeda gravatar image Andromeda  ( 2021-07-16 09:34:50 -0500 )edit