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

How do I re-load a robot model in rviz?

asked 2013-02-22 06:01:09 -0600

TommyP gravatar image

If I modify for example a mesh file how do I re-load that in a running rviz. Just turning RobotModel on and off did not reload the model.

Also is there an easy way to check if a mesh file is displayble in rviz?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-22 13:16:02 -0600

dgossow gravatar image

updated 2013-02-23 09:19:16 -0600

The next relese of RViz will reload the meshes when you press the 'reset' button in the bottom-left corner. See https://github.com/ros-visualization/rviz/commit/ee6221bd5e5203de76c124b8fef41bf7e5332157

An alternative to updating your robot model is to send a mesh marker. See http://www.ros.org/wiki/rviz/DisplayTypes/Marker#Mesh_Resource_.28MESH_RESOURCE.3D10.29_.5B1.1.2B-.5D

edit flag offensive delete link more

Comments

No, that do not work. That re-load the URDF file but it does not re-load the mesh file. That was the reason I wasted so much time since I noticed that the URDF file was re-loaded and of course assumed that also the mesh file was re-loaded.

TommyP gravatar image TommyP  ( 2013-02-22 21:41:16 -0600 )edit

Apart from refreshing the robot description in the parameter server, you need to trigger a refresh of the Rviz robot model plugin. This is done by deactivating / reactivating the plugin (using the checkbox).

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2013-02-23 04:53:15 -0600 )edit
1

Yes, I know. And that re-loads the URDF file. But it seems like the mesh files is cached. I do not change the file namn of the mehs file. I just change the content of it. And it is not re-loaded if it has been loaded once before. It seems to me that a flag is needed in RobotModel to force re-loading

TommyP gravatar image TommyP  ( 2013-02-23 07:07:29 -0600 )edit

Indeed, RViz caches all meshes, textures, etc.

dgossow gravatar image dgossow  ( 2013-02-23 08:52:56 -0600 )edit

So is it impossible to re-load them without re-starting rviz?

TommyP gravatar image TommyP  ( 2013-02-23 09:18:44 -0600 )edit

It looks like a previous poster tracked down the code responsible (circa 2011) http://answers.ros.org/question/11871... - it would be great to be able force a reload without creating multiple files, maybe a pr can be made out of this.

lucasw gravatar image lucasw  ( 2016-05-24 18:18:01 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2013-02-22 06:01:09 -0600

Seen: 3,170 times

Last updated: Feb 23 '13