ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As @gvdhoom mentioned, RViz is just visualization tool and not a simulation. So to visulize something in RViz it need to be somewhere in gazebo as urdf/xacro format and loaded on ros parameter server as xml.

What you can try if the world is static, (NOTE: It might not work with the block on table that you have to pick)

You can always add new models with urdf file to visualize in the rviz or use it somewhere else. To do that create new urdf file with the required models in the world. What you can do is to use another parameter name instead of the robot_description

<arg default="$(find my_world_description)/urdf/table.urdf.xacro" name="table"/>
<param command="$(find xacro)/xacro $(arg table)" name="world_description"/>

now you can also add this model in rviz as RobotModel and use parameter world_description.

refer this question for more info.

As @gvdhoom @gvdhoorn mentioned, RViz is just visualization tool and not a simulation. So to visulize something in RViz it need to be somewhere in gazebo as urdf/xacro format and loaded on ros parameter server as xml.

What you can try if the world is static, (NOTE: It might not work with the block on table that you have to pick)

You can always add new models with urdf file to visualize in the rviz or use it somewhere else. To do that create new urdf file with the required models in the world. What you can do is to use another parameter name instead of the robot_description

<arg default="$(find my_world_description)/urdf/table.urdf.xacro" name="table"/>
<param command="$(find xacro)/xacro $(arg table)" name="world_description"/>

now you can also add this model in rviz as RobotModel and use parameter world_description.

refer this question for more info.