I have been struggling with this issue for quite some time now.
I am trying to control a quadrotor using acceleration commands. My idea is to command the attitude and thrust using the /mavros/setpoint_raw/attitude. This seems to work, in the sense that the drone follows the commanded attitude and thrust. However, it’s not proper.
My issues are following:
If I need the drone to have an acceleration (ax,ay,az) in the ENU frame, how should I compute the quaternion to be commanded.
Currently I am using a PI controller on throttle to maintain the acceleration. Is there a better choice?
If I read the current position and velocity from topic /local_position, what is the reference frame.
Apart from IMU data, is any other value provided in body frame by MAVROS?
Any help is much appreciated.