# Setting attitude set point with pymavlink

**URL:** <https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766>\
**Category:** Build/Make\
**Tags:** ardusub, pymavlink\
**Created:** [January 28, 2020, 1:10pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766 "2020-01-28T13:10:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![arend](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@arend](https://discuss.bluerobotics.com/u/arend)\
**Post date:** [January 28, 2020, 1:10pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/1 "2020-01-28T13:10:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [January 28, 2020, 11:17pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/2 "2020-01-28T23:17:41Z")

</div>

Hi @arend,

Try the [code in this gist](https://gist.github.com/Williangalvani/6dac6849b26c83ec89756c03c95818b0).  
May I ask what is your goal with this? I’d like to know what people are using these things for.

---

<div class="post-metadata">

**Author:** ![arend](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@arend](https://discuss.bluerobotics.com/u/arend)\
**Post date:** [January 30, 2020, 1:28pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/3 "2020-01-30T13:28:21Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![arend](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@arend](https://discuss.bluerobotics.com/u/arend)\
**Post date:** [February 4, 2020, 10:51am UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/4 "2020-02-04T10:51:07Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [February 6, 2020, 3:12pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/5 "2020-02-06T15:12:29Z")

</div>

Hi @arend,

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

---

<div class="post-metadata">

**Author:** ![arend](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@arend](https://discuss.bluerobotics.com/u/arend)\
**Post date:** [February 14, 2020, 11:36am UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/6 "2020-02-14T11:36:29Z")

</div>

Hi @williangalvani,

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

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [February 14, 2020, 12:29pm UTC](https://discuss.bluerobotics.com/t/setting-attitude-set-point-with-pymavlink/6766/7 "2020-02-14T12:29:27Z")

</div>

Hi,

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