ZJU-FAST-Lab / ego-planner-swarm

An efficient single/multi-agent trajectory planner for multicopters.
GNU General Public License v3.0
1.2k stars 231 forks source link

Yaw for trajectory optimization? #18

Closed Pallav1299 closed 2 years ago

Pallav1299 commented 3 years ago

Thanks for the great work. I am no expert in path planning but after brief overview of the code, I noticed that yaw is not used for optimizations and is generated using interpolation from traj_server. Am I right? If yes, why so?

bigsuperZZZX commented 2 years ago

Yes. To make a safe flight, the drone should look ahead, i.e., roughly point along with the velocity direction.

Pallav1299 commented 2 years ago

@bigsuperZZZX, thanks for your reply. I noticed that you used a front facing D345/D345i camera. Am I right? I used a similar configuration while testing in simulation. With the default planner config I noticed that the drone to do translation+rotation at the same time. How do you manage the situation where the obstacle and the goal are in the backward direction? I know this is related to MAX_YAW_RATE, MAX_VEL and MAX_ACC. If I keep the max_yaw rate to be high(default 3.14rad/sec), the drone in simulation crashes (I believe, it has something to do with the drone controls in simulation). So, to correct the same I have to reduce the all the above params to achieve rotation in-place.

What are your views on this?

bigsuperZZZX commented 2 years ago

Yaw control in simulation is really poor, so just leave it. A well-turned real drone can rotate its yaw agilely(typically above 3.14rad/sec).

Also, maybe you can try to improve the yaw control quality and we would appreciate it.

Pallav1299 commented 2 years ago

What I noticed while testing is that the drone is not able to follow the planned trajectory is certain situations and since the planning and execution parts are decoupled, it leads to failures/collisions. Have these failure cases already been handled or do we need to add our own?

bigsuperZZZX commented 2 years ago

Tracking error is unavoidable in simulation or real-world implementations. What situations are you encountered, could you show me some pictures?