Ask Your Question
1

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

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

robot_commander gravatar image

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

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
2

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

gvdhoorn gravatar image

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

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

Comments

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

robot_commander gravatar imagerobot_commander ( 2017-11-05 23:42:40 -0600 )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 imagerobot_commander ( 2017-11-06 12:17:32 -0600 )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 imagegvdhoorn ( 2017-11-06 12:33:30 -0600 )edit

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

robot_commander gravatar imagerobot_commander ( 2017-11-06 17:18:35 -0600 )edit
1

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

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

Comments

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

robot_commander gravatar imagerobot_commander ( 2017-11-04 16:10:44 -0600 )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 imagerobot_commander ( 2017-11-04 17:12:04 -0600 )edit
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 1,951 times

Last updated: Nov 05 '17