Ask Your Question
0

how do I "install" stacks into /opt/ros?

asked 2012-09-12 03:20:39 -0500

Bob Dean gravatar image

Good morning. I am putting together a distro of common ros components my company may want to use, building from source to upgrade the boost version. The core is installed after some headaches (btw where do i post how to upgrade a boost version? i cannot find an actual tutorial anywhere.).

Now i have some additional packages such as vision_opencv. It is built in ~/ros, but how do i get it installed into /opt/ros/fuerte_myversion?

edit retag flag offensive close merge delete

Comments

Do you plan to make those packages publicly available? Then you can use willow's release infrastructure to build .deb packages that install to /opt/ros.

dornhege gravatar image dornhege  ( 2012-09-12 03:26:45 -0500 )edit

To post about how to upgrade a boost version, you could ask and answer your own question. An admin can mark it as accepted.

tfoote gravatar image tfoote  ( 2012-09-16 18:47:42 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2012-09-16 18:57:16 -0500

tfoote gravatar image

Using rosbuild there is no install target. I highly recommend if you're building/packaging things to go into /opt/ros you build them in place. That is effectively how we build the debian packages which we release. (There's some magic to work through chroots etc in the debbuild system).

This is one of the primary features driving the development of the new build system, catkin. To see how the debian building happens see the rosdeb package single_deb.py is being used for rosbuild stacks in fuerte and groovy.

It's invocation is like this:

#!/bin/bash -x
OS_PLATFORM=precise
ARCH=amd64
STACK_NAME=arm_navigation_experimental
PACKAGE_NAME=ros-groovy-arm-navigation-experimental
DISTRO_NAME=groovy

echo $DISTRO_NAME
echo $STACK_NAME
echo $OS_PLATFORM
echo $ARCH

sudo apt-get install pbuilder git-core python-rospkg python-vcstools -y

cat > $WORKSPACE/build.bash << DELIM
source /opt/ros/cturtle/setup.sh
export ROS_PACKAGE_PATH=$WORKSPACE/ros_release:$WORKSPACE/release:$ROS_PACKAGE_PATH

#noupload while testing
rosrun rosdeb single_deb.py $DISTRO_NAME $STACK_NAME $OS_PLATFORM $ARCH
DELIM

bash $WORKSPACE/build.bash

There's lots of state setup on the build machine to support this. There are people who have replicated some or all of this, but it's definitely not designed to be deployed externally and will not be a focus of development. The new buildsystem does have a goal of supporting external projects deploying the infrastructure behind firewalls.

edit flag offensive delete link more
1

answered 2012-09-12 03:29:35 -0500

dornhege gravatar image

A proper system-wide install on a debian based system should preferably be done via .deb packages, which you'll have to build from your sources.

There is also the alternative to just copy the files there or use any other install tool/script. Eventually it's just a matter of having the files under /opt/ros with proper access rights.

catkin might make this easier in the future.

edit flag offensive delete link more

Comments

An easy way to create packages could be checkinstall for all stacks that are not built using bloom yet. I guess some scripting for copying all files of a package might be necessary though.

Lorenz gravatar image Lorenz  ( 2012-09-12 03:39:56 -0500 )edit

so there is no common way to make the .deb files yet?

Bob Dean gravatar image Bob Dean  ( 2012-09-12 04:19:36 -0500 )edit

For the old build system (rosbuild), Willow uses a bunch of scripts. I guess it is non-trivial to set them up, but you can find them in the release repo. The new release system, bloom, is much easier to use, it is based on git-buildpackage.

Lorenz gravatar image Lorenz  ( 2012-09-12 04:24:40 -0500 )edit

The most common way that exists is the release infrastructure from willowgarage. I'm not sure if catkin/bloom is official, yet.

dornhege gravatar image dornhege  ( 2012-09-12 04:24:51 -0500 )edit
1

answered 2012-09-12 03:59:39 -0500

allenh1 gravatar image

You'll have to be a little more specific... The package manager (on ubuntu) places the stacks here automatically.

However, if you are referring to something from source, you will need to configure a ros workspace. This allows you to keep the system installed packages in /opt/ros, and keep the ones you've installed from source separately.

edit flag offensive delete link more
0

answered 2012-09-12 05:44:41 -0500

Bob Dean gravatar image

updated 2012-09-12 06:07:48 -0500

Lorenz gravatar image

this bash script seems to work:

if [ "$1" == "" ] 
    then
    echo ""
    echo "Ros support installer usage:"
    echo "sh install_ros_package.sh [path to ros pacakge ]"
    echo "example: "
    echo "sh install_ros_package.sh mypackage"
    exit 0
else

    ROSDIR=$ROS_ROOT/../..

    # huh. so roscd is a bash function. go figure.
    # anywhoo, it does not exist unless we includ rosbash
    source $ROSDIR/share/rosbash/rosbash

    echo "package:  $1"
    echo "ros root: $ROS_ROOT"

    which roscd
    which ls

    roscd $1

    echo "now in: $PWD"

    umask 022

    sudo cp -r include/* $ROSDIR/include
    sudo cp -r bin/* $ROSDIR/bin
    sudo cp -r lib/* $ROSDIR/lib

    # install .msg
    sudo mkdir -p $ROSDIR/share/$1/msg/
    sudo cp -r msg/* $ROSDIR/share/$1/msg
    # install .h
    sudo mkdir -p $ROSDIR/include/$1
    sudo cp -r msg_gen/cpp/include/* $ROSDIR/include/

    # put other installs here... apparently my system isn't generating python
    sudo mkdir -p $ROSDIR/share/common-lisp/ros/$1/msg
    sudo cp -r msg_gen/lisp/* $ROSDIR/share/common-lisp/ros/$1/msg

    sudo chmod -R 775 $ROSDIR/bin/*
    sudo chmod -R 775 $ROSDIR/lib/*
    sudo chmod -R 775 $ROSDIR/include/*
    sudo chmod -R 775 $ROSDIR/share/common-lisp/ros
    sudo chmod -R 775 $ROSDIR/share/$1

fi
edit flag offensive delete link more

Comments

1

I'm not sure if that script really works. It might be necessary to fix the rpath of executables and libraries. Also, creating debian packages will definitely help installing/uninstalling/upgrading packages. Did you have a look at checkinstall? I believe it will work together with your script.

Lorenz gravatar image Lorenz  ( 2012-09-12 05:47:43 -0500 )edit

Have a look here for a shell function for fixing rpaths. Also, make sure that you have ROS_NOBUILD files in all your packages, otherwise rosmake won't work.

Lorenz gravatar image Lorenz  ( 2012-09-12 06:18:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-09-12 03:20:39 -0500

Seen: 588 times

Last updated: Sep 16 '12