How to use Ardupilot on x86 Ubuntu (HAL_Linux)?

Hi to all,

I have no experience with Ardupilot and I would like to use it on my tracked robot which has an industrial Pc onboard running Ubuntu 18.04 with a i5 CPU. The computer is connected to a RTK Ublox GPS, Xsens IMu and encoders.

Is it possible to use ardupilot in my situation? I downloaded APM Planner and I can correctly run it on my system (I can see the map and I can set the waypoints) even if it asks me to connect to pixhawk but I don’t have that board.

Both the GPS and the IMU are connected via USB and I usually run the system under ROS.

Is there any chance to use Ardupilot on my system or do I need to purchase a Pixhawk board without using my onboard pc?

Thank you!

It does run on linux systems like the RaspberryPi, BeagleBone and others. So it should be possible.

https://ardupilot.org/copter/docs/common-beagle-bone-blue.html

1 Like

Thank you for your answer and support!
I’ve read the link and if I am not wrong, it is possible to use beaglebone because there is an Ardupilot version developed for the bleaglebone, but I do not know if there is any version for Ubuntu on x86 architecture.

I tried to search on google, but I found nothing.

Moreover, how the motor commands are generated by Ardupilot?
I usually commands the robot motors with a ROS node.

It runs on Ubuntu linux on x86 architectures, but it will assume that you want a SITL, and not a real vehicle.
So you will need to figure out how to tell ArduCopter that it is on a vehicle. And you need to write your own device driver to talk to the motors.

1 Like

Thank you again for the support! It is not a problem to write a code to control the motors.
The main problem for me is how to feed the arducopter with the GPS data and how to read the controls generated by arducopter to make the motor move.
In this way, I could write a driver to redirect the GPS data to arducopter and also another driver that takes in input the arducopter motor commands and translate them as output in correct motor commands for my architecture.

Hi @marcusbarnet ,

Using arducopter on beaglebone (bbbmini is a cape with imu and baro) you need the rt kernel .
There is a way to interface arducopter to ros too.
Using gpio o control the motors mainly(at least with beaglebone) the latency is too high, so under bbbmini the motor and rcinput is done using the pru.

1 Like

Hello @juvinski, thank you for your help.

The only problem is that beagle board is based on ARM and I see that there is a github dedicated to its integration with ardupilot so I think it should be more complicated to install it on a x86 architecture. I wasn’t able to find any document about it, unfortunately.

What I would like to understand is if it is possible to replace a board like pixhawk with standard pc running on ubuntu and by giving the GPS and IMU data via USB and output the motor commands by using a rs232 port.

In the meanwhile, I ordered a pixhawk board since I never used ardupilot and I would like to learn it by studying a standard case.

We have an Hardware Abstraction Layer for Linux (ardupilot/libraries/AP_HAL_Linux) that partially does what you want. But yes, you will need to expand it.

A small overview of the architecture is at:
https://blog.cychen.me/2020/04/16/how-threads-run-in-ardupilot-in-linux-ap_hal_linux/

1 Like

Thank you! As soon as I receive the pixhawk board, I’ll try to run some tests with the standard system in order to better understand how it works and then I’ll start to develop the code to make it work as I need.
It won’t be easy, but I guess the HAL is a good starting point!

Hello everyone, I want to try pure Linux with a CAN-BUS interface. I think that not any platform RPi, X86, etc. will work with CAN bus. Since there is AP-Perith in Ardupilot. All end devices can be connected via CAN-Bus. Is it possible?