It would be great if you could add support for current Ubuntu LTS for arm64, enabling to use Ubuntu+Navio2 with Raspberry Pi 3 and 4. This would be an awesome feature if you want to use ROS without Ardupilot, such as my case, or even better to move forward to the new ROS2 middleware, fully supported by Canonical in their Raspberry releases.
Since ROS/ROS2 binaries are available for the arm64 architecture, not to mention all the dependency libraries, it would make a lot easier to integrate ROS/ROS2 solutions with Navio2 and a direct interface to Navio2 such as:
Here are listed the steps I did so far and the results obtained:
After a fresh install of Ubuntu 20.04:
sudo apt-get install libnss-mdns
to get Zeroconf working
Then, I modified
/boot/firmware/usercfg.txt in order to enable SPI and I2C
dtoverlay=pi3-disable-bt dtparam=spi=on dtoverlay=spi0-4cs dtoverlay=spi1-1cs,cs0_pin=16,cs0_spidev=disabled dtoverlay=rcio dtoverlay=navio-rgb dtparam=i2c1=on dtparam=i2c1_baudrate=1000000
Install pigpio from source, since it is not available in the Ubuntu repositories
Download Emlid Navio2 C++ examples from
The examples compile and run as root. This is due to permissions in the devices. You can modify udev rules and and groups to let users access the SPI devices.
Access to MPU IMU, GPS and RGB led work.
What did not work?
Access to LSM IMU did not work. I suppose this is because Ubuntu does not have the
spi0-4cs overlay which I think enables 4 slaves to the spi-0 port. Perhaps we could copy the binary overlay from the Raspbian Emlid distribution (which I am not sure about) or try to make one. Maybe this helps to write an overlay https://www.raspberrypi.org/forums/viewtopic.php?p=821666#p821666
I could install
rcio-dkms on the default Ubuntu kernel and load the rcio kernel modules after following instructions from https://github.com/emlid/rcio-dkms but the suggested test
fails and the rcio overlay is not generated (but I don’t know if it should).
If some instructions were provided by Emlid, I would be happy to try them on my Raspberry Pi 3 with a Navio2 and report any issue.
I would like to add that I tried using the lastest Debian Buster image from Emlid, which comes with ROS Kinetic preinstalled. However, the Navio2 ROS nodes from https://github.com/gmsanchez/navio2_ros crash with segfault, and at compile time, I get some ldd errors from libboost, which says that roscpp needs version 1.58 and that Raspbian has 1.67. Tried to solve by downgrading to libboost-1.58-dev, but the system wanted to uninstall ros-kinetic packages. I also tried to compile ROS Noetic from source, but I am stil struggling to get rosdep to run and it is a time consuming workaround.
As a matter of fact, several users could be interesting in developing other solution than Ardupilot, therefore could be very customer-oriented to make a wiki page referring to the steps to install and configure Navio2 with Ubuntu arm64 releases, to enable all these customers to develop their functionalities with Emlid hardware.