Install Turtle Rover ROS packages
Here is a tutorial on how to build ROS packages in your ROS environment on Turtle Rover

Prepare your Turtle Rover

First, connect your device to Turtle Rover's console via SSH
Next step is to establish Internet connection
This tutorial assumes you already have base ROS packages installed. If not, head back to this tutorial

Packages installation

Preparation

First, make sure you have installed the prerequisites
1
$ sudo apt update
2
$ sudo apt install git python-rosdep python-catkin-tools python-wstool
Copied!
We want to install packages inside a workspace that will extend /opt/ros/kinetic workspace. So lets initialize and configure a new catkin workspace
1
mkdir -p ~/turtle_ws/src
2
cd ~/turtle_ws
3
catkin init
4
catkin config --extend /opt/ros/kinetic -j 2
Copied!
Now, we can download Turtle Rover's packages
1
git clone https://github.com/TurtleRover/tr_ros src/tr_ros
Copied!

Installing dependencies

"source" kinetic workspace so the rosdep tool will see the installed ROS packages
1
source /opt/ros/kinetic/setup.bash
Copied!
Install system dependencies of downloaded packages with rosdep
1
$ rosdep install --from-paths src --ignore-src -r
Copied!
If rosdep fails to resolve some of the dependencies, that probably means that they are ROS packages that you don't have in your kinetic workspace. We can add and build them together with Turtle Rover's packages
Create rosinstall file for missing packages (exclude already installed)
1
rosinstall_generator [packages] --deps --wet-only --tar --exclude RPP > package.rosinstall
Copied!
Add them to workspace
1
wstool init src
2
wstool merge package.rosinstall -t src
3
wstool update -t src
Copied!
Install system dependencies of newly downloaded packages
1
rosdep install --from-paths src --ignore-src -r
Copied!

Building

If everything is prepared, build the workspace by typing
1
catkin build
Copied!
After a successful build, we can "source" the workspace to overlay it on top of our environment
1
source ~/turtle_ws/devel/setup.bash
Copied!
Our workspace extends the /opt/ros/kinetic one, so all installed tools and packages from kinetic are also available
By default, catkin does not install packages but creates a devel space. If you want to install workspace in a specific location, type
1
catkin config --install -i [install_location]
Copied!
You can learn more about catkin workspaces here
Your Turtle Rover's environment is ready for development ;-)
Last modified 2yr ago