Difference between revisions of "ROS Tutorials"
(→Installing and configuring your ROS environment) |
|||
Line 16: | Line 16: | ||
'''If not using Ubuntu 12.04 and installing hydro:''' please refer to instructions given [http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment here]. | '''If not using Ubuntu 12.04 and installing hydro:''' please refer to instructions given [http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment here]. | ||
− | Setup sources list: | + | 1) Setup sources list: |
<nowiki>sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'</nowiki> | <nowiki>sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'</nowiki> | ||
Line 22: | Line 22: | ||
You may be prompted for your super-user password. This should be your username password. Type it into the terminal and press ENTER. | You may be prompted for your super-user password. This should be your username password. Type it into the terminal and press ENTER. | ||
− | Setup keys: | + | 2) Setup keys: |
<nowiki>wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -</nowiki> | <nowiki>wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -</nowiki> | ||
Line 30: | Line 30: | ||
<nowiki>sudo apt-get update</nowiki> | <nowiki>sudo apt-get update</nowiki> | ||
− | Install Desktop-Full: | + | 3) Install Desktop-Full: |
<nowiki>sudo apt-get install ros-hydro-desktop-full</nowiki> | <nowiki>sudo apt-get install ros-hydro-desktop-full</nowiki> | ||
− | Initialize rosdep: | + | 4) Initialize rosdep: |
<nowiki>sudo rosdep init</nowiki> | <nowiki>sudo rosdep init</nowiki> | ||
<nowiki>rosdep update</nowiki> | <nowiki>rosdep update</nowiki> | ||
− | Setup Enviornment: | + | 5) Setup Enviornment: |
<nowiki>echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc</nowiki> | <nowiki>echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc</nowiki> | ||
<nowiki>source ~/.bashrc</nowiki> | <nowiki>source ~/.bashrc</nowiki> | ||
− | Install rosinstall: | + | 6) Install rosinstall: |
<nowiki>sudo apt-get install python-rosinstall</nowiki> | <nowiki>sudo apt-get install python-rosinstall</nowiki> |
Revision as of 12:14, 9 October 2014
Practicing writing a wiki page- all information below is incomplete until otherwise noted.
Aside to editor, to improve:
This tutorial assumes that you will be working in ROS-hydro on Ubuntu 12.04. This wiki is based on the tutorials given here.
Contents
Beginner Level
Open the terminal. To complete each step, type in the following commands in the order shown.
Installing and configuring your ROS environment
We recommend ROS-hydro on Ubuntu 12.04, instructions given on this link. The commands are given below.
If not using Ubuntu 12.04 and installing hydro: please refer to instructions given here.
1) Setup sources list:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
You may be prompted for your super-user password. This should be your username password. Type it into the terminal and press ENTER.
2) Setup keys:
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
Update Debian package:
sudo apt-get update
3) Install Desktop-Full:
sudo apt-get install ros-hydro-desktop-full
4) Initialize rosdep:
sudo rosdep init rosdep update
5) Setup Enviornment:
echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc source ~/.bashrc
6) Install rosinstall:
sudo apt-get install python-rosinstall
First, we need to settle some dependencies and install catkin.
Settle dependencies:
sudo apt-get install cmake python-catkin-pkg python-empty python-nose python-setuptools libgtest-dev build-essential
Install catkin:
sudo apt-get install ros-hydro-catkin
Now we can focus on navigation. Here is a list of commands to navigate around the ROS files and folders.
- To find the path of a package: rospack find [package-name]
Example:
rospack find roscpp
- To change directory: roscd [locationname[/subdir]]
Example:
roscd roscpp
- To see your working (current) directory:
pwd
- To see your ROS environment path:
echo $ROS_PACKAGE_PATH
- To move to the folder ROS stores its logs:
roscd log
- To see contents of a particular package: rosls [locationname[/subdir]]
Example:
rosls roscpp_tutorials
- TAB completion is also supported.