ELISSA Wiki

Install the On-Board Software on the Hamilcar Freeflyers

A guide to the installation of the OBS for the Hamilcar freeflyers (and the force measurement on-board Hannibal) is presented here.


Table of Content:


Other usefull pages: Hamilcar Freeflyers, SSHuttle


Creating the SD Card

As the Freeflyers are utilizing Raspberry Pis as on-board computers, the OS must be loaded to a SD card. To decrease the effort with the installation of the ROS environment, an already existing iso image can be used. The image of the Red Five OBS can be found on the Sansa Computer Desktop.

The image can be loaded on the SD card using the WindDiskImager running on Windows. The same should be possible using the Raspberry Pi Imager on Linux, but was not successfull on the last attempts.

Updating the On-Board Software

SSHuttle Installation

To simplify the next steps, SSHuttle should be installed first. If not internet is available on the Raspberry Pi, the follow the detailed description provided on the sshutle page.

Change the MAC Adress

Next, the MAC adress must be changed. As the ip adress is updated automatically, the MAC adress is bound to the image file of Red Five. To avoid issues if both systems are online at the same time, the adress must be replaced by a random adress. The next steps follow this guide. First, connect to the internet (via sshuttle if necessary) to install the following package:

sudo apt-get install macchanger

Disable the network (maybe disconnect from sshuttle), set a random MAC adress and enable the network again.

sudo ip link set eth0 down
sudo macchanger -r eth0
sudo ip link set eth0 up

Update the ROS Files

To ensure a clean integration in the existing ROS network, the follwoing files must be updated to the new ip adress of the OBC:

File Change
.bashrc ROS_IP
  ROS_HOSTNAME
env.sh ROS_HOSTNAME

### Enable GPIO Access

For the force measuremenet and other features, an access to the GPIO pins is necessary. Be sure, that the current user is part of the gpio group (or create the group):

sudo adduser ubuntu gpio

Check the current permissions of the /dev/gpiomem file:

ls -l /dev/gpiomem

If the gpio group has no access, you must allow the group to access the mem and give read and write control:

sudo chown root.gpio /dev/gpiomem
sudo chmod g+rw /dev/gpiomem

As the /dev folder is created with the boot process, you must give these permissions after every launch. To provide these permissions permanantly, you must create a udev rule:

nano /etc/udev/rules.d/gpio.rules

Add the follwoing rule:

KERNEL=="gpiomem", GROUP="gpio", MODE="0660"

If any problems occur, follow one of these guides.