# Using Raspberry Pi as Companion Computer running H-infinity Controller

**URL:** <https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699>\
**Category:** PX4 Autopilot\
**Created:** [November 4, 2019, 6:51pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699 "2019-11-04T18:51:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![srvsinha](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@srvsinha](https://discuss.px4.io/u/srvsinha)\
**Post date:** [November 4, 2019, 6:51pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/1 "2019-11-04T18:51:21Z")

</div>

Hi,  
I want to use Raspberry Pi 4B as a companion computer with Pixhawk 4 which will read sensor data from Pixhawk, run the h-infinity controller and send the computed actuator values to Pixhawk.  
Is it possible to do this? I have no prior experience using a companion computer. I have read that there are different ways to communicate like using Dronekit, MAVROS, MAVProxy, etc. What is the frequency at which they communicate? Also, which would be the best way to communicate and where can I find more details about them.

I will really appreciate any help.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Pedro\_Fillastre](https://discuss.px4.io/user_avatar/discuss.px4.io/pedro_fillastre/32/4954_2.png) [@Pedro\_Fillastre](https://discuss.px4.io/u/Pedro_Fillastre)\
**Post date:** [November 4, 2019, 8:23pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/2 "2019-11-04T20:23:42Z")

</div>

Hi,  
The mains ones are MAVROS and Dronekit both really nice, if you already know some ROS, MAVROS is the default choice, if is your first time dronekit would be faster to take in hand,

You can find a tutorial of Dronekit here [https://auterion.com/getting-started-with-mavsdk-python/](https://auterion.com/getting-started-with-mavsdk-python/) and several examples in github [https://github.com/mavlink/MAVSDK-Python/tree/master/examples](https://github.com/mavlink/MAVSDK-Python/tree/master/examples)

For MAVROS you can find a working example in the documentation [https://dev.px4.io/v1.9.0/en/ros/mavros\_offboard.html](https://dev.px4.io/v1.9.0/en/ros/mavros_offboard.html)

For both you need to setup your system as mentioned here [https://dev.px4.io/v1.9.0/en/companion\_computer/pixhawk\_companion.html](https://dev.px4.io/v1.9.0/en/companion_computer/pixhawk_companion.html)

Is really nice that you are using Hardy-Space, is being long time I din’t see anything new in that nowadays is all ml with dnn.

Good luck and hope to see your results

---

<div class="post-metadata">

**Author:** ![srvsinha](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@srvsinha](https://discuss.px4.io/u/srvsinha)\
**Post date:** [November 4, 2019, 10:37pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/3 "2019-11-04T22:37:24Z")

</div>

Thank You! I will look into both options.

---

<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:** [November 5, 2019, 2:13pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/4 "2019-11-05T14:13:43Z")

</div>

@Pedro_Fillastre you are bringing up DroneKit and linking MAVSDK. That’s not the same thing, Dronekit was developed to work with ArduPilot. MAVSDK has been developed mostly to be compatible with PX4 (for now).

@srvsinha I suggest to check out [MAVSDK](https://mavsdk.mavlink.io/develop/en/index.html) if you’re not planning on using ROS and try [MAVROS](http://wiki.ros.org/mavros) if you’re going to use the ROS ecosystem.

---

<div class="post-metadata">

**Author:** ![srvsinha](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/ecc23a/32.png) [@srvsinha](https://discuss.px4.io/u/srvsinha)\
**Post date:** [November 5, 2019, 4:41pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/5 "2019-11-05T16:41:01Z")

</div>

@JulianOes Thank You! For now, I am going ahead with MAVROS as it is well established and a proven technique.

---

<div class="post-metadata">

**Author:** ![Pedro\_Fillastre](https://discuss.px4.io/user_avatar/discuss.px4.io/pedro_fillastre/32/4954_2.png) [@Pedro\_Fillastre](https://discuss.px4.io/u/Pedro_Fillastre)\
**Post date:** [November 5, 2019, 9:17pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/6 "2019-11-05T21:17:46Z")

</div>

@JulianOes my bad, I was thinking MAVSDK and I write Dronekit, sorry for the confusion

---

<div class="post-metadata">

**Author:** ![rroche](https://discuss.px4.io/user_avatar/discuss.px4.io/rroche/32/17635_2.png) [@rroche](https://discuss.px4.io/u/rroche)\
**Post date:** [November 6, 2019, 3:48pm UTC](https://discuss.px4.io/t/using-raspberry-pi-as-companion-computer-running-h-infinity-controller/13699/7 "2019-11-06T15:48:38Z")

</div>

@Pedro_Fillastre it happens ¯\_(ツ)\_/¯
