Difference between revisions of "ROS"

From ArchWiki
Jump to: navigation, search
(fix format)
(Added instructions for Kinetic)
Line 5: Line 5:
 
{{Out of date|AUR packages described here either not migrated to AUR4, or do not reflect recent changes such as {{AUR|ros-indigo-desktop}}}}
 
{{Out of date|AUR packages described here either not migrated to AUR4, or do not reflect recent changes such as {{AUR|ros-indigo-desktop}}}}
 
[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 Notes - Kinetic ==
 +
 +
Kinetic packages on the AUR are a work in progress. There are [https://github.com/bchretien/arch-ros-stacks/issues/57#issuecomment-228612399 some issues regarding opencv3] that have not been fully resolved yet. That said, installing a metapackage such as {{AUR|ros-kinetic-ros-core}} or {{AUR|ros-kinetic-robot}} should bring in all required dependencies. Beware of AUR helpers, some cannot navigate the highly complex dependency trees that ROS generates.
 +
 +
Packages are being added on an as-needed basis. Please send package requests to <aur AT seangreenslade DOT com>, and post any issues with the current packages in their respective AUR comments section.
 +
 
== Setup Notes - Jade ==
 
== Setup Notes - Jade ==
  

Revision as of 03:39, 23 December 2016

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Does not conform to Help:Style, poor shell one-liners (Discuss in Talk:ROS#)

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Relies on a horribly written, outdated third-party resource for installation instructions (yaourt, pacman -Sy, etc.) (Discuss in Talk:ROS#)

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: AUR packages described here either not migrated to AUR4, or do not reflect recent changes such as ros-indigo-desktopAUR (Discuss in Talk:ROS#)

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 - Kinetic

Kinetic packages on the AUR are a work in progress. There are some issues regarding opencv3 that have not been fully resolved yet. That said, installing a metapackage such as ros-kinetic-ros-coreAUR or ros-kinetic-robotAUR should bring in all required dependencies. Beware of AUR helpers, some cannot navigate the highly complex dependency trees that ROS generates.

Packages are being added on an as-needed basis. Please send package requests to <aur AT seangreenslade DOT com>, and post any issues with the current packages in their respective AUR comments section.

Setup Notes - Jade

For ROS Jade, see Installation Instructions for jade in Arch Linux.

Note: If using gcc in version 6.x or above, log4cxx 0.10 (one of dependencies) will not build. Use SVN version (log4cxx-svnAUR in aur) until 0.11 is released.

Setup Notes - Indigo

For ROS Indigo, see Installation Instructions for Indigo in Arch Linux.

Setup Notes - Hydro

For ROS Hydro, see Installation Instructions for Hydro in Arch Linux.

Ogre 1.8

You may want to use ogre 1.8 (aur package) if you want to use gazebo. In order to compile some hydro packages that requires ogre (like rviz) you can add this export to the pkgbuild:

export PKG_CONFIG_PATH=/opt/OGRE-1.8/lib/pkgconfig/:$PKG_CONFIG_PATH

Setup Notes - Groovy

ROS Groovy core, comm, and robot variants have meta-packages that should install all the necessary packages: ros-groovy-rosAUR[broken link: archived in aur-mirror], ros-groovy-ros-commAUR[broken link: archived in aur-mirror], (TODO: robot metapackage). In addition, ros-groovy-rvizAUR[broken link: archived in aur-mirror] (along with its dependencies) has a package.

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 do not 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.

Rebuild when boost is updated

When you update a library that ROS depends on, e.g. boost, then you need to rebuild all the packages that link to it. You can search for the packages, with a command similar to the one below. You can use the output from that to rebuild the AUR packages with your favorite AUR helper/wrapper.

export LANG=C;grep -r "libboost" /opt/ros/indigo |  awk '{ print $3 }' | grep opt |  pacman -Qo - | awk '{ print $5 }' | tr '\n' ' '

Or use the following script that build all ros-indigo-* packages following the dependency tree:

 ros_version="ros-indigo"
 
 pack_file=$1
 if $pack_file == "" ; then
	 pack_file=$(mktemp)
 fi
 
 function contains() {
 for item in $(cat $1); do
     if [ "$2" == "$item" ]; then
         return 0
     fi
 done
 return 1
 }
 
 export built=""
 
 function get_deps() {
   deps=$(pacman -Qi $1 | grep 'Depends On' | tr ' ' '\n' | grep ${ros_version})
   echo $deps
 }

 function build_package() {
  local pack=$1
 	local recursion_level=$2
  if contains $pack_file $pack; then
		 return 0
  fi
	printf '%*s' $recursion_level 
  echo "building $pack "
  deps=$(get_deps $pack)
  for dep in $deps; do
     build_package $dep $(( $recursion_level + 1 ))
  done
	yaourt -S $pack --noconfirm
	echo "$pack" >> $pack_file
 }
 
 echo "getting list of package built with boost"
 list=$(export LANG=C;grep -r "libboost" /opt/ros/indigo | awk '{ print $3 }' | grep opt | pacman -Qo - | awk '{ print $5 }' | tr '\n' ' ')
 
 for pack in $list; do
   build_package $pack 0
 done