There are currently (June 2016) three ways of installing ROS on Gentoo:
- Following the official (but experimental) guide using an ebuild repository.
- Following the official Linux distribution agnostic guide.
- Using ROS provided by the Gentoo ebuild repository (Portage's default).
If you are unsure which one to pick, stick with the ebuild repository-based method since the other two methods may require some troubleshooting. The other two options may be more attractive to purists.
ROS provides two links on ROS installation on Gentoo:
Following the official guide and using the ebuild repository
This section is intended to be complementary to the official ROS Jade Installation Guide.
ROS jade has an ebuild repository that is currently being maintained by the ROS Organization found here.
You will need to set up the ROS ebuild repository manually.
[ros-overlay] location = /var/repo/ros-overlay sync-type = git sync-uri = https://github.com/ros/ros-overlay.git masters = gentoo
The location directory must exist before sync. Create the path or adjust it to somewhere appropriate.
Then sync the repository (future emerge --sync operations will do this automatically):
emaint sync -r ros-overlay
In system dependencies:
It is not recommended to use pip in Gentoo. A large effort was made to ensure that all dependencies for primarily supported OS's (e.g. Ubuntu) are also resolved for Gentoo. Core ROS packages can be installed from the ebuild repository.
emerge --ask dev-python/wstool dev-python/rosdep dev-python/rospkg dev-python/catkin_pkg dev-python/rosinstall_generator
The instructions from the official guide can be followed from this point.
Linux distro agnostic ROS install
This section is intended to be complementary to http://wiki.ros.org/Installation/Source.
The method suggested will install all ROS packages directly into your catkin workspace (so they won't be available in other workspaces) and installs ROS software dependencies from portage. As in the ebuild repository based guide, avoid using pip and install the required software for bootstrapping the ROS installation instead.
emerge --ask dev-vcs/wstool dev-python/rosdep dev-python/rospkg dev-python/catkin_pkg dev-python/rosinstall_generator
Installing ROS from Portage
ROS is already represented in Portage. For example:
emerge --ask ros-meta/desktop
Some environment variables should be set for correct operation of ROS:
It is easiest to simply put them in the user's ~/.bashrc file.
- ROScore won't start (it will appear inactive for some minutes and then display a message) unless the hostname is resolved correctly. The message will refer to http://wiki.ros.org/ROS/NetworkSetup
- If you miss rosrun and other shell commands, install dev-ros/rosbash
- Sourcing /etc/profile may help
- sci-libs/vtk requires use-flag rendering
- dev-ros/std_msgs requires use-flags ros_messages_eus ros_messages_lisp ros_messages_nodejs if you want to avoid warning at compile time
- the same use-flags should also be set for dev-ros/sensor_msgs dev-ros/geometry_msgs and other msgs as required
- Setting PYTHONPATH to the above export can break regular 3.x systems. The requirements of ROS on Python can clash with the requirements of Portage and create emerge hell. Just like the standard implementation for development and experimentation it might be best to have the Gentoo install in a VM.