sikang / mpl_ros

A ROS wrapper for trajectory planning based on motion primitives
Apache License 2.0
573 stars 148 forks source link

Questions related to MPL #13

Open FaboNo opened 5 years ago

FaboNo commented 5 years ago

Dear Sikang

First thank you for sharing such amazing piece of work! We would like to use it both on simulation and on a real quad and I have few questions: 1- one of our main challenge is to go thru a door with a quad which is slightly too big for the door (narrow gap) - my question is related to the inputs of the trajectory computation. We are using a 2D lidar but we can create a partial 3D map anyway - however as the map is incrementally built, we do not have a complete known Map - some area will be labeled as unknown. Does the algorithm is able to deal with such a map? If not what kind of pre-processing is required?

2- the second one is to compute a trajectory in a 2D occupancy grid, but incomplete, meaning that there are also some unknown cells. But here I guess that if we provide a 2D map with the "frontiers" marked as occupied, it should work. Besides I think that we need to inflate the obstacles, am I right?

Thank you

Regards

sikang commented 5 years ago

Hi,

No problem! For answering your questions:

  1. If you're using voxel/occupancy grid maps, you could either free all unknown cells or only check collision with the occupied cells. There is no pre-processing needed other than setting the right value for cells.
  2. Treat unknown as occupied is over-conservative in general planning missions. Frontier based method will work, but you need to specify goals in the free space otherwise MPL won't find any trajs. Inflating obstacles is always necessary to make sure the vehicle won't getting too close to obstacles/hitting walls due to map incompleteness. But I think if you already have a 2D lidar onboard, you may assume unknown is free if the flight speed is not super high. Let me know if you have troubles running the test :)

Sikang

FaboNo commented 5 years ago

Hi Sikang

Thank you very much for your answers, I will first understand the code and if I have other questions, I will post them.

Thanks again

Fabrice