ROS Stack Installation
来源:互联网 发布:新仙女木 知乎 编辑:程序博客网 时间:2024/05/17 05:50
http://wiki.ros.org/ROS/Tutorials/StackInstallation
- ROS
- Tutorials
- StackInstallation
Stack Installation
Description: This tutorial describes how to install 3rd party stacksKeywords: stack, package, installation, install
Tutorial Level: BEGINNER
目录
- What to install
- Where are your stacks located
- ROS installed via SVN
- ROS installed via Pre-compiled binaries (boxturtle)
- Downloading from Source
- Using SVN to pull down an entire repository
- Using GIT to pull down a repository
- Installing from source archive
What to install
ROS has a growing number of 3rd party software packages that can provide drivers or algorithms you can use on your robot. You can find this software by selectingBrowse Software at the top of the page.
Once you have found a package you are interested in you will want to install it. This tutorial will assume that that you are interested in installing theusb_cam package or the laser_ortho_projector package. The instructions for other packages should be roughly the same.
First, you need to locate where your stacks are located by ROS, and depends on your type of installation.
Then, two different ways of installing the repository will be explained:
Using SVN to pull down an entire repository
Using GIT to pull down a repository
Where are your stacks located
ROS stores groups of packages in stacks, and it stores the stacks wherever you want. ROS will search for packages and stacks that are listed in theROS_PACKAGE_PATH environmental variable.
The location of setup.sh and the default for ROS_PACKAGE_PATH depends on how you installed ROS. If you installed usingSVN then you should get the following, with username replaced by your username.
ROS installed via SVN
$ echo $ROS_PACKAGE_PATH/home/username/ros/stacks$ more /home/username/ros/setup.shexport ROS_ROOT=/home/username/ros/rosexport PATH=$ROS_ROOT/bin:$PATHexport PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATHif [ ! "$ROS_MASTER_URI" ] ; then export ROS_MASTER_URI=http://localhost:11311 ; fiexport ROS_PACKAGE_PATH=/home/username/ros/stackssource $ROS_ROOT/tools/rosbash/rosbash
If you installed from pre-compiled binaries of debian packages you should get something similar to this.
ROS installed via Pre-compiled binaries (boxturtle)
$ echo $ROS_PACKAGE_PATH/opt/ros/boxturtle/stacks$ more /opt/ros/boxturtle/setup.shexport ROS_ROOT=/opt/ros/boxturtle/rosexport PATH=$ROS_ROOT/bin:$PATHexport PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATHif [ ! "$ROS_MASTER_URI" ] ; then export ROS_MASTER_URI=http://localhost:11311 ; fiexport ROS_PACKAGE_PATH=/opt/ros/boxturtle/stackssource $ROS_ROOT/tools/rosbash/rosbash
You can also edit setup.sh if you would like to install your stacks somewhere specific.
export ROS_PACKAGE_PATH=/home/username/ros/stacks:/home/username/project:/home/username/ros_tutorials
Downloading from Source
Most of the packages and stacks you may be interested are available as source code. ROS makes building from source code easy.
Using SVN to pull down an entire repository
So for example lets say you wanted to use the usb_cam driver, and you decided to download the entire Bosch ROS Repository in case there was anything else you needed.
First, make sure you have SVN installed.
$ sudo aptitude install subversion
If you installed the pre-compiled binary version of ROS then you may want to create a directory to build stacks from source. First edit your ROS_PACKAGE_PATH in /opt/ros/boxturtle/setup.sh or in your .bashrc
export ROS_PACKAGE_PATH=~/ros/stacks:/opt/ros/boxturtle/stacks
Next, in a terminal switch to the directory that is now in your ROS_PACKAGE_PATH.
1 $ mkdir ~/ros && mkdir ~/ros/stacks 2 $ cd ~/ros/stacks
Then you can checkout the trunk from the svn repository listed in the wiki.The trunk if you are curious is the default branch of code in a svn repository, as opposed to the experimental branch.
1 $ svn co https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg/trunk/ bosch-ros-pkg
After it is downloaded you can change to the usb_cam directory and compile the source code.
1 $ cd bosch-ros-pkg/bosch_drivers/usb_cam 2 $ rosmake --rosdep-install
--rosdep-install will install system dependencies such aslibswscale that the code will need to compile. If rosmake produces an error the first time you run it, try running it again as it may have needed to automatically add the subdirectory to its index.
Using GIT to pull down a repository
The other common software configuration management tool you will see used isGit, so in this part we will use git to pull down the CCNY Robotics Lab ROS Repository and we will build thelaser_ortho_projector from source.
First, make sure you have Git installed.
1 $ sudo aptitude install git-core
Next, in a terminal switch to a directory that is in your ROS_PACKAGE_PATH. In this case we will assume that you installed ROS from SVN
1 cd ~/ros/stacks
Then you can clone the git repository
1 git clone http://robotics.ccny.cuny.edu/git/ccny-ros-pkg.git/
Once it has finished downloading switch to the directory and run rosmake
1 cd ccny-ros-pkg/scan_tools/laser_ortho_projector 2 rosmake --rosdep-install
rosmake may need to be run twice to add the new directory, and compile.
Installing from source archive
The developer may have released a version of the software as a source code archive. This might be a file such as scan_tools-0.1.0.tar.bz2, which we will assume is in your ~/Downloads directory.
1 cd ~/ros/stacks 2 mv ~/Downloads/scan_tools-0.1.0.tar.bz2 . 3 bunzip2 scan_tools-0.1.0.tar.bz2 4 tar -vpxf scan_tools-0.1.0.tar 5 rm scan_tools-0.1.0.tar
- ROS Stack Installation
- ROS installation
- ros dynamixel_motors stack
- ROS navigation stack
- ROS:使用ROS_arduino_bridge Stack
- Ros(fuerte)+rgbdslam_freiburg+installation
- ROS-learning-CartoGrapher Installation Steps
- [ROS]如何建立Navigation Stack
- Cartographer ROS for TurtleBots Building & Installation
- Installation QT ROS 插件 for Ubuntu 16.04
- ROS:roscd: No such package/stack 'beginner_tutorials'
- HOWTO: Installation of Mellanox Infiniband OFED stack on Linux.
- ROS导航包navigation stack中关键包的作用
- ROS
- ros
- Ros
- ROS
- ros
- ubuntu13.04下安装win7
- win音视频--Dshow视频采集显示
- linux 重启网络服务
- 分割单向链表
- oc 内存管理 释放异常
- ROS Stack Installation
- 【Android】添加菜单和监听菜单方法详解
- 压位加速-poj-2443-Set Operation
- myeclipse10中有几处bug
- 大数斐波那契比较 杭电1316 JAVA
- C#_delegate - 有返回值手工调用
- MVC 3 开发实践系列课程(1). 课程安排及知识点
- 搜狗起诉360后遭反诉 分别索赔4500万和5100万
- ubuntu 添加右键启动终端