0% found this document useful (0 votes)
67 views

How To Setup Developer PC

This document provides instructions for setting up a developer PC with Ubuntu 16.04, ROS Kinetic Kame, and Eclipse Oxygen. It describes how to install Ubuntu, configure repositories, update the system, install software packages like ROS, Git, terminator, Eclipse, and configure a catkin workspace for building ROS packages. It also provides details on importing Google coding styles into Eclipse.

Uploaded by

kartavya jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

How To Setup Developer PC

This document provides instructions for setting up a developer PC with Ubuntu 16.04, ROS Kinetic Kame, and Eclipse Oxygen. It describes how to install Ubuntu, configure repositories, update the system, install software packages like ROS, Git, terminator, Eclipse, and configure a catkin workspace for building ROS packages. It also provides details on importing Google coding styles into Eclipse.

Uploaded by

kartavya jain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Setup developer PC

This is a description how to setup a developer PC with Ubuntu 16.04, ROS Kinetic Kame and
Eclipse Oxygen.

Install Ubuntu 16.04 LTS (Kinetic Kame)


Download the desktop image which is appropriate for your machine:
http://releases.ubuntu.com/16.04/

A comprehensive installation instruction can be found here:


https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop

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

Update your installation to the newest version:


> sudo apt update
> sudo apt upgrade

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

Install git (​https://www.atlassian.com/git/tutorials/what-is-git​):


> sudo apt update
> sudo apt install git

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_mak​e) 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

Build the workspace:


> cd ~/catkin_ws/
> catkin build

Source your workspace:


> source devel/setup.bash

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

Download Eclipse Oxygen from


https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxyg
en/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz​ to your download directory.
Navigate to the downloaded file:
> cd ~/Downloads

Unpack and install:


> tar -zxvf eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
> sudo mv eclipse /opt
> sudo chown $USER -R /opt/eclipse/
> sudo ln -s /opt/eclipse/eclipse /usr/sbin/eclipse
> rm eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz

Give eclipse more space:


> s​ udo sed -i "s/-XX:MaxPermSize=256m/-XX:MaxPermSize=1024m/g" /opt/eclipse/eclipse.ini
> sudo sed -i "s/-Xms40m/-Xms512m/g" /opt/eclipse/eclipse.ini
> sudo sed -i "s/-Xmx512m/-Xmx1024m/g" /opt/eclipse/eclipse.ini

Setup unity link


> cat > eclipse.desktop << "EOF"
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=eclipse
Terminal=false
Icon=eclipse
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
EOF
> sudo mv eclipse.desktop /opt/eclipse/
> sudo desktop-file-install /opt/eclipse/eclipse.desktop
> sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm

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

You might also like