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

How to make my plugin display type in Rviz interactive?

asked 2016-10-16 15:50:32 -0500

S. Yan gravatar image

updated 2016-10-17 08:10:05 -0500

I want to display some self defined display-type in Rviz, which come from object segmentation from laser scanned point clouds. The basic type Marker should not be used, because the primitive shapes can not cover the abundant shapes from the segmented objects and also some information like velocity is appended to the message to Rviz.

Moreover I want to make the displayed shapes interactive. For example users can click on a shape and add on a label like "vehicle" to it.

But after much research I have found no methods for making a plugin type interactive. Could anyone help me through this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-17 07:41:02 -0500

kramer gravatar image

Honestly, I think you really want to stick with InteractiveMarkers (it's not clear to me that is what you are referring to when you say "basic type Marker"). Until you get a really good understanding of how they work, it's unlikely you'll be able to write a better a replacement. And it's certainly not an easy task.

A better solution (in my opinion) is to learn how to build up your own complex graphic objects, perhaps akin to the ones already supplied in RViz (see: the ogre_helpers in the RViz source). For instance, as an example from which to work, an axis Marker is simply three arrow helpers.

edit flag offensive delete link more

Comments

With "basic type Marker" I mean the Marker and InteractiveMarker supplied in RViz. They contain only primitive shapes like cube, sphere,.... But from the laser data comes out segmentations with random shapes, which I donot wan to use primitive shapes to represent. Thanks for your tip! I am learning.

S. Yan gravatar image S. Yan  ( 2016-10-17 09:33:11 -0500 )edit

Have you seen the MESH_RESOURCE interactive marker type?

gvdhoorn gravatar image gvdhoorn  ( 2016-10-17 10:19:47 -0500 )edit

@gvdhoorn I thought it is something predefined, like robot arms from CAD software. Is it possible to create MESH_RESOURCE files during the running of programs?

S. Yan gravatar image S. Yan  ( 2016-10-17 12:45:50 -0500 )edit

hm. I hadn't considered the "at runtime" part of this. It can probably be done, but you'd need to write-out the mesh to disk, then configure the mesh marker with the path to the mesh you generated. Not sure that would be very efficient.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-17 12:56:08 -0500 )edit

What about triangle list? http://wiki.ros.org/rviz/DisplayTypes...

William gravatar image William  ( 2016-10-17 13:13:55 -0500 )edit

@gvdhoorn No idea how fast that works. But due to the unique shape of every segmentation, many MESH_RESOURCE files should be created, which seems not efficient. I am now trying to solve the problem with a plug-in tool type. Which may allow some mouse operations on screen of RViz. Thanks anyway!

S. Yan gravatar image S. Yan  ( 2016-10-18 03:12:29 -0500 )edit

@William I have no idea how triangles could build up the contours I need. As comment above, I will try the RViz plug-in tool type. Any achievements will be updated later.

S. Yan gravatar image S. Yan  ( 2016-10-18 03:14:49 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-10-16 15:50:32 -0500

Seen: 342 times

Last updated: Oct 17 '16