Install instructions¶
Ubuntu¶
Install instruction of all what is required to follow the Introduction to ROS course using your laptop (Ubuntu 18.04 O.S. is required). The computers at the ETSEIB computer rooms are already prepared.
Terminals¶
Teminator arranges terminals in a grid. It is useful since many terminals are usually needed simultaneouly when working with ROS. More info.
xterm is the standard terminal emulator for the X Window System; it will be used by some ROS nodes to print data to a terminal.
$ sudo apt-get install terminator
$ sudo apt-get install xterm
ROS¶
Install instructions of the Melodic version for Ubuntu. Detailed info.
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudo apt-get update
$ sudo apt install ros-melodic-desktop-full
$ sudo apt update
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
$ sudo apt install python-rosdep
$ sudo rosdep init
$ rosdep update
ROS is installed in /opt/ros/<distro>, e.g. /opt/ros/melodic. The source of the setup file /opt/ros/<distro>/setup.bash is normally added in to your .bashrc in the installation process.
You can check the ROS environment variables (like ROS_ROOT, ROS_MASTER_URI or ROS_PACKAGE_PATH) using:
$ printenv | grep ROS
Other ROS packages¶
ROS Control¶
A set of packages that include controller interfaces, controller managers, transmissions and hardware_interfaces. More info.
$ sudo apt-get install ros-melodic-ros-control ros-melodic-ros-controllers
$ sudo apt-get install ros-melodic-rqt-controller-manager ros-melodic-rqt-joint-trajectory-controller
$ sudo apt-get install ros-melodic-ddynamic-reconfigure
$ sudo apt-get install ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-ros-control
ROS tf tutorials¶
tf is a package that lets the user keep track of multiple coordinate frames over time. More info.
$ sudo apt-get install ros-melodic-ros-tutorials ros-melodic-geometry-tutorials ros-melodic-rviz ros-melodic-rosbash ros-melodic-rqt-tf-tree
ROS joint state publisher GUI¶
Package to graphically control the joints of the robot using sliders.
$ sudo apt install ros-melodic-joint-state-publisher-gui
URDF tools¶
The Unified Robot Description Format (URDF) uses XML files to model robots, sensors and the working environment. These tools allows to check the correctness of URDF files.
$ sudo apt-get install liburdfdom-tools
Catkin tools¶
Python package that provides command line tools for working with the catkin meta‐buildsystem and catkin workspaces. More info.
$ sudo apt-get install python-catkin-tools
The ~/.bashrc file¶
LC_NUMERIC¶
The LC_NUMERIC environment variable specifies the locale to use for the category determines the rules governing nonmonetary numeric formatting. It should be set as follows in the ~/.bashrc file:
export LC_NUMERIC=C
Colored prompts¶
The ~/.bashrc file can be modified to put colored prompts and show in the terminal the git branch you are in.
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]$"
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
Windows/Mac¶
In case you cannot (or you don’t want to) install a Ubuntu 18.04, you can use a Virtual Machine.
We have prepared a Virtual Machine (VM) with an Ubuntu 18.04 with all the installation of ROS plus the necessary software installed.
To use it with VirtualBox, download the OVA file (called UbuntuROS_RIS.ova) from here.
Open VirtualBox. On the left there’s an option called “Tools”. If you click there you can Edit Preferences, Import, Export, New or Add. Click on the Import option and follow the instructions.
Alternatively, the image can also be imported with a VMWare software.
Once imported, open it:
- User: student
- Password: student