How To Setup Developer PC
How To Setup Developer PC
This is a description how to setup a developer PC with Ubuntu 16.04, ROS Kinetic Kame and
Eclipse Oxygen.
Important!: For the later installation of ROS you have to configure your Ubuntu repositories to
allow "restricted," "universe," and "multiverse.". You can follow the Ubuntu guide for instructions
on doing this: https://help.ubuntu.com/community/Repositories/Ubuntu
We recommend you to use terminator, that allows you to have multiple terminals in one window.
It can be installed with:
> sudo apt update
> sudo apt install terminator
1
Install ROS Kinetic
Install ROS Kinetic (recommended: “Desktop-Full Install”) following these instructions:
http://wiki.ros.org/kinetic/Installation/Ubuntu
We work with Catkin Command Line Tools (catkin build instead of catkin_make) to build
packages in your workspace. They can be installed with apt-get
http://catkin-tools.readthedocs.io/en/latest/installing.html#installing-on-ubuntu-with-apt-get
Setup your catkin workspace in which your packages will be built as follows:
Source the environment:
> source /opt/ros/kinetic/setup.bash
Create workspace:
> mkdir -p ~/catkin_ws/src
> cd ~/catkin_ws/src
> catkin_init_workspace
Add your workspace to the .bashrc such that it is sourced every time you start a new
shell (terminal).
> echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
To build your packages in release mode add the build type to the catkin config:
> catkin config -DCMAKE_BUILD_TYPE=Release
2
Install Eclipse
Install oracle java 8 (REALLY recommended for eclipse):
> sudo add-apt-repository ppa:webupd8team/java
> sudo apt update
> sudo apt install oracle-java8-installer
3
Import the google coding style settings to Eclipse:
● Download the style sheet to some location:
https://github.com/google/styleguide/blob/gh-pages/eclipse-cpp-google-style.xml
● Start Eclipse.
● Select Window->Preferences->C/C++->Code Style->Formatter.
● Click Import…
● Select the downloaded sheet.
● Click OK
Add additional build flags to your catkin config to generate the eclipse related files
> cd ~/catkin_ws
> catkin config -G"Eclipse CDT4 - Unix Makefiles"
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_ARG1=-std=c++11
-D__cplusplus=201103L -D__GXX_EXPERIMENTAL_CXX0X__=1