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

rviz to plot a plane with known (x,y,z) points

asked 2017-11-03 19:32:28 -0500

robot_commander gravatar image

updated 2017-11-04 17:12:59 -0500

Hi guys,

I have a list of (x,y,z) points all of which lie on the same plane. I need to visualize this plane on rviz with these points.

I googled on how to make a plane on rviz and someone mentioned making a cube but reduce a dimension so that it becomes a plane. Now, for a cube, we give a point which will become its center. But I have a bunch of (x,y,z) points that I need to visualize as a plane in rviz. How do I go about doing this? Any thoughts would be welcome.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2017-11-05 02:51:27 -0500

gvdhoorn gravatar image

updated 2017-11-05 02:52:23 -0500

The other answers contain some good pointers, but I would recommend you try out davetcoleman/rviz_visual_tools. It already provides you with the infrastructure to get RViz to render planes (in addition to all sorts of other geometric shapes).

rviz visual tools.

edit flag offensive delete link more


oh wow. this is great! I'll check it out, thank you!

robot_commander gravatar image robot_commander  ( 2017-11-05 23:42:40 -0500 )edit

I found this git repo which builds on davetcoleman/rviz_visual_tools and gives me a python implementation of publishing markers.

robot_commander gravatar image robot_commander  ( 2017-11-06 12:17:32 -0500 )edit

The Python lib is a good find, but notice that the last commit was already almost 2 years ago. rviz_visual_tools has seen some development since that time, so you might want to check whether the Python lib is missing something.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-06 12:33:30 -0500 )edit

ahhhh. I see. ok I'll look at it. Thank you very much for all your help! :)

robot_commander gravatar image robot_commander  ( 2017-11-06 17:18:35 -0500 )edit

answered 2017-11-04 03:05:53 -0500

NEngelhard gravatar image

I would suggest to use the TriangleList as MarkerType. Do you have a triangulation of your points?

edit flag offensive delete link more


oh you mean, like to make a triangle with three points and increase the scale to visualize?

robot_commander gravatar image robot_commander  ( 2017-11-04 16:10:44 -0500 )edit

ok so I tried making it a triangle and increasing the scale. Now I'm curious as to how the scale affects the triangle_list marker type. so what does scale.x, scale.y and scale.z do specifically in triangle_list marker type?

robot_commander gravatar image robot_commander  ( 2017-11-04 17:12:04 -0500 )edit

answered 2017-11-05 01:30:14 -0500

jinseoi gravatar image

As far as I'm concerned, it will be better to compute the plane's normal vector and center first by the list of points you mentioned. Then you can make a two-dimensional cube with normal vector and center like the way you have googled.

edit flag offensive delete link more

Question Tools



Asked: 2017-11-03 19:32:28 -0500

Seen: 5,943 times

Last updated: Nov 05 '17