Closed jbourne15 closed 5 years ago
If you want to do XYZ Yaw, you need to specify 4 dimensions and be careful about angle wrapping. This underlying library has no understanding of angles vs. positions; it just assumes scalars. For MAVs specifying R and P makes no sense as they are a function of instantaneous acceleration; only yaw is decoupled. I can try to dig up some sample code for you, but as reference we usually plan position-space trajectory first then plan yaw separately and append the trajectories as they're completely independent.
Thanks for the reply, this makes sense.
Can someone help me understand adding constraints for ORIENTATION.
I have specified 3 vertexes, in which the middle one has a position and orientation constrain. I am confused about how to specify to actual constraint. I have tried
middle.addConstraint(mav_trajectory_generation::derivative_order::POSITION, Eigen::Vector3d(2,2,2)); middle.addConstraint(mav_trajectory_generation::derivative_order::ORIENTATION, Eigen::Vector3d(R,P,Y));
Also, the dimension of the trajectory is 3, so do I need trajectories in RPY for this constrain to work?