Install ROS on Turtle Rover
Here is a quick tutorial on how to install ROS on your Turtle Rover
Prepare your Turtle Rover for ROS installation
First, connect your device to Turtle Rover's console via SSH
Next step is to establish Internet connection
Prepare ROS installation tools
Update package list
Make sure you have dirmngr installed (it’s necessary for downloading public keys from the HKP server)
Add ROS repositories and download GPG keys
Install prerequisites
Initialize rosdep and update its package list
Installing ROS packages
To install ROS on TurtleOS you can either compile package from source or download one of our precompiled workspaces.
A. Use our precompiled workspace
We have precompiled ROS workspaces to make installation process easier. You can find them together with lists of packages they contain here.
Download selected one to your host machine and upload it to your Rover:
Or download it directly to your Rover using wget
. E.g.:
Create a directory for ROS kinetic
workspace and extract the archive to that directory:
Use rosdep to install system dependencies
B. Compile ROS package sources
Create a directory to store our catkin workspace
Use rosinstall_generator tool for creating a rosinstall file. This file will contain a list of ROS packages alongside their sources
ros_comm contains basic ROS communication tools. The command above will include this package and all its recursive dependencies
Download packages to source directory using wstool
Install system dependencies of downloaded packages using the rosdep tool
Initialize and configure catkin workspace
The configuration shown above says that the workspace is going to be installed in the /opt/ros/kinetic
directory and that up to 2 parallel jobs can be running
NOTE: In this tutorial we use catkin commands from catkin-tools. If you want to use the catkin_make
command instead, you can follow this tutorial
Build and install the workspace
CAUTION: Raspberry Pi has limited resources and TurtleOS doesn’t have a swap partition. This fact can lead to the device becoming unresponsive over time, because of memory exhaustion. If this results in the compilation being terminated, you can try limiting the jobs running based on the memory usage
sudo catkin build --mem-limit 50%
The next job won’t be started as long as the memory usage is above 50%
Also remember to have decent power supply (a 5V/2.5A charger would do fine)
That’s it! Our workspace is installed in the /opt/ros/kinetic
directory.
Testing ROS Master Node
To access all the installed tools and packages you need to "source" the workspace. To do this, use this command:
If you want the command to be executed at the start of every terminal session, simply add it to the .bashrc
file
Now, to run Master Node, type:
On another terminal, "source" the workspace and then type:
You should see /rosout
and /rosout_agg
topics listed.
Adding or Updating packages
Let's say you want to add joy package. So first, you need to create a new rosinstall file
Next, merge it with our workspace and update package sources
Don't forget to install system dependencies via rosdep
Rebuild our workspace
Last updated