Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS costmap #1

Closed
Leedk3 opened this issue Mar 30, 2023 · 5 comments
Closed

ROS costmap #1

Leedk3 opened this issue Mar 30, 2023 · 5 comments

Comments

@Leedk3
Copy link

Leedk3 commented Mar 30, 2023

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,

@xiaoyi-cai-acl
Copy link
Collaborator

xiaoyi-cai-acl commented Mar 31, 2023

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
Copy link
Author

Leedk3 commented Apr 3, 2023

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.

@Leedk3 Leedk3 closed this as completed Apr 3, 2023
@brilianputraa
Copy link

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.

Hi may I know what package you used for generating the costmap?

@xiaoyi-cai
Copy link

Hi there, I think you have many options. Typical ones are:

Note that grid_map follows a different convention compared to the ROS occupancy grid message, so you have to use grid_map's conversion functions accordingly.

You just have to write a ROS subscriber to those maps and pass the maps to the planner.

@brilianputraa
Copy link

brilianputraa commented Dec 13, 2023

Hi there, I think you have many options. Typical ones are:

Note that grid_map follows a different convention compared to the ROS occupancy grid message, so you have to use grid_map's conversion functions accordingly.

You just have to write a ROS subscriber to those maps and pass the maps to the planner.

Thank you for your prompt response and recommendations!, okay I will take a look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants