[Documentation] [TitleIndex] [WordIndex

Installing on PandaBoard from source

(This Tutorial has been copied from http://wiki/groovy/Installation/Raspbian/Source and then modified.) Architecture: armel/armhf

Install from source requires that you download and compile the source code on your own.

PandaBoard Install

If you have not already setup your machine please do the following:

Do the initial software install of Ubuntu 12.04 Precise Pangolin on your SD card.

Do your preinitial configuration of the platform with the Ubuntu

Do your initial configuration of the platform.

Installation

Setup

Install bootstrap dependencies (PandaBoard):

Now to install some of the OS packages that we need for ROS.

Install Core Library dependencies (aka, 'ROS BASE"):

Now check if all dependencies are installed, it is possible that some packages are skipped like libboost , so install them seperately

an recheck if they are installed.

Next, you install graphical library dependencies, if you plan on using ROS graphical tools (aka 'ROS FULL'):

In case of problems with libtiff?-dev, do not install libtiff4-dev.

Collada

If you want to use any collada package (included in both the 'desktop' and 'robot' installations), you will need to install collada-dom from source http://sourceforge.net/projects/collada-dom/files/latest/download

$ sudo apt-get install libxml2-dev

$ mkdir /opt/ros/collada
$ cd /opt/ros/collada
  {download the collada source from the above link and put it in this directory}
$ tar -xf collada*; rm collada*tgz; cd collada*; mkdir build; cd build
$ cmake .. ; make -j1; sudo make install

Collada requires assimp. There is something wrong with the ASSIMP binary, so you also need to compile it from source http://sourceforge.net/projects/assimp/files/assimp-3.0

$ mkdir /opt/ros/assimp
$ cd /opt/ros/assimp
  {download the assmip source zip from the above link and put it in this directory}
$ unzip assimp*; rm assimp*zip*; cd assimp*; mkdir build; cd build
$ cmake ..; make -j1; sudo make install

Modify CMakeLists.txt in collada_urdf to default to ASSIMP version 3 by replacing "set(IS_ASSIMP3 0)" at line 36(?) with :

  set(IS_ASSIMP3 1)
  add_definitions(-DIS_ASSIMP3)

Remaining Dependencies

I am not sure which package needs the tbb library, but you need to install it by hand

I am not sure if that is the right approach, but since make install did not work I just copied the .so files and the numbered e.g. .so.2 files from the build folder to /lib. Its also possible that you have to copy them to /usr/lib.

Next, you must get the wstool, rospkg, rosdep and install it. Execute these lines also if you have installed the tools already.

You can also use pip.

#startinstallation

ROS Installation

Start by building the core ROS packages.

First create the area in the directories that we will be using:

Next ensure rosdep has been initialized:

Building the catkin Packages

ROS is in the process of converting to a new build system, catkin, but not all of the packages have been converted and the two build systems cannot be used simultaneously. Therefore it is necessary to build the core ROS packages first (catkin packages) and then the rest.

Create a catkin Workspace

In order to build the core packages, you will need a catkin workspace. Create one now:

Next we will want to fetch the core packages so we can build them. We will use wstool for this. Select the wstool command for the particular variant you want to install:

ROS-Comm: (Bare Bones) (recommended) ROS package, build, and communication libraries. No GUI tools.

Robot: Is defined to be core, stable, ROS libraries for any robot hardware. It is the "general robotics" libraries of ROS. It may not contain any GUI dependencies extens ROS-Comm, stacks: bond_core, common_msgs, common, diagnostics,

The Desktop installations may wont work probably on the PandaBoard, if you want to try a Desktop installation look at the corresponding part in the Raspbian Pi Tutorial!

The -j8 option downloads 8 packages in parallel. For the PandaBoard it is possible to use the -j8 option. If you get failures during the update process use the -j1 option like for the Raspbian Pi.

In addition to the 3 variants above, more are defined in REP 131 such as robot, perception, etc. Just change the package path to the one you want.

Resolving Dependencies

Before you can build your catkin workspace you need to make sure that you have all the required dependencies. We use the rosdep tool for this:

This will look at all of the packages in the src directory and find all of the dependencies they have. Then it will recursively install the dependencies.

The --from-paths option indicates we want to install the dependencies for an entire directory of packages, in this case src. The --ignore-src option indicates to rosdep that it shouldn't try to install any ROS packages in the src folder from the package manager, we don't need it to since we are building them ourselves. The --rosdistro option is required because we don't have a ROS environment setup yet, so we have to indicate to rosdep what version of ROS we are building for. Finally, the -y option indicates to rosdep that we don't want to be bothered by too many prompts from the package manager.

After a while (and maybe some prompts for your password) rosdep will finish installing system dependencies and you can continue.

If you get an error you can manually check if all dependencies are satified:

sudo rosdep check --from-paths src --ignore-src --rosdistro groovy

You will have to manually install remaining dependencies:

sudo apt-get install -y <package_1> <package_2>

For the Desktop package that did not work, because it could not find packages like collada-dom and a few others. So I installed all these packages by hand (will take a long time to compile) and then removed the dependencies from the package.xml files. rosdep will tell you which package is missing which dependency, so you know which package.xml files have to be edited. After that you should be able to retry the rosdep command and have it install all the other dependencies.

It is possible that you will get an error because python-rosdep cannot be resolved. It's no problem because you already have installed the rosdep using sudo pip install -U rosdep or sudo easy_install rosdep


Building the catkin Workspace

If you are building Desktop installations, at this point there are additional steps to do. Please have a look in the Raspbian Pi tutorial.

Now you are ready to build the catkin packages. We will use the catkin_make_isolated command because there are both catkin and plain cmake packages in the base install, when developing on your catkin only workspaces you should use catkin/commands/catkin_make.

Invoke catkin_make_isolated:

Note: The default catkin installation location would be ~/ros_catkin_ws/install_isolated, if you would like to install some where else then you can do this by adding the --install-space /opt/ros/groovy argument to your catkin_make_isolated call.

For usage on a robot without Raspbain, it is recommended to install compiled code into /opt/ros/groovy just as the Raspbain packages would do. It is also possible to install elsewhere (e.g. /usr), but it is not recommended unless you really know what you are doing.

Please see REP 122: Filesystem Hierarchy Layout for more detailed documentation on how the installed files are placed.

Note: In the above command we are running the catkin_make_isolated command from the catkin source folder because it has not been installed yet, once installed it can be called directly.

Now the packages should have been installed to ~/ros_catkin_ws/install_isolated or to wherever you specified with the --install-space argument. If you look in that directory you will see that a setup.bash file have been generated. To utilize the things installed there simply source that file. Lets do that now before building the rest of ROS:

Build the rosbuild Packages

Now that you have the catkin ROS packages built and sourced, you can build any of the packages and stacks using the rosbuild build system.

Create a rosbuild workspace

Note: You do not need to do this part of the installation for the ROS-Comm: (Bare Bones) variant as it does not contain any rosbuild packages in it but you can do it if you plan to use own stacks or packages in an different place.

Like with building catkin packages, it is convenient to build rosbuild packages in a workspace. Lets create a ROS workspace using rosws:

Note that we are pointing the ROS workspace to the catkin install location that we built in the previous step. This allows the ROS workspace to always source the catkin install location environment before you use the ROS workspace.

Configure Environment

Now you can setup this workspace:

It is recommended that you put this line in your ~/.bashrc file.

You also have to add the workspace directory ~/ros_ws to the ROS_PACKAGE_PATH environment variable:

You can create a file like this my_ros_init.sh in ~/ros_ws.

Add the ROS_PACKAGE_PATH environment variable command to this file and also source it in your ~/.bashrc file like this:

Now you can create own packages or stacks in this workspace.

If there are some questions have a look at the Raspbian Pi Tutorial.


2024-11-16 14:38