mit-acl/mppi_numba

ROS costmap

Leedk3 opened this issue · 5 comments

Leedk3 commented

Hi there,

Thank you for sharing your amazing work!
I am trying to change your unicycle model to ackermann-based vehicle model.
Also, I want to deploy robot for the real-world test.

To do this, I am looking into your test code, and found "use_costmap" parameter.
After your first release, is there any progress for ROS costmap version?

Again, thank you very much!

Best,

Hi, thank you for your interest!

There were some preliminary efforts in interfacing with ROS Costmap2D, but our experience suggested that the overhead in converting Costmap2D in cpp and porting the data to python via pybind11 was quite significantly (at least compared to the performance gain due to GPU). Therefore, we did not pursue that costmap2d option further.

However, if you do want to go down this route, an option is to use pybind11 to initialize a MPPI_Numba object in a cpp node. Then:

  1. Convert costmap2d objects in your cpp node to corresponding pybind arrays (e.g., lethal, unknown, etc.)
  2. Write a new python function for MPPI_Numba to process the pybind arrays.

Alternatively, you can have a cpp node that publishes a custom message that contains relevant info from costmap2d (e.g., obstacles and unknown cells). The message can then be subscribed by a python node that holds the MPPI_Numba object. This should be easier to do.

Leedk3 commented

Oh, I am looking into the alternative method by generating costmap on the other packages.
Thank you for your fast reply!
You can close this issue then.