Skip to content

Compile ROS Packages

neumann89 edited this page Sep 1, 2017 · 1 revision

Prerequisites

  • Install ROS, see install pages on the right navigation bar.
  • Install catkin tools for compiling: sudo apt-get install python-catkin-tools

Build a new package

To build a new package, make a new workspace catkin_ws_user:

$ mkdir -p ~/my_catkin_ws/src
$ cd ~/my_catkin_ws

Put your source folder inside the new workspace, then you can build all packages using:

$ catkin build 

To build only a single package, you can run:

$ catkin build <name of the package> 

Do not forget to add the source file:

$ source ~/my_catkin_ws/devel/setup.bash

You can use the catkin clean to delete the compiled files:

$ catkin clean

If the system get stucked while compiling or you got errors like memory allocation error, then you should append the -j flag to catkin build (to only use two cores in parallel: catkin build -j2).

The model_car and catkin_ws_user contain source code for the model car. So you have to compile it on odroid or cross compile for odroid. When compiling on odroid update the system clock before with date --set "YEAR-MONTH-DAY HOUR:MINUTE:SECOND", otherwise you will get a clock skew error.

Clone this wiki locally