This package aims to provide the necessary information to the correct assembly of the robot.
Important
The hardware has been updated. If you are looking for the old design please go to f7af556d00a099cf18a9d1e17eb7e725fa97e1da
| Part_number | Image | Part_name | Links | Comments |
|---|---|---|---|---|
| 1 | ![]() |
Raspberry Pi 4 B (4 Gb) | PiShop, TiendaTec, Amazon | If you want better performance you could buy the 8GB model |
| 2 | ![]() |
Base_chassis | 3D printed | |
| 3 | ![]() |
lidar_chassis | 3D printed | |
| 4 | ![]() |
Battery_chassis | 3D printed | |
| 5 | ![]() |
Arduino_lock_base | 3D printed | |
| 6 | ![]() |
Camera_case | 3D printed | |
| 7 | ![]() |
2 x Motor with Encoder | Sparkfun | Motor name: Hobby Motor with Encoder - Metal Gear (DG01D-E) |
| 8 | ![]() |
Wheels | Amazon | Wheels are generic wheels for TT motors. |
| 9 | ![]() |
Arduino Nano | Amazon | Arduino pins can be soldered in any position, but it is recommended to solder them as shown in the picture. |
| 10 | ![]() |
IMU - BNO055 | Amazon | - |
| 11 | ![]() |
L298N Dual H Bridge | Amazon | - |
| 12 | ![]() |
RPLidar A1M8 | RobotShop, Amazon | If no microUSB-USB cable is included, you will need to purchase one |
| 13 | ![]() |
Raspi Camera Module V2, 8 MP | Robotshop, Amazon, Longer cable | A link for a longer cable (30 cm) is included, just in case the one included with the camera is too short. |
| 14 | ![]() |
Battery Case | Amazon | Link is for a 6 pack cases but only one is needed. |
| 15 | ![]() |
Batteries | Amazon | Any 18650 batteries should work |
| 16 | ![]() |
Batteries charger | Amazon | You can buy any 18650 battery charger e.g one for more than 2 batteries. |
| 17 | ![]() |
DC - DC converter | Amazon | You can use any stepdown DC-DC regulator that supports and input of 12V and give 5V output at at least 3A |
| 18 | ![]() |
Kill-Switch | Amazon | Mounting hole is 13 x 20 mm |
| 19 | ![]() |
Caster wheel | Amazon | - |
| 20 | SD Card | 64 GB SD Card | Apokin, Amazon | The SD Card is used to host the OS for the Raspberry Pi |
| 21 | ![]() |
screws kit | Amazon | You don't need all the screws but here you can get all the screws that you need in the screw-table |
| 22 | ![]() |
zip ties | Amazon | Link is a good option, but your only going to use 4 to 6 |
| Size | length | quantity needed |
|---|---|---|
| 3m | 6mm | 0 |
| 3m | 8mm | 2 |
| 3m | 10mm | 4 |
| 3m | 12mm | 6 |
| 3m | 16mm | 5 |
| 3m | 20mm | 0 |
| 3m | 25mm | 2 |
| 3m | 30mm | 4 |
| 3m | Nuts | 19 |
| Number | Tool | Links | Comments |
|---|---|---|---|
| 1 | Set of screwdrivers | Amazon |
Place the camera case in its position as shown in the image, be careful when you spread the base, to avoid braking it.
Rotate the base 180 degrees and place the raspberry as shown in the image. And place the wheels by inserting them into the motors.
Finish all the driver connections according to the connection diagram
Make the remaining connection of the connection diagram and organize the cables as you prefer.
Make all the power connections in the power connections schema and place the battery chassis in the base chassis as shown in the image.
Some frequent errors:
- If one of the motors rotates in the opposite direction (think about the orientation of the motors in the chassis) probably the output(+ and -) of the L298N's output should be toggled.
- When moving forward the encoder values should increase while moving backwards they should decrease. If it is happening the other way around probably the A and B encoder signals should be toggled.
Note
Ground cable to the switch is only necessary if it has a led indicator.
Note
For the camera ensure the ribbon cable is properly connected with the blue or silver side facing the USB ports.
For uploading the microcontroller firmware please refer to andino_firmware package.
The SBC used in this project is a Raspberry Pi 4b so the guidelines here will refer particularly to this family of on-board computers, however extending its use to other families is possible as well.
This section details the required configuration that is needed in the SBC. You can either follow these steps or rely on community contribution (Recommended) for installing this via ansible playbooks: See https://github.com/garyservin/andino_ansible_config
The recommended operative system depends on which ROS 2 distro you want to use:
Important
It should work with either Desktop or Server versions. Desktop versions naturally are slower. Refer to https://ubuntu.com/download/raspberry-pi for general information on Ubuntu installation on Raspberry Pi.
For installing this OS in the Raspberry:
-
Download the image for your target ROS distro (see above).
-
Install OS to a microSD card using Raspberry Pi Imager.
- No extra configuration should be necessary.
-
Boot your raspberry using the microSD and a HDMI connection. Some initial configuration is necessary. Follow the wizard for a proper set up. It is recommended to use simple User and Password combinations for the user. For example:
- user: pi
- password: admin
-
Once is done, run
sudo apt update && sudo apt upgradein a terminal for updating the system. Then reboot.
Some packages are necessary to be installed towards a correct set up of the robot's on-board computer.
In general, you will want to access to the Raspberry remotely via ssh connection while being connected in the same network.
So we need to install ssh-server;
sudo apt-get install openssh-server
Enable it if it is not enabled yet:
sudo systemctl enable ssh --now
After this you will be able to access this device from a remote computer by doing:
ssh <user>@<ip>
For example if the user is pi and the ip is 192.168.0.102
ssh pi@192.168.0.102
Install some common utilities that will be required later on.
sudo apt update
sudo apt install git net-tools software-properties-common build-essential -y
sudo apt install python3-rosdep2 python3-catkin-pkg python3-catkin-pkg-modules python3-rospkg-modules python3-rospkg -y
- Colcon Follow suit the instructions for installing next dependencies from binaries:
- ROS 2 Humble(If Ubuntu 22.04)
- ROS 2 Jazzy(If Ubuntu 24.04)
[!IMPORTANT] It is worth checking out official instructions on installing ROS on Raspberry PI platforms, in particular for Jazzy onwards. See here: Relying on noble-backports in Ubuntu Noble (24.04) is necessary.
To automatically source ROS installation, it is recommended to add source /opt/ros/humble/setup.bash line to the ~/.bashrc file.
Arduino drivers are necessary for the SBC (Raspberry) <--> Microcontroller(Arduino) serial communication.
sudo apt install arduino
Configure it properly:
- Add user to
dialoutandplugdevgroups:sudo usermod -a -G dialout $USERNote you will need a reboot after this to be effective.sudo usermod -a -G plugdev $USER
Important
In Ubuntu 22.04 seems to be an issue with some chip drivers and the brltty daemon. To avoid ?> this conflict we remove brltty as suggested. See [this stackoverflow post](https://stackoverflow.com/>? > questions/70123431/why-would-ch341-uart-is-disconnected-from-ttyusb) for further information.
- Remove
brlttyfrom the systemsudo apt remove brltty
After connecting the camera module to the Raspberry's camera port.
sudo apt install libraspberrypi-bin v4l-utils
sudo usermod -aG video $USER
Check camera status:
vcgencmd get_camera
If the output of the previous command is `supported=1 detected=1', everything is fine. If not, your camera won't work correctly, you need to perform some configuration first.
Modify the config.txt file for the boot:
sudo nano /boot/firmware/config.txtAnd add these lines under [all]:
# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
start_x=1
gpu_mem=128
Save and close the file. Then we need to enable the camera support for the raspberry:
sudo apt install raspi-config
sudo raspi-configGo to Interface Options, select camera and enable it.
Finally, you just need to reboot and the camera should be working fine.
The installation of the A1M8 RPLidar sensor is quite straight forward and a ros integration package will be installed later on via rosdep.
For now, after connecting it to the usb port:
- Verify USB connection: Green light in the usb conversor(A1M8 side board) should be turned on.
- Check the authority of RPLidar's serial-port:
ls -l /dev |grep ttyUSB- Add extra bits by doing
sudo chmod 666 /dev/ttyUSB<number_of_device>
As having multiple USB devices connected to the USB ports of the Raspberry Pi, the automatically assigned USB port numbers could unexpectedly change after a reboot.
To avoid assigning your device to a tty_USBX number that isn't the correct one we should assign fixed USB port name for each connected device.
The idea is to be able to generate a link between the real ttyUSBX port and an invented one. For this we will need to create rules, that every time the Raspberry Pi boots are executed, and therefore we
always point to the correct port name.
In order to create fixed names for the USB devices follow the instructions:
-
Check the devices you have connected:
sudo dmesg | grep ttyUSB[ 10.016170] usb 1-1.2: ch341-uart converter now attached to ttyUSB0 [ 309.186487] usb 1-1.1: cp210x converter now attached to ttyUSB1In the setup where this was tested we have: -> Arduino Microcontroller -> usb 1-1.2: ch341-uart converter now attached to ttyUSB0 -> A1M8 Lidar Scanner -> usb 1-1.1: cp210x converter now attached to ttyUSB1
Note: If you don't know how to identify each one you can simply connect them one by one and check this output.
-
Look for attributes for each device that we will use to anchor a particular device with a name. We will use the
idProductandidVendorof each device.- Arduino Microcontroller:
You should look for the
udevadm info --name=/dev/ttyUSB0 --attribute-walkidProductandidVendorunder the category that matches the usb number(1-1.X): In this case thettyUSB0was referenced to theusb 1-1.2, so go to that section and find the ids:ATTRS{idProduct}=="7523" ATTRS{idVendor}=="1a86" - Lidar Scanner
In this case the
udevadm info --name=/dev/ttyUSB1 --attribute-walkttyUSB0was referenced to theusb 1-1.1, so go to that section and find the ids:ATTRS{idProduct}=="ea60" ATTRS{idVendor}=="10c4"
- Arduino Microcontroller:
-
Create the rules:
Open the file:
sudo nano /etc/udev/rules.d/10-usb-serial.rulesAdd the following:
SUBSYSTEM=="tty", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", SYMLINK+="ttyUSB_ARDUINO" SUBSYSTEM=="tty", ATTRS{idProduct}=="ea60", ATTRS{idVendor}=="10c4", SYMLINK+="ttyUSB_LIDAR"[!IMPORTANT] You should be using your own information you obtained from previous commands, this is just an example. Note that in the
symlinkfield a fixed name is indicated. -
Re-trigger the device manager:
sudo udevadm trigger -
Verify
ls -l /dev/ttyUSB*crw-rw---- 1 root dialout 188, 0 Sep 2 15:09 /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 1 Sep 2 15:09 /dev/ttyUSB1 lrwxrwxrwx 1 root root 7 Sep 2 15:09 /dev/ttyUSB_ARDUINO -> ttyUSB0 lrwxrwxrwx 1 root root 7 Sep 2 15:09 /dev/ttyUSB_LIDAR -> ttyUSB1
Done! You can always use your devices by the fixed names without using the port number.
Here, ttyUSB_ARDUINO and ttyUSB_LIDAR are fixed names for the Arduino Microcontroller and the Lidar Scanner respectively.
For more information you can take a look at this external tutorial: Here
Let's create our workspace and build from source this repository.
cd ~mkdir robot_ws/src -pClone this repository in the src folder
cd robot_ws/srcgit clone <repository_address>Install dependencies via rosdep:
cd ~/robot_wsWhen it is the first time you run rosdep:
rosdep updateMake sure to export the ROS_DISTRO environment variable (use humble or jazzy depending on your installation):
export ROS_DISTRO=humble # or jazzyAnd then proceed to install the workspace dependencies:
rosdep install --from-paths src -i -y -rNote that option -r has been added. For ARM based processors, there are missing packages, e.g. those related to simulation. We would not try to run the simulation in the compute platform of andino, however for convenience it is added here.
Let's source the ROS installation:
source /opt/ros/$ROS_DISTRO/setup.bashLet's build the packages:
colcon buildAfter building is completed:
source install/setup.bashAfter this, you are good to go and use the robot!
Refer to usage section.
Via terminal the wifi connection can be switched by doing:
List available wifi networks:
sudo nmcli dev wifi list
Connect to the desired one:
sudo nmcli --ask dev wifi connect <SSID>
Using scp is a useful tool when copying files remotely over ssh.
For copying a folder from host to remote unit:
scp -r <path/to/folder> <remote_user>@<remote_ip>:<remote_path_to_folder>
The domain ID is used by DDS to compute the UDP ports that will be used for discovery and communication.
When using a "public" network using the domain id is a good technique to avoid extra noise with other ROS 2 system in the same network.
See ROS_DOMAIN_ID
TLDR? Export an environment variable with the same ID in all ROS 2 clients in the network for a correct discovery.
export ROS_DOMAIN_ID=<a_number_between_0_and_101>
andino_bringup package provides a launch file for launching the corresponding ROS 2 nodes for teleoperating the robot using a joystick.
It is worth mentioning that a set up might be needed depending on the gamepad you are using. Here some general guidelines:
- In case you are using a Xbox One Controller and you want use it wireless (via USB Wirless Dongle) installing Xone is recommended.
- Verify that your joystick is actually working on Ubuntu:
- Some tools that might be useful:
sudo apt install joystick jstest-gtk evtest
- Run
evtestto check if your pad is connected:$ evtest No device specified, trying to scan all of /dev/input/event* Not running as root, no devices may be available. Available devices: /dev/input/event22: Microsoft X-Box One pad - Alternatively, you can use
jstest-gtkto check the controller, you will find a pretty GUI to play with.
- Some tools that might be useful:









































