RTS client installation - norlab-ulaval/Norlab_wiki GitHub Wiki

The client used to controll the Robotic Total Station (RTS) is a raspberry pi zero 2W with a Waveshare SX126X LoRa Hat for communication. OS installed is PI OS Bookworm Lite (Ubuntu 22) in 32-bit (it's important to use ARM32 since the SDK is meant for that architecture).

Installation

sudo apt update
sudo apt install nmcli
sudo apt install git -y
sudo apt install cmake -y
sudo apt install python3-pip -y
sudo apt install python3-serial
sudo apt install libusb-1.0-0-dev -y
sudo apt-get install libwiringpi-dev -y
git clone https://github.com/WiringPi/WiringPi.git
cd WiringPi
sudo ./build
pip3 install 

Verify WiringPi installation:

gpio -v
gpio readall

Verify serial interface status:

sudo raspi-config

→ Interface Options → Serial

“Login shell over serial?” → No

“Enable serial port hardware?” → Yes Then reboot.

Confirm that the usb port is enabled:

lsmod | grep dwc2

If no output:

sudo modprobe dwc2

Plug a total station and use:

lsusb

You should see:


Create udev rule

sudo micro /etc/udev/rules.d/10-trimble.rules
SUBSYSTEM=="usb", ATTR{idProduct}=="0101", ATTR{idVendor}=="099e", MODE="0666", GROUP="users", SYMLINK+="theodolyte"
sudo udevadm control --reload-rules
sudo udevadm trigger
ls -l /dev/theodolyte

Create SSH key for GitHub

ssh-keygen -t ed25519 -C [email protected] -q -N ""
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
git config --global user.email [email protected]
git config --global user.name Norlab Team

Then add this ssh key in Git Hub norlab account.

SDK and theodolite_client

mkdir ~/repos & cd ~/repos
git clone [email protected]:norlab-ulaval/theodolite_interface.git
git clone [email protected]:norlab-ulaval/theodolite_client.git
cd theodolite_interface
./build.sh
cd ../theodolite_client
mkdir build & cd build
cmake ..
make
export LD_LIBRARY_PATH=/usr/local/lib/theodolite_interface:/home/robot/repos/theodolite_interface/lib:$LD_LIBRARY_PATH