Skip to content

Instructions – Installing Camera Pods

Building and installing the camera pods

The camera pods are what takes the pictures and send them over to the base station for motion tracking. They take 90 pictures per second each. Going forward we will recommend v2.1 of the Raspberry Pi Camera, you do need Raspberry 4 for these to work reliably with the Sleipnir Velocity Software used. These can run hot and active cooling, a fan may be needed. We recommend the LABISTS Raspberry Pie cases since it have the features needed.

  • A Camera mount for the raspberry Pi Camera
  • A standard mount for any normal tripod
  • Includes a fan mount and heatsinks
  • The Camera mount have the right rotation (tilted 90 degrees)

Due to the way the camera works it needs to be tilted 90 degrees, this is a hardware limitation to make it function properly at the resolution and framerate we are after. Go ahead and build your cameras by inserting the camera in the cameraport and adding a case.

You will need to build two of these with the only difference being the Hostname in raspi-config.

Take your Raspberry Pi 4 , insert the SD Card and HDMI Cable and boot it up.

Again, like with the router we will start out using raspi-config

sudo raspi-config

You are presented with a menu, perform these steps

1 System Options
   S4 Hostname
      vpod1 or vpod2
   S5 Boot / Auto Login 
      B2 Console Autologin

3 Interface Options
   P1 Camera
      Yes
   P2 SSH
      Yes

5 Localisation Options
   L2 Timezone
      None of the above
         UTC
   L3 Keyboard
      Your preferred keyboard layout

6 Advanced Options
   A1 Expand Filesystem

8 Update

<Finish>

Change frequency behaviour

We will fix the frequency on the camera pods so they to not clock down, it can lead to dropped frames we will need to add a line to /boot/config.txt

sudo nano /boot/config.txt

Add a line last in this file, save and exit

force_turbo=1

Reboot your Raspberry Pi to expand the filesystem

sudo reboot

After reboot upgrade your system to the latest packages

sudo apt update
sudo apt upgrade
sudo reboot

Installing Chrony NTP

On the camera pods we recommend using chrony NTP for time tracking. These will be clients and sync the time to the vroute NTP time server.

sudo apt install chrony

The Chrony configuration file is /etc/chrony/chrony.conf

sudo nano /etc/chrony/chrony.conf

Replace the content of the file with this

pool vroute.lan iburst minpoll 3 maxpoll 3
driftfile /var/lib/chrony/chrony.drift
makestep -1 3

Disable the default time sync softweare and enable chrony instead

sudo systemctl disable --now systemd-timesyncd
sudo systemctl enable --now chrony
sudo reboot

We will discuss later how you can check that the time is actually synced with the vroute NTP server

Disable unnecesary services

For performance reasons we will disable default software we don’t want

sudo systemctl disable --now cron

Installing Sleipnir Velocity software

In this step of the installation we will download git and the dependencies required to build the sleipnir camera software. The software is written in C and needs to be compiled.

Install git

sudo apt install git-core

Clone Sleipnir Velocity git repository

cd ~
git clone https://github.com/Lussarn/sleipnir-velocity-system.git

Install dependencies needed to build the camera software

sudo apt install libturbojpeg0-dev libcurl4-openssl-dev
sudo apt install libopencv-dev liblog4c-dev libpopt-dev

Build sleipnir

cd ~/sleipnir-velocity-system/sleipnir-pod/sleipnir
./build

You will now have a sleipnir-pod binary in the directory with source files, make a link to this binary in pi user home directory.

cd ~
ln -s ~/sleipnir-velocity-system/sleipnir-pod/sleipnir/sleipnir-pod .

We will later discuss how to run the software