Hi all,
I am trying to send attitude and thrust commands in simulation but (as per the title) I have been unable to do so. In offboard mode, I am publishing thrust and attitude commands to /setpoint_attitude/attitude
and /setpoint_attitude/thrust
. I have a controller that determines the attitude to apply a desired force on the quadrotor. Since the attitude commands must be quaternions, I am converting the euler angles (from my controller) to quaternions using the tf.transformation library. I should note that the parameter /mavros/setpoint_attitude/use_quaternion
is set to true.
I have two main issues:
- Cannot find throttle at hover.
- Attitude commands are seemingly doing nothing.
I am mostly concerned about the first point. How have people done this in the past? I have a script which makes the quadrotor hover at a desired height for 20 seconds. I save this throttle value and start publishing it to /setpoint_attitude/thrust
alongside my attitude commands. However, the quadrotor immediately plummets and then hovers at around 0.5m above ground…
I have checked and I am publishing commands to the correct topics.
If anyone has got this to work, could you share some insights?
Thanks in advance!