Ask Your Question
0

Create Occupancy Grid from Matrix

asked 2018-04-20 10:15:51 -0600

Georgee gravatar image

Hi there!

I currently have a matrix with each cell representing 1cm² and a value associated to it. What I'd like to do is create an ocuppancy grid to display it in RViz on top of my PointCloud and see if it matches. The value of the cell means how many points of that PointCloud fall in it, so I know the position of my (0,0) cell and then every other is one cm away from each other. How can I do it?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-04-22 13:36:10 -0600

You could try installing and using the GridMap plugin. It might be overkill for what you need, but it can show flat and 2.5D grid maps containing multiple layers of data. It has a nice RViz plugin too.

edit flag offensive delete link more

Comments

Probably yes, way too overkill :S Isn't there a faster way, like creating squares of 1cm^2 or something like that?

Georgee gravatar image Georgee  ( 2018-04-23 03:21:40 -0600 )edit

Now you come to mention it, yes there is. Have a look at the marker message type, you can publish a message of cubes of different colors to display the map you want in rviz.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-04-23 18:49:53 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-04-20 10:15:51 -0600

Seen: 446 times

Last updated: Apr 22 '18