We are currently working on a project to build our own ROV and we are using a Pixhawk as flight controller and the Ardusub simplerov firmware (we have four thrusters in the setup). All is fine and well when the Pixhawk is directly connected to the host computer (laptop) through USB. However, we would like to also integrate a Raspberry Pi 3 as a companion computer to be able to integrate autonomous functions. The Pi is already setup and flashed with the latest Ardusub-Raspbian image (updated 2017-01-12), but we have no idea how to connect QGroundControl from the laptop to the Pi, and then to the Pixhawk.
We are using putty to access the Pi through SSH in the laptop and is connected via Ethernet cable. The Pixhawk is then connected via USB to the Pi through the ACM0 tty port. The static ipâs of the laptop and the Pi are 192.168.2.1 and 192.168.2.2 respectively as per the instructions in the Ardusub site. How can QGC detect the vehicle when the Pixhawk is connected to the Pi? Also, is it necessary to have a Fathom-X interface for all of this to work? Thank you very much.
If you are using the ArduSub-Raspbian image, and your network is configured correctly, then you should be good to go. Please start with the troubleshooting section here, and let us know if you have any trouble with those instructions, or have any feedback to make them better.
How are you powering the Raspberry Pi? You should be using a 5V supply rated to deliver at least 2 amps. Iâll add this bit to the troubleshooting section.
No, an Ethernet cable is fine.
QGC always listens on a udp port for a MAVLink connection. On the Raspberry Pi with the ArduSub image, a program called mavproxy bridges the usb connection to the udp port on the surface computer. This program is launched at boot, and will encounter an error if the pixhawk is not already connected with usb before the boot.
I tried to follow the troubleshooting steps. I checked the USB cable connecting the Pixhawk to the Pi, and it works fine because I used it to connect the Pixhawk to the laptop directly and QGC was able to immediately detect the Pixhawk. I also allowed access for QGC in my firewall settings and pinged the Pi from the laptopâs command line. I was able to ping properly with low latency and no loss of packets. However, QGC still canât detect the Pixhawk when it is connected via the Pi.
Since we are still testing the setup, the Pi is powered by plugging directly to the wall with its own plug and adapter.
I donât think I have any encountered any errors. When I access the Pi through SSH, it just boots, prompts me to login, and then just waits for commands. At this point, QGC still canât detect the Pixhawk. Is there a way to check if the mavproxy program successfully launched?
The Pi has already booted up before you log in with SSH, it boots when you apply power, so the Pixhawk must be connected to the Pi before you plug the Pi into power.
After you log into the pi, you can type sudo screen -r mavproxy to see if mavproxy is running. Paste the output of that command here.
I also noticed that I am using a slightly older version of QGC. Can that be the cause of the problem? Also the box for Pixhawk in that section in my case is checked.
The âPixhawkâ box is for a direct USB connection, we are concerned with a UDP connection. Uninstall, then install the latest stable version. Then reboot both the surface computer and the ROV. Let me know if anything changes.
Are you using the same Windows 10 computer to access the Pi command line? Are you using PuTTY?
Okay, thanks for the link! I will download and install the latest version, and Iâll try to test it with the surface computer and the ROV first thing in the morning tomorrow (itâs about almost midnight here in the Philippines). Thank you for your quick responses thus far. Will let you know ASAP if there is anything that changes.
Yes, the Windows 10 laptop that I use as the surface computer is the same computer I use to access the Pi, and also yes, I use PuTTY.
Just checked it again today with QGC v3.1.2 and it finally worked! QGC was able to detect the Pixhawk while connected to the RPi and also the QGC also has video feed via the RPi camera.