Difference between revisions of "Alvaro-RV-HAPTICROS01"
Line 124: | Line 124: | ||
<syntaxhighlight lang=Bash>sudo apt-get install python-rosinstall</syntaxhighlight> | <syntaxhighlight lang=Bash>sudo apt-get install python-rosinstall</syntaxhighlight> | ||
+ | ===Create a ROS Workspace === | ||
+ | * '''Create a new workspace''' | ||
+ | With the next command we go to create a workspace in ~/catkin_ws which inherits the set of installed packages in /opt/ros/groovy | ||
+ | |||
+ | <syntaxhighlight lang=Bash>mkdir -p ~/catkin_ws/src</syntaxhighlight> | ||
+ | <syntaxhighlight lang=Bash>cd ~/catkin_ws/src</syntaxhighlight> | ||
+ | <syntaxhighlight lang=Bash>catkin_init_workspace</syntaxhighlight> | ||
+ | |||
+ | Initially our workspace is empty, only have a CmakeList.txt in the src directory. For make the workspace execute | ||
+ | |||
+ | <syntaxhighlight lang=Bash>cd ~/catkin_ws/</syntaxhighlight> | ||
+ | <syntaxhighlight lang=Bash>catkin_make</syntaxhighlight> | ||
+ | |||
+ | Finally, we configure the enviroment variabble to take into consideration our new workspace, for this execute | ||
+ | |||
+ | <syntaxhighlight lang=Bash>source ~/catkin_ws/devel/setup.bash</syntaxhighlight> | ||
+ | |||
+ | For to do this change continuous we can add the previous line to end of file ''~/.bashrc'' | ||
+ | |||
+ | |||
+ | |||
+ | <syntaxhighlight lang=Bash></syntaxhighlight> | ||
<syntaxhighlight lang=Bash></syntaxhighlight> | <syntaxhighlight lang=Bash></syntaxhighlight> | ||
<syntaxhighlight lang=Bash></syntaxhighlight> | <syntaxhighlight lang=Bash></syntaxhighlight> | ||
<syntaxhighlight lang=Bash></syntaxhighlight> | <syntaxhighlight lang=Bash></syntaxhighlight> | ||
<syntaxhighlight lang=Bash></syntaxhighlight> | <syntaxhighlight lang=Bash></syntaxhighlight> |
Revision as of 11:38, 10 September 2013
- Project name: Turtlebot robot indoor navigation
- Dates: July 2013 -
- Degree: Summer Research Residence
- Authors: Álvaro
- Contact: jferna08@estudiantes.unileon.es
- SVN Repositories:
- Tags: ROS, Haptics
- Technologies: ROS
- State: Ongoing
Installing ROS Fuerte on Ubuntu 12.04
Sources.list Configuration
For the computer accept packages.ros.org must enter in the terminal the next line.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
Keys Configuration
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Installation
We make sure that the server ROS.org is indexed.
sudo apt-get update
Install the library package and complete tools: ROS, rx, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception.
sudo apt-get install ros-fuerte-desktop-full
Also you can install independently the libraries, tools and stacks.
Enviroment Configuration
For the enviroment variables are added each time you start the computer type this lines
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
. ~/.bashrc
We can check if we have added typing gedit ~/.bashrc and looking at end of file
IMPORTANT!!! If there is more than one ROS distribution installed in the file ~/.bashrc must only contain the version you're using
Independent Tools
Rosinstall and rosdep are used often in the terminal, but they are distributed individually. Rosinstall allows you to download source code trees for packages and ROS stacks. Rosdep allows easy installation of the system dependencies for the source code to be compiled.
For install those tools, you write in the terminal the next line
sudo apt-get install python-rosinstall python-rosdep
Create a ROS Workspace
- Create a new workspace
With the next command we go to create a workspace in ~/fuerte_workspace which inherits the set of installed packages in /opt/ros/fuerte
rosws init ~/fuerte_workspace /opt/ros/fuerte
NOTE: rosw is a type of rosintall package which doesn't install default. if we haven't installed rosintall in the last steps, we must do with the next command
sudo apt-get install python-rosinstall
- Create a sandbox directory for the new packages
When we create a new package we always must put it in a directory that is in the enviroment variable ROS_PACKAGE_PATH. All the directories that are added with rosw is added automatically to this variable. For this. we create a sandbox directory to which we will add the hide file .rosinstall with rosw
We create the sandbox directory in our workspace created before and we add to the workspace
mkdir ~/fuerte_workspace/sandbox
rosws set ~/fuerte_workspace/sandbox
Each time that the entries of workspace change it, is necessary to do a re-source
source ~/fuerte_workspace/setup.bash
Also, it is advisable to add the last line to the file ~/.bashrc just after the line to which already added at the beginning of installation for haven't execute each time we starts our computer.
To confirm that our path has been modified we can execute the next line
$ echo $ROS_PACKAGE_PATH
and we must obtain a output similar to this
/home/your_user_name/fuerte_workspace/sandbox:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks
Installing ROS Groovy in Ubuntu 12.04
Sources.list Configuration
For the computer accept packages.ros.org must enter in the terminal the next line.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
Keys Configuration
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Installation
We make sure that the server ROS.org is indexed.
sudo apt-get update
Install the library package and complete tools: ROS, rx, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception.
sudo apt-get install ros-groovy-desktop-full
Also you can install independently the libraries, tools and stacks.
Rosdep Initialization
Before of to use ROS we must initialize rosdep which allows us easily to install the source system dependencies that we want to compile and also is necessary for execute some basic components of ROS.
sudo rosdep init
rosdep update
Enviroment Configuration
For the enviroment variables are added each time you start the computer type this lines
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc
. ~/.bashrc
We can check if we have added typing gedit ~/.bashrc and looking at end of file
IMPORTANT!!! If there is more than one ROS distribution installed in the file ~/.bashrc must only contain the version you're using
Independent Tools
Rosinstall is used often in the terminal, but it is distributed individually. Rosinstall allows you to download source code trees for packages and ROS stacks. For install this tool, you write in the terminal the next line
sudo apt-get install python-rosinstall
Create a ROS Workspace
- Create a new workspace
With the next command we go to create a workspace in ~/catkin_ws which inherits the set of installed packages in /opt/ros/groovy
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
Initially our workspace is empty, only have a CmakeList.txt in the src directory. For make the workspace execute
cd ~/catkin_ws/
catkin_make
Finally, we configure the enviroment variabble to take into consideration our new workspace, for this execute
source ~/catkin_ws/devel/setup.bash
For to do this change continuous we can add the previous line to end of file ~/.bashrc