markwmuller/RapidQuadrocopterTrajectories

How to generate command?

Closed this issue · 2 comments

Dear @markwmuller and all
Thank you for sharing your great work!
I am trying to use RapidQuadrocopterTrajectories in my drone.
Your demo code shows that how to generate optimal trajectories and how to test their feasibility.
My question is when feasibility test passed trajectory is calculated, how to make command position or velocity which will give to control unit (in my case, I give position command through mavros to Pixhawk)?
At each time sample, new optimal trajectory is generated and drone must follow some command at that moment. But trajectory have time dependent positions or velocities and it is not possible giving all the positions as a command at that moment.
Would you explain how to make command in your work?

Thank you and I appriciate again your work.

I suggest that you read through the paper where we describe how we used the trajectories.

Dear @markwmuller . Thank you for your reply
I read your papers and Markus Hehn`s papers also. Among them, "Quadrocopter Trajectory Generation and Control" shows that your control inputs are wx,wy and a(thrust) while wz = 0. And these value is calculated by averagery the control inputs over the control interval. Am I understand correctly?
If so, how to calculated thrust command using thrust of rapidTrajectory algorithm?
Your algorithm gives thrust value as m/s^2 unit. But in pixhawk command thrust command is mavros/setpoint_attitude/att_throttle and it requires 0 - 1 value, which is percentage of throttle.
How can be changed the algorithm result to px4 command value?

Thank you again for replying my question.