ANYbotics / elevation_mapping

Robot-centric elevation mapping for rough terrain navigation
BSD 3-Clause "New" or "Revised" License
1.35k stars 446 forks source link

Output as a 2D Occupancy Grid #119

Open 8bitZeta opened 5 years ago

8bitZeta commented 5 years ago

Hello,

I have managed to get a decent live reading of data using a Velodyne Lidar.

The output is currently a standard Grid Map (based on the Simple Demo), but I was hoping that I would be able to adjust the output type similar to how Grid Mapping works.

Any help would be appreciated. Thanks

maximilianwulf commented 5 years ago

Hi @Dev727,

The output is currently a standard Grid Map (based on the Simple Demo), but I was hoping that I would be able to adjust the output type similar to how Grid Mapping works.

In what way do you want to adjust the output type? If you are interested to convert the grid_map to a costmap2d object you have to write the transformation for yourself for now. At the moment grid_map only supports the conversion to a costmap2d.

8bitZeta commented 5 years ago

At the moment grid_map only supports the conversion to a costmap2d.

This should be exactly what I'm looking for. Is there a simple way to convert the produced Grid Map to a Costmap2D using the Simple Demo? Would it require editing the .yaml file or actually altering any of the actual code?

Also, thanks for the response, @maximilianwulf.

maximilianwulf commented 5 years ago

@Dev727 at the moment you have to write your own code to get the behavior.

You can find inspiration to do it in the costmapt2GridMap converter class.

Feel free to open a PR if you have working code.

hogabrie commented 5 years ago

Hi @Dev727,

I added the conversion from GridMap to a Costmap2D in the costmapt2GridMap converter class. I hope this helps. You can check the unit tests to see how you can perform the conversion.

Cheers, Gabriel