Raspberry Pi 3B+ which OS ? Jessie or Ubuntu mate?

#1

Hello !
I am currently using Pixhawk 4. For raspberry pi 3B+, which OS should I use ? According to the link https://dev.px4.io/en/ros/raspberrypi_installation.html I should use Jessie. Was just curious to know …

1 Like
#2

Ubuntu mate is currently not compatible with pi 3B + . Going with Raspbian stretch !!

#3

You can go with a regular Ubuntu Xenial or Trusty

Most of the ROS stuff work better on Ubuntu

1 Like
#4

Hello @Jaeyoung-Lim !
I have taken a look at the page you mentioned. According to it I can use images of Pi 2 on 3B+. However the procedure is too lengthy. I have currently flashed raspbian stretch on my pi and have additionally installed ROS kinetic on it. Let me know if I am on the right track. Also I am using your pages on 404 warehouse. Thanks much for those tutorials , they are very helpful.

#5

Hello @Jaeyoung-Lim !
I am currently facing issues installing mavros on Raspbian stretch. You were right there, I will need Ubuntu. Will be ordering a pi 3 soon since I am unable to follow the link you attached for 3b+.

#6

@Vrinda I was able to use Ubuntu on the pi3 B+. It should be working

#7

@Jaeyoung-Lim, did you follow the procedure from https://wiki.ubuntu.com/ARM/RaspberryPi and flashed the image of pi 2 on pi 3B+ ? I am finding it difficult to implement .

#8

@Vrinda Have you tried flashing one of the unofficial images?

#9

According to the link, unofficial ones are not supported on B+ @Jaeyoung-Lim

#10

@Jaeyoung-Lim , I tried unofficial image on pi 3B+. It does not work.

#11

You need to build mavros from scratch, I use arch, I build everythings from source.

ROS is not easy to install and may have some complicated dependency, you have to install
only what you need. For RPI, whatever system you use, you can build ROS all the time, just
be aware that you need not to install the entire ROS libraries.

I would choose arch for RPI. Operating system is not that important.

1 Like
#12

Here’s how I did it. FYI, I use a script I wrote for DIYRoboCars to copy an rPi image, tweek the wifi, hostname and setup a ssh authenticaion between PC and rPi( that’s what script-zipdd does ) but you can do it manually too. BTW, it all is installed with Python 2 but our DIYRoboCar NN stuff and TensorFlow is Python 3 so I added a Python 3 virtual env at the end of the script.

xz -d cxcore-ubuntu-18.04-minimal-aarch64-raspi3b-raspi3b-plus-stable-20180827-chainsx.img.xz
zip -9 cxcore-ubuntu-18.04-minimal-aarch64-raspi3b-raspi3b-plus-stable-20180827-chainsx.img.zip cxcore-ubuntu-18.04-minimal-aarch64-raspi3b-raspi3b-plus-stable-20180827-chainsx.img
script-zipdd ~/Downloads/cxcore-ubuntu-18.04-minimal-aarch64-raspi3b-raspi3b-plus-stable-20180827-chainsx.img.zip dougs-rosbot

sudo vi /lib/systemd/system/wpa_supplicant.service
ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
##sudo vi /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service
#ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
#sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/wpa_supplicant.service
#ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
##sudo systemctl enable wpa_supplicant1.service

sudo cp dhclient.service /etc/systemd/system/
sudo systemctl enable dhclient.service
sudo systemctl start dhclient.service
sudo cp -a /home/pi/.ssh /home/ubuntu/
sudo chown -R 1000:1000 /home/ubuntu/.
ssh ubuntu@dougs-rosbot.local
sudo adduser pi
sudo vi /etc/group  # add to sudoers and all others "ubuntu" is on

reboot
sudo apt update && sudo apt upgrade

sudo apt install git
git clone git clone https://github.com/ryuichiueda/ros_setup_scripts_Ubuntu18.04_server.git
cd ros_setup_scripts_Ubuntu18.04_server
./step1.bash

sudo apt install ros-melodic-mavros ros-melodic-mavlink ros-melodic-mavros-extras ros-melodic-robot ros-melodic-xacro ros-melodic-robot-state-publisher ros-melodic-joint-state-publisher ros-melodic-sick-tim
sudo apt install ros-melodic-control-toolbox 

wget http://downloads.sourceforge.net/project/geographiclib/geoids-distrib/egm96-5.tar.bz2
tar -xf egm96-5.tar.bz2
sudo mv geoids /usr/share/GeographicLib/
#OR
#sudo /opt/ros/melodic/lib/mavros/install_geographiclib_datasets.sh

source /opt/ros/melodic/setup.bash

edit /etc/netplan/01-netcfg.yaml #see local copy

sudo apt install avahi-daemon
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service


sudo apt install python-pip
sudo pip install supervisor
sudo mkdir /var/log/supervisor

sudo apt-get install python-dev python-opencv python-wxgtk3.0 python-pip python-matplotlib python-pygame python-lxml python-yaml
#sudo apt install python-lxml python-yaml python-matplotlib
sudo pip install MAVProxy

sudo systemctl enable supervisor.service
sudo systemctl start supervisor.service
sudo /usr/bin/python /usr/local/bin/supervisord -n -c /etc/supervisor/supervisord.conf

# https://ardupilot.github.io/MAVProxy/html/getting_started/download_and_installation.html
# MavProx - web site installation says to install the following:
#sudo apt-get install python-dev python-opencv python-wxgtk3.0 python-pip python-matplotlib python-pygame python-lxml python-yaml
# but there's too much X11 stuff getting loaded so I didn't install most of it.

sudo apt install python-lxml python-yaml python-matplotlib
sudo pip install MAVProxy

PYTHON3 
sudo apt install virtualenv
sudo apt install python3-yaml
sudo apt install python3-netifaces
virtualenv -p python3 ~/env
source ~/env/bin/activate
pip install PyYAML
pip install rospkg
pip install netifaces
python3 ./compassHeading.py
1 Like
#13

Hello @shrit !
I tried installing mavros from source , It gave me some errors especially when I was installing the geographic libraries, saying that my OS is not supported. However I will try using arch. Thanks much !

#14

Hello @dlarue !
Thank you for those detailed instructions. I will try your method.

#15

Even if you use arch it will say that the operating system is not supported

You need to install the dependencies of mavros before trying to install mavros itself !

You can have look at the source code of the catkin installation files. Only some operating system are supported to
to allow downloading the dependencies.

#16

Thanks @shrit ! I will try installing the dependencies. Which OS are you using ?

#17

I am using arch linux

#18

Okay ! I will try again ! :slight_smile: Thank you for helping me on this.