# Change component value through mavlink python

**URL:** <https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255>\
**Category:** MAVLink\
**Created:** [August 2, 2019, 6:02am UTC](https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255 "2019-08-02T06:02:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aydal](https://discuss.px4.io/user_avatar/discuss.px4.io/aydal/32/4331_2.png) [@aydal](https://discuss.px4.io/u/aydal)\
**Post date:** [August 2, 2019, 6:02am UTC](https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255/1 "2019-08-02T06:02:23Z")

</div>

I wish to recreate the avoidance for MAVSDK-Python and for that I need to replicate the CompanionProcessStatus msg (status 4 to comp MAV\_COMP\_ID\_OBS\_AVOIDANCE) through python (preferrably pymavliink but any soultion will be really helpful). Any help and clarification on this would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [August 5, 2019, 2:18pm UTC](https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255/2 "2019-08-05T14:18:17Z")

</div>

So do I understand it correctly that you would like to write your own avoidance but on top of MAVSDK-Python?

This would mean that you probably need to add your own (C++) plugin which implements a few MAVLink messages. Once that works in C++, we can help you to get it exposed in the Python API.  
What you can’t really do is to add functionality directly in Python.

---

<div class="post-metadata">

**Author:** ![aydal](https://discuss.px4.io/user_avatar/discuss.px4.io/aydal/32/4331_2.png) [@aydal](https://discuss.px4.io/u/aydal)\
**Post date:** [August 21, 2019, 4:28am UTC](https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255/3 "2019-08-21T04:28:50Z")

</div>

Hey Julian,  
Do you have any guide on how to do that?

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [August 21, 2019, 9:33am UTC](https://discuss.px4.io/t/change-component-value-through-mavlink-python/12255/4 "2019-08-21T09:33:05Z")

</div>

For the C++ part check this:  
[https://mavsdk.mavlink.io/develop/en/cpp/](https://mavsdk.mavlink.io/develop/en/cpp/)
