Skip to content

Total station master installation

Effie Daum edited this page Nov 22, 2024 · 6 revisions

For Lora connection we use this dongle.

sudo apt install dkms
cd ~/repos/
git clone https://github.com/rogerjames99/spi-ch341-usb.git
cd spi-ch341-usb
ls /dev
stty -echo raw speed 115200 < /dev/ttyACM1 && cat /dev/ttyACM1

Steps to setup raspberry pi:

  1. Wait for cloud-init to finish (around 2 minutes)
  2. Fail for password login so:
sudo reboot
  1. Login with user: robot, password: you know what
  2. Optionnal: Setup keyboard layout -> Canada International: sudo dpkg-reconfigure keyboard-configuration

Fix ethernet connection

More on ethernet connection: netplan connection

  1. Modify netplan network config:
sudo vim /etc/netplan/50-cloud-init.yaml

The file must have the following content:

network:
    version: 2
    renderer: networkd
    ethernets:
        eth0:
            dhcp4: true

Using the wired connection (eth0), that is the same as eduroam, we can now ssh into the rpi.

  1. Try the new network configuration:
sudo netplan try
  1. Apply the modifications made to the network config file:
sudo netplan apply
  1. Execute the updates:
sudo apt update
sudo apt upgrade
sudo apt install network-manager
sudo apt install micro
sudo apt install nmcli
  1. Reboot:
sudo reboot

Now we can ssh into the rpi using ssh robot@IP_adress

  1. To know the IP_adress use:
ip a

Set static IP_adress:

IP adress guide

Install ros2 humble

Installation guide

There is a couples of different commands for ros2 installation in rpi: ros2 installation on rpi

  1. Only install the ros-base version:
sudo apt install ros-humble-ros-base
  1. Install colcon build and rosdep:
sudo apt update
sudo apt install python3-colcon-common-extensions
sudo apt-get install python3-rosdep
sudo apt install build-essential
  1. Source in the bash:
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
  1. Create ros2 workspace:
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws
  1. Colcon build:
colcon build
  1. Create symlink build file:
sudo micro symlink_build.sh

The file should look like this:

#! /bin/bash
rosdep install --from-paths src --ignore-src -y -r
colcon build --symlink-install
source ~/ros2_ws/install/setup.bash
sudo chmod +x symlink_build.sh

Clone the packages needed:

  1. First we need to create the ssh key for Github:
#!/bin/bash
ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat .ssh/id_rsa.pub

Add this key to Github: new SSH key .

  1. Initialise rosdep:
sudo rosdep init
rosdep update
  1. Clone total station ros2 packages:
cd ~/ros2_ws/src
git clone [email protected]:norlab-ulaval/theodolite_master.git
git clone [email protected]:norlab-ulaval/theodolite_node_msgs.git
  1. Install dependencies:
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libwiringpi-dev
  1. Build workspace:
cd ~/ros2_ws
./symlink_build.sh

Norlab's Robots

Protocols

Templates

Resources

Grants

Datasets

Mapping

Deep Learning

ROS

Ubuntu

Docker (work in progress)

Tips & tricks

Clone this wiki locally