ethz-asl / mav_trajectory_generation

Polynomial trajectory generation and optimization, especially for rotary-wing MAVs.
Apache License 2.0
528 stars 222 forks source link

Integration with PX4 #87

Closed bangyanz closed 5 years ago

bangyanz commented 5 years ago

Hi,

What do you think is the best way to use this trajectory with Pixhawk? PX4 currently does not have trajectory tracker. Sending position setpoints from the trajectory to PX4 position controller produces very bad trajectory tracking results. Do I have to do a geometric controller to fully use the advantages of the trajectory?

Thanks.

Jaeyoung-Lim commented 5 years ago

@bangyanz I have implemented a geometric controller for fun: https://github.com/Jaeyoung-Lim/mavros_controllers

You are free to look into it. It is currently missing the interface for mav_trajectory_generation so you are free to contribute!

One work around in using PX4 to track polynomial trajectories is to use setpoint_raw topics on mavros. PX4 supports tracking position and velocity as a feedforward therefore will be able to track the trajectory better than sending position setpoints.