Skip to content

Commit 9016159

Browse files
authored
Create sbc_software_setup.md
1 parent 90985c5 commit 9016159

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

docs/sbc_software_setup.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
## Single Board Computer Software Preparation
2+
3+
This section guides you through preparing the software environment on your Single Board Computer (SBC), such as a Raspberry Pi, to operate your ROS-based mobile robot. Here, we'll cover essential steps like:
4+
5+
- [Hardware Interface Configuration](#hardware-interface): Setting up the necessary interface between your SBC and the robot's microcontroller.
6+
- [Source Dependency Management](#source-dependencies): Downloading and installing the required software source code using tools like vcstool.
7+
- [Binary Dependency Installation](#binary-dependencies): Installing additional software packages necessary for compiling the robot's ROS packages.
8+
- [Building the ROS Workspace](#build-ros-workspace): Compiling all the software components on the SBC for your robot to function properly.
9+
10+
Following these steps will prepare your SBC's software environment to interact with the robot and run ROS effectively.
11+
12+
!!! note
13+
This section assumes you have already installed the appropriate operating system (e.g., Ubuntu Mate 20.04) on your SBC.
14+
See the previous pages ([Raspberry Pi setup](./rpi-setup.md) or [Jetson Nano setup](./jetson-nano-setup.md)) on how to do this.
15+
16+
### Hardware Interface
17+
18+
Another interface setup that is needed to work with the microcontroller, is to add your
19+
user to the `dialout` group on both machines, the SBC and the development PC. This can
20+
be done with the following command, followed by a system reboot:
21+
22+
```console
23+
sudo adduser <username> dialout
24+
```
25+
26+
### Source Dependencies
27+
28+
When you clone the diffbot repository in a new catkin workspace, you will find two
29+
YAML files, `diffbot_dev.repos` and `remo_robot.repos`, that list required source
30+
dependencies together with their version control type, the repository address, and a
31+
relative path where these dependencies are cloned. `remo_robot.repos` is here to clone
32+
source dependencies on the real robot.
33+
34+
To make use of such YAML files and clone the listed dependencies, we use the commands
35+
from [`vcstool`](http://wiki.ros.org/vcstool), which replaces
36+
[`wstool`](http://wiki.ros.org/wstool):
37+
38+
1. Install vcstool using the command:
39+
40+
```console
41+
sudo apt install python3-vcstool
42+
```
43+
44+
2. In a new catkin workspace, clone the diffbot repository inside the src folder:
45+
46+
```console
47+
ros_ws/src$ git clone https://github.com/ros-mobile-robots/diffbot.git
48+
```
49+
50+
for a specific tag (e.g. 1.0.0) you can use the following command:
51+
52+
```console
53+
ros_ws/src$ git clone --depth 1 --branch 1.0.0 https://github.com/ros-mobile-robots/diffbot.git
54+
```
55+
56+
3. Make sure to execute the `vcs import` command from the root of the catkin
57+
workspace and pipe in the `diffbot_dev.repos` or `remo_robot.repos`
58+
YAML file, depending on where you execute the command, either the development
59+
PC or the SBC of Remo to clone the listed dependencies:
60+
61+
```console
62+
vcs import < src/diffbot/diffbot_dev.repos
63+
```
64+
65+
4. Execute the next command on the SBC of the robot:
66+
67+
```console
68+
vcs import < src/diffbot/remo_robot.repos
69+
```
70+
71+
### Binary Dependencies
72+
73+
After obtaining the source dependencies with `vcstool`, we can compile the workspace.
74+
To successfully compile the packages of the repository, binary dependencies must be
75+
installed. As the required dependencies are specified in each ROS package's `package.xml`,
76+
the rosdep command can install the required ROS packages from the Ubuntu repositories:
77+
78+
```console
79+
rosdep install --from-paths src --ignore-src -r -y
80+
```
81+
82+
### Build ROS Workspace
83+
84+
Finally, the workspaces on the development machine and the SBC of the robot need to
85+
be built, either using `catkin_make` or catkin tools. `catkin_make` comes pre-installed with ROS.
86+
87+
=== "catkin tools"
88+
89+
```console
90+
catkin build
91+
```
92+
93+
=== "`catkin_make`"
94+
95+
```console
96+
catkin_make
97+
```

0 commit comments

Comments
 (0)