ethz-asl / mav_voxblox_planning

MAV planning tools using voxblox as the map representation.
BSD 3-Clause "New" or "Revised" License
453 stars 135 forks source link

mav_local_planner No-obstacle Replanning #43

Open alexmillane opened 5 years ago

alexmillane commented 5 years ago

Hi Helen.

I'm using the local planner as an interface for generating timed trajectories for the MPC. I am not using any collision avoidance. When:

<param name="avoid_collisions" value="false" />

the local planner continuously sends the trajectory every replan_dt. From looking at the code, this is a mistake and the code contradicts the comment just above. Have a look here:

https://github.com/ethz-asl/mav_voxblox_planning/blob/master/mav_local_planner/src/mav_local_planner.cpp#L202

The code below this comment simply is rerun every replanning step...

clanegge commented 4 years ago

I believe the issue lies here:

https://github.com/ethz-asl/mav_voxblox_planning/blob/a90260baaa07cd046847d7a237ab17e2947dbce7/mav_local_planner/src/mav_local_planner.cpp#L192-L193

If you trajectory is very long, your path index will never be as large as the queue size before re-planning. And as you don't expect to re-plan without collision avoidance you publish the exact same path and reset the path index at every re-plan, making you return to where you initially started.

A fix seems to be if you make it replan on an existing path similar as done here:

https://github.com/ethz-asl/mav_voxblox_planning/blob/a90260baaa07cd046847d7a237ab17e2947dbce7/mav_local_planner/src/mav_local_planner.cpp#L313-L339