HKUST-Aerial-Robotics / Fast-Planner

A Robust and Efficient Trajectory Planner for Quadrotors
GNU General Public License v3.0
2.4k stars 665 forks source link

About flying height #10

Closed qmoji closed 4 years ago

qmoji commented 4 years ago

This is absolute great work! But Is it possible to limit or fix the flying height? because it plans to fly over a wall. Screenshot from 2019-11-22 19-36-20

Screenshot from 2019-11-22 19-37-40

GigaFlopsis commented 4 years ago

Yeah! Will be better if you add the description of planner parameters from .launch file.

ZbyLGsc commented 4 years ago

@qmoji Theoretically this is caused by the limited sensing range of the sensor. The drone can not observed the regions overhead, and those regions are treated as collision free. In this case trajectories going over the walls, which is optimal depending on the currently available information, are generated.

Currently you can resolve this problem by reducing the control input in z axis of the path searching (in kinodynamic_astar.cpp, um << ax, ay, az, reduce the possible values of az). This will make the drone takes less effort to change its height. Also, if you know the height of the ceiling, you can set the height in the .launch file directly (), so that region above it are treated as obstacles.

qmoji commented 4 years ago

@ZbyLGsc thank you very much! I set ceil_heightas 1, and i got this... Screenshot from 2019-11-24 09-20-02 so i made some changes to the code:

for (double az = 0; az <= max_acc_ + 1e-3; az += max_acc_ * res)
{
  um << ax, ay, az;
  inputs.push_back(um);
}

it seems to work! Screenshot from 2019-11-24 09-33-11