Difference between revisions of "Ros"

From ArchWiki
Jump to: navigation, search
(Setup)
(Setup Notes - Groovy: added note about yaourt install)
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Mathematics and science (English)]]
+
[[Category:Mathematics and science]]
{{i18n|ROS}}
+
{{Out of date}}
+
 
+
{{Note|Python3 and gcc46 is not supported in ros yet, might be best to wait for a update.}}
+
 
+
Originally from the [http://www.ros.org/wiki/diamondback/Installation/Arch ROS wiki].
+
 
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.
 
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.
  
== Setup ==
+
== Setup Notes - Groovy ==
Get dependencies, and create alternate python dir to workaround shebang line in scripts that point to python3. Thanks to [http://evorobo.blogspot.com/2011/07/robotics-operating-system.html DavidS]. Symlink libboost_filesystem.so to libboost_filesystem-mt.so, not an ideal solution, but it works. Then install rosinstall, and ros.
+
  
pacman -S cmake wget python-yaml svn boost python-yaml pil python-numpy python2-yaml python2-pip python2-distribute python2
+
Currently, groovy is the only (semi-)supported ROS release that has Arch packages. The core, comm, and robot variants have meta-packages that should install all the necessary packages: {{AUR|ros-groovy-ros}}, {{AUR|ros-groovy-ros-comm}}, (TODO: robot metapackage). In addition, {{AUR|ros-groovy-rviz}} (along with its dependencies) has a package. Beware, the dependency tree goes at least five levels deep at times. {{AUR|yaourt}} handles it (somewhat), {{AUR|packer}} falls flat. It is strongly recommended that you install {{AUR|ros-groovy-ros}} first to prevent yaourt's ridiculous dependency thrashing.
yaourt -S log4cxx pysvn-py2 gcc45
+
mkdir /usr/local/bin/alt 
+
ln -s /usr/bin/python2 /usr/local/bin/alt/python 
+
ln -s /usr/bin/gcc-4.5 /usr/local/bin/alt/gcc 
+
ln -s /usr/bin/g++-4.5 /usr/local/bin/alt/g++
+
export PATH=/usr/local/bin/alt:$PATH
+
ln -s /usr/lib/libboost_filesystem.so /usr/lib/libboost_filesystem-mt.so
+
sudo easy_install-2.7 -U rosinstall
+
rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=desktop-full&overlay=no"
+
  
Follow the [http://www.ros.org/wiki/diamondback/Installation/Arch ROS wiki] afterwards.
+
The packages are all available in the maintainer's github: [https://github.com/zootboy/arch-ros-stacks arch-ros-stacks]. Not all packages there are in a working state, so use with caution. Please, report any issues with the packages on their respective AUR pages.
  
== Alternate Setup ==
+
== Usage Notes - Groovy ==
This is more or less the same as above...
+
Install an AUR helper...
+
{{bc|
+
#Grab dependencies for packer
+
sudo pacman -S bash curl grep jshon pacman sed
+
mkdir -p ~/tmp
+
cd ~/tmp
+
wget https://aur.archlinux.org/packages/pa/packer/packer.tar.gz
+
tar -xzf packer
+
cd packer
+
makepkg
+
#Adjust to match your version...
+
sudo packman -U packer-20120221-1-any.pkg.tar.xz
+
sudo ln -s /usr/bin/packer /usr/bin/yaourt
+
}}
+
Install some dependencies
+
{{bc|
+
sudo pacman -S cmake wget python2-yaml mercurial subversion git python2-distribute
+
sudo packer -S pysvn-py2 log4cxx
+
}}
+
  
Grab rosinstall
+
Due to the fact that Ubuntu and Arch handle the python2/3 binary split differently, catkin_make[_isolated] will not work on its own. To use these commands, create the following aliases in your ~/.bashrc (or equivalent):
{{bc|
+
alias catkin_make='catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so'
sudo easy_install-2.7 -U rosinstall
+
alias catkin_make_isolated='catkin_make_isolated -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so'
}}
+
Pull down all the sources for a full desktop install
+
{{bc|<nowiki>
+
rosinstall ~/ros 'http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no' -n</nowiki>
+
}}
+
  
{{bc|1=
+
Without these lines, cmake will default to python 3, which you don't want. It is also possible to simply add the defines into any call of catkin_make[_isolated] (which you have to do if you want to call those commands within a script).
mkdir /usr/local/bin/alt 
+
ln -s /usr/bin/python2 /usr/local/bin/alt/python
+
export PATH=/usr/local/bin/alt:$PATH
+
}}
+
Add arch as a ros installer
+
{{bc|
+
git clone https://github.com/lubosz/rosstacks.git
+
cd rosstacks
+
git diff 67ca3..HEAD > arch.patch
+
cp arch.patch ~/ros/ros
+
cd ~/ros/ros
+
patch -p1 < arch.patch
+
}}
+
  
{{bc|
+
For further information on how to use ROS, see the [http://www.ros.org/wiki/ROS/Tutorials ROS Tutorials].
source ~/ros/setup.sh && rosmake ros ros_comm --rosdep-install
+
}}
+
== Issues ==
+
If package fails to build. You can apply this [http://code.google.com/p/bullet/issues/attachmentText?id=481&aid=-7554332888653313858&name=zero_initialize.patch&token=a338762d74f222c8a20c9170102cf429 patch].
+

Revision as of 17:50, 27 May 2013

ROS is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.

Setup Notes - Groovy

Currently, groovy is the only (semi-)supported ROS release that has Arch packages. The core, comm, and robot variants have meta-packages that should install all the necessary packages: ros-groovy-rosAUR, ros-groovy-ros-commAUR, (TODO: robot metapackage). In addition, ros-groovy-rvizAUR (along with its dependencies) has a package. Beware, the dependency tree goes at least five levels deep at times. yaourtAUR handles it (somewhat), packerAUR falls flat. It is strongly recommended that you install ros-groovy-rosAUR first to prevent yaourt's ridiculous dependency thrashing.

The packages are all available in the maintainer's github: arch-ros-stacks. Not all packages there are in a working state, so use with caution. Please, report any issues with the packages on their respective AUR pages.

Usage Notes - Groovy

Due to the fact that Ubuntu and Arch handle the python2/3 binary split differently, catkin_make[_isolated] will not work on its own. To use these commands, create the following aliases in your ~/.bashrc (or equivalent):

alias catkin_make='catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so'
alias catkin_make_isolated='catkin_make_isolated -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so'

Without these lines, cmake will default to python 3, which you don't want. It is also possible to simply add the defines into any call of catkin_make[_isolated] (which you have to do if you want to call those commands within a script).

For further information on how to use ROS, see the ROS Tutorials.