Home        Store        Docs        Blog

Ardusub initial setup

(Vegard Stürzinger) #1

Hi guys, i am trying to use the ardusub with the pixhawk.
When i try to run sudo ./rov-setup.sh in the companion directory it doesent run.
I checked the directory and i couldent find the .sh file, i found a ./setup.sh file and tried to run that but that didnt work either.

Has anyone done this step and be willing to help me out a bit? i tried connecting the pixhawk direcley to the computer and i calibrated it but it still gives me an error because i havent connected a radio controller.

Any input is appreciated, thanks in advance :slight_smile:

(Rusty) #2

Hi Vergard,

The companion scripts are still a work in progress! We just started adding those a few weeks ago.

For now, please copy and paste the commands from setup.sh to the terminal and run them one by one. Please check to make sure everything completes successfully.

Regarding the radio, you can “calibrate” the radio using the joystick once you set up the joystick. That will cause the radio error message to go away.



(Vegard Stürzinger) #3

Thank you very much rusty!
I tried compiling again from scratch using the ardusub bluerov and when i tried compiling the software i got this error (see picture) is there any solution for this or should i just wait untill there are new fixes in the github?

Apparently the get_safe_depth is missing?


Again thank you in advance for any help :slight_smile:

(Jacob) #4

The directory must be named ‘ArduSub’, you have ‘ardusub’. Rename it, and try compiling again.

(Vegard Stürzinger) #5

Thanks Jacob, that worked!
Everything worked as it should, but now i have problems with getting the mavproxy to work, i can run the mavproxy command on the raspberry, but the qgroundcontrol wont connect. I tried setting the udp port in preferences and using the IP for the Raspberry pi but it still doesen’t connect to the pixhawk.
I attached the output from when i ran the <strong class=“final-path”>start_mavproxy_telem_splitter.sh

I don’t really expect you guys to help as i assume you have better things to do, but thank you very much!

(Rusty) #6

Hi Vegard,

Let me explain the current command in start_mavproxy_telem_splitter.sh and hopefully that will help.

mavproxy.py --master /dev/ttyACM0,115200 \
            --master /dev/ttyAMA0,57600 \
            --out udpin:localhost:9000 \
            --out udpbcast:

The first two lines try to open the serial port on ttyACM0 (USB) and ttyAMA0 (direct serial). You might want to remove whichever one you aren’t using, but it appears that you are connecting correctly.

The third line listens for incoming mavlink messages on the Raspberry Pi’s port 9000.

The last line broadcasts the outgoing mavlink messages on port 14550. The IP address is, which will broadcast to all computers with IP addresses in the form of 169.254.xxx.xxx. You must make sure that your host computer (laptop) has an IP address that works with that. Otherwise you can change it in the script.



(Vegard Stürzinger) #7

Yes, great i edited the lines a little, and now i worked!
Thank you guys very much! Not only do you make great products but you also take the time to help newbies like me :slight_smile:

Soon its time for some pool testing :smiley:

(Jonathan Santrovitsch) #8



To setup the resolution of the camera of the Raspberry pi, I need to change something on the “start_mavproxy_telem_splitter.sh”? I open this file on the raspberian and see some resolution to low (640x480).

Can you explain how the right mod’s to work with full HD? I know that have some latency, but I prefer quality image.



(Rusty) #9

Hi Jonathan,

Can you tell me where you see that line? Make sure you’re using our fork of the “companion” repository here: https://github.com/bluerobotics/companion

The section with 640x480 is commented out so it uses the lower section, which specifies a “mode” instead of resolution. This is the proper mode for HD video.

Let me know if that helps.


(Jonathan Santrovitsch) #10

Hi Guys,

I try to put to work the comunication of the RPi, Pixhawk and the QGround for 2 days, but without success. I make all on the Ardusub web page, I setup a fix ip on RPi, and nothing make connect with QGround. I can use Putty over the ip and use the terminal of RPi for do everything’s. My be some Good Guy can send all steps to do this to work? The pixhawk are ok, because I test with the usb cable and work ok.



(Rusty) #11

Hi Jonathan,

Okay - sorry you’re having trouble! This is all pretty new still but we’re trying to make things easier. What does the printout look like when you run “start_mavproxy_telem_splitter.sh” or “start_video.sh”?

We very recently put together better instructions for the Raspberry Pi setup: http://ardusub.com/raspi-setup/

This might help as well.


(Jonathan Santrovitsch) #12


Now I believe that are all ok with the Companion. But I receive this mensage when tra connect by the UDP.



(Rusty) #13


Okay. Can you tell me what version of mavproxy you are using on the Pi? You can find that out by typing

mavproxy.py --version

on the Raspberry Pi terminal.


(Jonathan Santrovitsch) #14



(Jonathan Santrovitsch) #15


I try the “sudo screen -r mavproxy” to check if work, put I think is not (attached nr1). I try connect a bluetooth module on the Telemetry port 1 of the Pixhawk to check if I can connect over them, but no connect to. I believe is some wrong with the serial port on the firmware of pixhawk. I can communicate with the RPi over the network by Putty. If I use the command “sudo screen -r video”, the terminal show the files work (attached nr2).

I know that make many questions, but I have all boards e parts of the ROV in hands and can’t use!

Jonathan Santrovitsch


(Rusty) #16

Hi Jonathan,

Okay. It seems that something is causing the mavproxy process to end early. That’s why there is no screen available for it. Can you try running the the mavproxy command directly through putty?


Can you also tell me how you have everything connected? You’re using the USB from the Pi to the Pixhawk, correct?


(Jonathan Santrovitsch) #17


Finally I can connect to Pixhawk to QGround. I connect the USB of Raspberry to usb of Pixhawk. My mystake is to try to connect the raspberry over the serial port to telem1 of pixhawk. Just now I don’t have video of the camera. I need just these last help! You have more an rabbit in top hat!!!

You Are The Best!


(Jacob) #18

You can have raspberry pi connected to telem 1 if SERIAL1_PROTOCOL parameter on pixhawk is set to mavlink, and you specify the port for mavproxy to listen to /dev/ttyAMA0 (rpi2 UART) instead of /dev/ttyACM0 (pixhawk identification when connected via usb).

The change would need to be made here:

You would also need to make sure that the SERIAL1_BAUD parameter was set appropriately to match.

Also, to get video working, you need to make sure that the host ip matches the ip address of your laptop or computer communicating with the pi:


(Jonathan Santrovitsch) #19


attached is the setup of my “start_video.sh” file, also IP config of my PC, udp setup Qground and a a print screen of Putty with the comand “sudo screen -r video”.

The pixhawk connect to the Qground and work perfect. just no video on Qground. I don’t know were is my mystake, because I check my times all steps, follow all of ardusub website.


(Jacob) #20

In QGC IP needs to match computer QGC is on, and IP that is specified in start_video.sh. Change to