- Start
- Setup XCS and RPi
- Setup RPi Network and SSH
- Setup RPi Peripherals
- Setup Cross-compile environment
- Cross-compile and Install Userland
- Cross-compile and Install OpenCV
- Cross-compile and Install ROS
- Compile and Install OpenCV
- Compile and Install ROS
- Remote ROS (RPi node and XCS master)
- > ROS package development (RPi/XCS)
- Compile and Install WiringPi
TO BE UPDATED. GUIDE MIGHT STILL WORK.
The scripts to source the ROS-builds on both the RPi and VM expect paths in which a package is build.
Both ros-native and ros-cross search for the devel*
folders created bij the ROS builders.
For native building, packages need to be build in:
XCS~$ ~/build/ros/<packagename>
For cross compilation, packages need to be build in:
XCS~$ ~/ros/<packagename>_cross
After cross-compiling a package for the RPi, the ~/ros
directory needs to be synchronised with the RPi via:
XCS~$ ~/rpicross_notes/scripts/sync-ros.sh
The source of a package can be located everywhere.
- VM and RPi Configured: setup and network
- Toolchain installed
- Repository downloaded
- ROS (cross)compiled: cross and native
Optional:
- Userland (for gpu-support)
- OpenCV (cross)compiled: cross and native (for vision-support)
- Perhiperals (for camera/i2c)
- ROS-port forwarding (for mixed support)
- Set correct paths for native compilation
XCS~$ source ~/rpicross_notes/scripts/ros-native
- Build package
XCS~$ mkdir -p ~/build/ros/<packagename> XCS~$ cd ~/build/ros/<packagename> XCS~$ cmake <path>/<to>/<package> XCS~$ make
- Update ROS-paths, so new package is included
-
Via generic script:
XCS~$ source ~/rpicross_notes/scripts/ros-native <hostname> <rpiname>
<hostname>
and ` are optional and only needed when a RPi is used. See Testing. -
or, build package only:
XCS~$ source ~/build/ros/<packagename>/devel/setup.bash
-
- Assuming a
roscore
is running, the package can be started viarosrun
:XCS~$ rosrun <packagename> <node>
-
Set correct paths for cross compilation
XCS~$ source ~/rpicross_notes/scripts/ros-cross
-
Build package
XCS~$ mkdir -p ~/ros/<packagename> XCS~$ cd ~/ros/<packagename> XCS~$ cmake \ -DCMAKE_TOOLCHAIN_FILE=/home/pi/rpicross_notes/rpi-generic-toolchain.cmake \ <path>/<to>/<package> XCS~$ make
-
Update RPi
XCS~$ ~/rpicross_notes/scripts/sync-ros.sh <rpi-host>
<rpi-host>
is optional. When omitted,rpizero-local
is used. -
Assuming a
roscore
is running, the package can be started viarosrun
:XCS~$ ssh rpizero-local RPi~$ rosrun <packagename> <node>
When a mixed setup is used, e.g. when both the VM and RPi need to be active, the following command should be executed before logging-in to the RPi or starting a node on either the VM or RPi:
XCS~$ source ~/rpicross_notes/scripts/ros-native <hostname> <rpiname>
<hostname>
: hostname of device on whichroscore
runs.- when VM: name of
HOST~$
- when RPi: name of RPi
detect the hostname with the
hostname
command- when VM: name of
<rpiname>
: name of ssh-connection defined inssh_config
of the RPi