Change Heading to +90 Degree from Pymavlink on Stabilize Mode

Hi,
Currently, I am using pymavlink to control the Pixhawk in my AUV. We are using Stabilize mode to keep the AUV straight and go forward. But at some point I want the AUV to turn 90 degrees right/left.
How can I do that from pymavlink?
And I also want to control the GAIN Up and Down with pymavlink. What parameter should I change for that?

Thank you.

Hi,

Attitude control is only possible with the master branch of ArduPilot, there is no such thing in the stable firmware since this is a development feature.
You can check more about it here and in SET_ATTITUDE_TARGET.
To accomplish the angle change with the stable firmware version, you should use our Send RC example and control the channel 4 until you get the desired angle.

1 Like

Hello,
So if I add those three changes to the stable version 3.5.3, and build the firmware, this feature should work, right?

Hi, Patrick
We compiled the code and updated our Pixhawk.

master.mav.set_attitude_target_send()

I am trying to use this command to set the target. Can you show me any documentation on how to send mavlinkcommand from pymavlink.
I am, using pymavlink in python 3.5

Thank you

We have some pymavlink examples on ardusub.com. Check also the mavlink documentation.