Skip to content
generated from PWhiddy/pybind11-cuda

python wrapper for Dynamic Occupancy Grid Mapping

License

Notifications You must be signed in to change notification settings

idlebear/dogm_py

Repository files navigation

DOGM_PY

A pybind11 based wrapper for the Dynamic-Obstacle-Grid (DOGM) library, based on a template forked from here. The DOGM library accepts 2D LaserScan formated input (a list of ranges) and outputs either a rendered probabilistic occupancy or free/occupied as a function of Demster-Shafer masses. Here's a brief demo of the client processing data from the Carla simulator showing free space in green, occupied in red, and orange/yellow a combination of the two.

Performing an update and retrieving the occupancy requires ~1ms on AMD5950/nVidia3900 hardware. Drawing the result via matplotlib takes considerably longer...

Prerequisites

  • Python 3.6 or greater
  • Cmake 3.6 or greater
  • nVidia CUDA

To build

Clone this repository and the required submodules using

-> git clone --recurse_submodules https://github.com/idlebear/dogm_py.git

then building follows the standard recipe:

-> cd build
-> cmake ..
-> make -j8

To install and run

A proper/seamless install hasn't been created yet. There is, however, a workaround you can use. From the build directory

-> cp dogm_py.so ../dogm_py/dogm_py.so
-> cd ..  #  move to the project root
-> python setup.py -e dogm_py

Alternatively, just copy dogm_py.so to a directory on your $PYTHONPATH. Then from python

$ python
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dogm_py as dogm
>>> help( dogm )
Help on module dogm_py:

NAME
    dogm_py - Python bindings for the Dynamic Occupancy Grid Map Library

CLASSES
    pybind11_builtins.pybind11_object(builtins.object)
        DOGM
        DOGMParams
        GridCell
        LaserMeasurementGrid
        LaserMeasurementGridParams
        MeasurementCellPtr
        VectorFloat
        VectorGridCell
    
    class DOGM(pybind11_builtins.pybind11_object)
     |  Method resolution order:
     |      DOGM
     |      pybind11_builtins.pybind11_object
     |      builtins.object
     |  

ROS1

There is a ROS1 node available in demo that converts a LidarScan message into an occupancy grid. At some point, I'll get around to making a ROS2 version...

References

Other than providing a wrapper to access the library, this really isn't my work. If you find this useful, please reference the original repository and the authors of the paper the library is based on:

Nuss, Dominik, Stephan Reuter, Markus Thom, Ting Yuan, Gunther Krehl, Michael Maile, Axel Gern, and Klaus Dietmayer. "A random finite set approach for dynamic occupancy grid maps with real-time application." The International Journal of Robotics Research 37, no. 8 (2018): 841-866.

@article{nuss2018random,
  title={A random finite set approach for dynamic occupancy grid maps with real-time application},
  author={Nuss, Dominik and Reuter, Stephan and Thom, Markus and Yuan, Ting and Krehl, Gunther and Maile, Michael and Gern, Axel and Dietmayer, Klaus},
  journal={The International Journal of Robotics Research},
  volume={37},
  number={8},
  pages={841--866},
  year={2018},
  publisher={SAGE Publications Sage UK: London, England}
}

About

python wrapper for Dynamic Occupancy Grid Mapping

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published