Difference between revisions of "ROS"
Line 22: | Line 22: | ||
# Get all libraries and tools | # Get all libraries and tools | ||
sudo apt-get install python-pip��build-essential python-yaml cmake subversion wget python-setuptools mercurial git-core��python-yaml libapr1-dev libaprutil1-dev libbz2-dev python-dev python-empy python-nose libgtest-dev python-paramiko libboost-all-dev liblog4cxx10-dev pkg-config libqt4-dev qt4-qmake | sudo apt-get install python-pip��build-essential python-yaml cmake subversion wget python-setuptools mercurial git-core��python-yaml libapr1-dev libaprutil1-dev libbz2-dev python-dev python-empy python-nose libgtest-dev python-paramiko libboost-all-dev liblog4cxx10-dev pkg-config libqt4-dev qt4-qmake | ||
− | # Some of the ROS tools need to come from PIP as I wasn't able to get them through Aptitude | + | #: Some of the ROS tools need to come from PIP as I wasn't able to get them through Aptitude |
pip install rospkg rosdep rosinstall catkin-pkg wstool | pip install rospkg rosdep rosinstall catkin-pkg wstool | ||
# Not sure what the following two lines do | # Not sure what the following two lines do | ||
sudo rosdep init | sudo rosdep init | ||
rosdep update | rosdep update | ||
− | # Now we create a catkin workspace and initialize to build core ROS packages | + | #: Now we create a catkin workspace and initialize to build core ROS packages |
mkdir -p ~/ros_core_ws | mkdir -p ~/ros_core_ws | ||
cd ~/ros_core_ws | cd ~/ros_core_ws | ||
wstool init src https://raw.github.com/gist/4129582/e8889c0fc3af2f95892190e0fabc2bd535208355/base.rosinstall | wstool init src https://raw.github.com/gist/4129582/e8889c0fc3af2f95892190e0fabc2bd535208355/base.rosinstall | ||
− | # Build catkin and install it. catkin is the low-level build system of ROS | + | #: Build catkin and install it. catkin is the low-level build system of ROS |
./src/catkin/bin/catkin_make | ./src/catkin/bin/catkin_make | ||
./src/catkin/bin/catkin_make install | ./src/catkin/bin/catkin_make install | ||
− | # Setup catkin build environment | + | #: Setup catkin build environment |
source ~/ros_core_ws/install/setup.bash | source ~/ros_core_ws/install/setup.bash | ||
− | # Now we create and initialize a workspace to put all our ROS packages | + | #: Now we create and initialize a workspace to put all our ROS packages |
mkdir ~/ros | mkdir ~/ros | ||
cd ~/ros | cd ~/ros | ||
rosws init . ~/ros_core_ws/install/ | rosws init . ~/ros_core_ws/install/ | ||
− | # Current ROS distribution does not recognize Linaro. We have to patch the os detection file. | + | #: Current ROS distribution does not recognize Linaro. We have to patch the os detection file. |
vim /usr/local/lib/python2.7/dist-packages/rospkg/os_detect.py | vim /usr/local/lib/python2.7/dist-packages/rospkg/os_detect.py | ||
Add the following bold faced changes OS_UBUNTU='ubuntu' '''OS_LINARO='linaro'''' OsDetect.register_default(OS_UBUNTU, LsbDetect("Ubuntu")) '''OsDetect.register_default(OS_UBUNTU, LsbDetect("Linaro"))''' | Add the following bold faced changes OS_UBUNTU='ubuntu' '''OS_LINARO='linaro'''' OsDetect.register_default(OS_UBUNTU, LsbDetect("Ubuntu")) '''OsDetect.register_default(OS_UBUNTU, LsbDetect("Linaro"))''' | ||
− | # There are a couple dependencies required before we can compile iRobot's Create ROS package | + | #: There are a couple dependencies required before we can compile iRobot's Create ROS package |
− | roslocate info kdl | + | roslocate info kdl > kdl.rosinstall |
rosws merge kdl.rosinstall | rosws merge kdl.rosinstall | ||
rosws update | rosws update | ||
rosdep install kdl | rosdep install kdl | ||
rosmake kdl | rosmake kdl | ||
− | roslocate info bullet | + | roslocate info bullet > bullet.rosinstall |
rosws merge bullet.rosinstall | rosws merge bullet.rosinstall | ||
rosws update | rosws update | ||
Line 57: | Line 57: | ||
rosdep update | rosdep update | ||
# And build geometry package, the last dependency | # And build geometry package, the last dependency | ||
− | roslocate info geometry | + | roslocate info geometry > geometry.rosinstall |
In the geometry package's rosinstall file, switch the branch name to fuerte_devel. For some reason the default branch does not work. | In the geometry package's rosinstall file, switch the branch name to fuerte_devel. For some reason the default branch does not work. | ||
vim geometry.rosinstall | vim geometry.rosinstall | ||
Line 67: | Line 67: | ||
rosmake geometry | rosmake geometry | ||
# Finally we can install iRobot's ROS package | # Finally we can install iRobot's ROS package | ||
− | roslocate info irobot_create_2_1 | + | roslocate info irobot_create_2_1 > irobot_create_2_1.rosinstall |
vim irobot_create_2_1.rosinstall | vim irobot_create_2_1.rosinstall | ||
− | rosws merge irobot_create_2_1 | + | rosws merge irobot_create_2_1 |
rosws update | rosws update | ||
rosmake irobot_create_2_1 | rosmake irobot_create_2_1 |
Revision as of 10:33, 18 December 2012
DRAFT
Contents
Introduction
Rob Linsalata of WillowGarage has posted a great demo video of ROS running on Gumstix Overo COM and iRobot Create platform. Unfortunately it looks like Rob did not get a chance to write up a full tutorial on what it takes to get ROS running on the Gumstix and iRobot collaboration. So here is how I managed to get ROS Groovy (the latest release as of December 2012) to drive the Create.
Prerequisites
- 1 Development computer running Ubuntu (I used 12.04)
- 1 Gumstix Overo COM with WiFi
- 1 Gumstix Turtlecore Expansion board
- 1 MicroSD Card (4GB or larger recommended)
Installation
Get an operating system
First thing you probably want to do is toinstall Linaro on an Overo COM. Linaro is a variant of Ubuntu and is designed for embedded application. �So follow that link and get a Linaro image flashed into your MicroSD. The next part is where the challenge arises. WillowGarage does not provide ARM binaries. They only provide precompiled packages for your everyday computers running Intel or AMD CPUs. So we have to compile ROS from scratch for ARM architecture. Setting up a cross compilation environment is not a simple task, so I decided to do it natively on an Overo (even it means letting it compile over night).
ROS Native Compilation
- Get all libraries and tools
sudo apt-get install python-pip��build-essential python-yaml cmake subversion wget python-setuptools mercurial git-core��python-yaml libapr1-dev libaprutil1-dev libbz2-dev python-dev python-empy python-nose libgtest-dev python-paramiko libboost-all-dev liblog4cxx10-dev pkg-config libqt4-dev qt4-qmake
- Some of the ROS tools need to come from PIP as I wasn't able to get them through Aptitude
pip install rospkg rosdep rosinstall catkin-pkg wstool
- Not sure what the following two lines do
sudo rosdep init rosdep update
- Now we create a catkin workspace and initialize to build core ROS packages
mkdir -p ~/ros_core_ws cd ~/ros_core_ws wstool init src https://raw.github.com/gist/4129582/e8889c0fc3af2f95892190e0fabc2bd535208355/base.rosinstall
- Build catkin and install it. catkin is the low-level build system of ROS
./src/catkin/bin/catkin_make ./src/catkin/bin/catkin_make install
- Setup catkin build environment
source ~/ros_core_ws/install/setup.bash
- Now we create and initialize a workspace to put all our ROS packages
mkdir ~/ros cd ~/ros rosws init . ~/ros_core_ws/install/
- Current ROS distribution does not recognize Linaro. We have to patch the os detection file.
vim /usr/local/lib/python2.7/dist-packages/rospkg/os_detect.py Add the following bold faced changes OS_UBUNTU='ubuntu' OS_LINARO='linaro' OsDetect.register_default(OS_UBUNTU, LsbDetect("Ubuntu")) OsDetect.register_default(OS_UBUNTU, LsbDetect("Linaro"))
- There are a couple dependencies required before we can compile iRobot's Create ROS package
roslocate info kdl > kdl.rosinstall rosws merge kdl.rosinstall rosws update rosdep install kdl rosmake kdl roslocate info bullet > bullet.rosinstall rosws merge bullet.rosinstall rosws update rosdep install bullet rosmake bullet If the last step fails indicating that a packaged named bullet was not found, try updating dependency map before running rosmake rosdep update
- And build geometry package, the last dependency
roslocate info geometry > geometry.rosinstall In the geometry package's rosinstall file, switch the branch name to fuerte_devel. For some reason the default branch does not work. vim geometry.rosinstall version: tf_rework version: fuerte_devel rosws merge geometry.rosinstall rosws update rosdep install geometry rosmake geometry
- Finally we can install iRobot's ROS package
roslocate info irobot_create_2_1 > irobot_create_2_1.rosinstall vim irobot_create_2_1.rosinstall rosws merge irobot_create_2_1 rosws update rosmake irobot_create_2_1
Running ROS
- http://ros.org/wiki/groovy/Installation/Source [^] - http://coldogga.wordpress.com/2012/12/07/ros-groovy-on-linaro-pandaboard/