Setting attitude set point with pymavlink

Hello,
I was wondering if is it possible to set attitude setpoint to pixhawk with pymavlink ?
I’m trying to use the function set_attitude_target_send without any luck. I do not get any error or warning indication from pixhawk.

Im using ardusub with its current stable build.

Hi @arend,

Try the code in this gist.
May I ask what is your goal with this? I’d like to know what people are using these things for.

Thank you very much @williangalvani.
I will try your code.

Im using it to play around with some waypoint tracking and my own algorithm

Hello @williangalvani.

I’ve tried the code you gave me without luck. It does’nt seem that the blue ROV gets the yaw command.
Tried different yaw rates and thrust as well.
Any other ideas ?

Hi @arend,

My bad, this is not yet available in Ardusub stable. If you don’t mind trying beta, it should work there.

Hi @williangalvani,

You were right, works fine now.
Though other things like the simple examples from ardusub.com such as setting roll or throttle doesn’t work properly on beta :slight_smile:

Hi,

Thank you for reporting that, I will check what is going on.