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

Importing an STL file into Rviz

asked 2019-03-11 18:26:05 -0500

matthewbigerton gravatar image

updated 2022-08-28 10:57:51 -0500

lucasw gravatar image

I have been tasked with getting a CAD image of a human hand into Rviz for my project. I am very new to ROS and all its features. After some research I understand I have to mesh the stl file as a URDF but all the tutorials and videos I have followed are above my minuscule knowledge of ROS. The model is just a static model of a hand. I would like to know the easiest way to get my downloaded .stl file into Rviz. Any and all help is appreciated

edit retag flag offensive close merge delete

Comments

1

While URDF is one option to achieve this. It is also possible to publish a MeshMarker message with a URL of a model (STL or DAE) this option is arguably much simpler.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-03-17 12:16:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-08-20 20:30:02 -0500

vonunwerth gravatar image

Based on the visualization_msgs markers of RViz I wrote a small package that makes it easy to load meshes into RViz as textured objects.

It simply loads all files which were put inside its meshes folder and publishes them to the visualization_marker topic. And even dynamically! When a new object is added to the folder, it appears (or is published) in RViz. If an object is deleted, it also disappears from the published models.

It also contains a launch file which just takes everything which is inside the meshes folder, opens up RViz with a suitable perspektive and visualizes the 3D files.

Just check it out here: https://github.com/vonunwerth/RVizMes...

image description

edit flag offensive delete link more
0

answered 2019-03-17 10:49:28 -0500

David Lu gravatar image

https://wiki.ros.org/urdf/Tutorials/B...

This should help. Be sure to check out the part about meshes at the bottom.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-11 18:26:05 -0500

Seen: 4,052 times

Last updated: Aug 20 '22