ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi there

I compiled Electric from source on my laptop which is running 12.04, as my collaborators are using Electric and I have other projects going on the laptop. I took some notes on the way and they may be helpful for anyone trying to do the same. It seems to work for the things that I am working on at present (OpenNI, OpenCV related), but your mileage will vary. It should work for you as far as compiling anyway. If it doesn't, let me know the error because I probably just forgot something.

Here is a list of extra things that I did apart from following the ubuntu electric install from source guide (note that I did not add electric to my repositories, but rather the Fuerte repository). Mostly what I do differently is arranging the dependencies so that they are fulfilled. Also note that there are steps missing here with respect to installation of some of the packages since I had already installed Fuerte on this machine, which meant some packages that I need were already there.

In ros/rosdep.yaml...

Under "boost: ubuntu:" add

   precise:
     apt:
       packages: [libbost-all-dev]

In common_rosdeps/rosdep.yaml...

Under "assimp:ubunbu:" add

    precise:
      apt:
        packages: [libassimp-dev]

Under "eigen: ubuntu:" add

    precise:
      apt:
        packages: [libeigen3-dev]

Under "yaml-cpp" add

  ubuntu:
    precise:
      apt:
        packages: [ yaml-cpp ]

In bullet/rosdep.yaml...

Under "glut: ubuntu:" add

    precise:
      apt:
        packages: [ freeglut3-dev ]

In vision_opencv/rosdep.yaml...

At the end of the section on "opencv2.3: ubuntu:" add

    precise:
      apt:
        packages: [libopencv-dev]
opencv2:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]
opencv2.3.1:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]

In the file visualization_common/ogre/ensure-nvidia-cg-toolkit-is-installed.sh...

before "if [ -x $INSTALLER ]; then" add

if [ -e /usr/include/Cg/cg.h -a \
         -e /usr/include/Cg/cgGL.h ]; then
        for lib_path in /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu
        do
            if [ -e ${lib_path}/libCg.so -a \
             -e ${lib_path}/libCgGL.so ]; then
                echo "Package nvidia-cg-toolkit seems to be correctly installed."
                exit 0
            fi
        done
fi

In the file In vision_opencv/opencv2/manifest.xml...

Change the following line

 <cpp cflags="`pkg-config opencv-2.3.1 --cflags`" lflags="`pkg-config opencv-2.3.1 --libs`"/>

to

 <cpp cflags="`pkg-config opencv --cflags`" lflags="`pkg-config opencv --libs`"/>

I also needed to run in a shell

sudo apt-get install libcv-dev libhighgui-dev

to get the OpenCV C headers on my machine.

In the file stage/rosdep.yaml add

libjpeg:
  ubuntu:
    precise:
      apt:
        packages: [libjpeg8-dev]

Build libgtest as per the instructions at http://askubuntu.com/questions/145887/why-no-library-files-installed-for-google-test-on-12-04...

cd /usr/src/gtest
sudo cmake .
sudo make
sudo mv libg* /usr/lib/

Other packages that I have used that may need special treatment that I took some notes for (let me know if you need a push with these): newer versions of openni_ros & image_pipeline, perception_blort and brics_3d.

I hope this is helpful for someone.

Best wishes

Damien

Hi there

I compiled Electric from source on my laptop which is running 12.04, as my collaborators are using Electric and I have other projects going on the laptop. I took some notes on the way and they may be helpful for anyone trying to do the same. It seems to work for the things that I am working on at present (OpenNI, OpenCV related), but your mileage will vary. It should work for you as far as compiling anyway. If it doesn't, let me know the error because I probably just forgot something.

Here is a list of extra things that I did apart from following the ubuntu electric install from source guide (note that I did not add electric to my repositories, but rather the Fuerte repository). Mostly what I do differently is arranging the dependencies so that they are fulfilled. Also note that there are steps missing here with respect to installation of some of the packages since I had already installed Fuerte on this machine, which meant some packages that I need were already there.

In ros/rosdep.yaml...

Under "boost: ubuntu:" add

   precise:
     apt:
       packages: [libbost-all-dev]

In common_rosdeps/rosdep.yaml...

Under "assimp:ubunbu:" add

    precise:
      apt:
        packages: [libassimp-dev]

Under "eigen: ubuntu:" add

    precise:
      apt:
        packages: [libeigen3-dev]

Under "yaml-cpp" add

  ubuntu:
    precise:
      apt:
        packages: [ yaml-cpp ]

In bullet/rosdep.yaml...

Under "glut: ubuntu:" add

    precise:
      apt:
        packages: [ freeglut3-dev ]

In vision_opencv/rosdep.yaml...

At the end of the section on "opencv2.3: ubuntu:" add

    precise:
      apt:
        packages: [libopencv-dev]
opencv2:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]
opencv2.3.1:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]

In the file visualization_common/ogre/ensure-nvidia-cg-toolkit-is-installed.sh...

before "if [ -x $INSTALLER ]; then" add

if [ -e /usr/include/Cg/cg.h -a \
         -e /usr/include/Cg/cgGL.h ]; then
        for lib_path in /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu
        do
            if [ -e ${lib_path}/libCg.so -a \
             -e ${lib_path}/libCgGL.so ]; then
                echo "Package nvidia-cg-toolkit seems to be correctly installed."
                exit 0
            fi
        done
fi

In the file In vision_opencv/opencv2/manifest.xml...

Change the following line

 <cpp cflags="`pkg-config opencv-2.3.1 --cflags`" lflags="`pkg-config opencv-2.3.1 --libs`"/>

to

 <cpp cflags="`pkg-config opencv --cflags`" lflags="`pkg-config opencv --libs`"/>

I also needed to run in a shell

sudo apt-get install libcv-dev libhighgui-dev

to get the OpenCV C headers on my machine.

In the file stage/rosdep.yaml add

libjpeg:
  ubuntu:
    precise:
      apt:
        packages: [libjpeg8-dev]

Build libgtest as per the instructions at http://askubuntu.com/questions/145887/why-no-library-files-installed-for-google-test-on-12-04...

cd /usr/src/gtest
sudo cmake .
sudo make
sudo mv libg* /usr/lib/

Other packages that I have used that may need special treatment that I took some notes for (let me know if you need a push with these): newer versions of openni_ros & image_pipeline, perception_blort and brics_3d.

I hope this is helpful for someone.someone. My suggestion would be to attempt a build and, seeing an error, make the appropriate fix from the above list.

Best wishes

Damien

Hi there

I compiled Electric from source on my laptop which is running 12.04, as my collaborators are using Electric and I have other projects going on the laptop. I took some notes on the way and they may be helpful for anyone trying to do the same. It seems to work for the things that I am working on at present (OpenNI, OpenCV related), but your mileage will vary. It should work for you as far as compiling anyway. If it doesn't, let me know the error because I probably just forgot something.

Here is a list of extra things that I did apart from following the ubuntu electric install from source guide (note that I did not add electric to my repositories, but rather the Fuerte repository). Mostly what I do differently is arranging the dependencies so that they are fulfilled. Also note that there are steps missing here with respect to installation of some of the packages since I had already installed Fuerte on this machine, which meant some packages that I need were already there.

In ros/rosdep.yaml...

Under "boost: ubuntu:" add

   precise:
     apt:
       packages: [libbost-all-dev]

In common_rosdeps/rosdep.yaml...

Under "assimp:ubunbu:" add

    precise:
      apt:
        packages: [libassimp-dev]

Under "eigen: ubuntu:" add

    precise:
      apt:
        packages: [libeigen3-dev]

Under "yaml-cpp" add

  ubuntu:
    precise:
      apt:
        packages: [ yaml-cpp ]

In bullet/rosdep.yaml...

Under "glut: ubuntu:" add

    precise:
      apt:
        packages: [ freeglut3-dev ]

In vision_opencv/rosdep.yaml...

At the end of the section on "opencv2.3: ubuntu:" add

    precise:
      apt:
        packages: [libopencv-dev]
opencv2:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]
opencv2.3.1:
  ubuntu:
    precise:
      apt:
        packages: [libopencv-dev]

In the file visualization_common/ogre/ensure-nvidia-cg-toolkit-is-installed.sh...

before "if [ -x $INSTALLER ]; then" add

if [ -e /usr/include/Cg/cg.h -a \
         -e /usr/include/Cg/cgGL.h ]; then
        for lib_path in /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu
        do
            if [ -e ${lib_path}/libCg.so -a \
             -e ${lib_path}/libCgGL.so ]; then
                echo "Package nvidia-cg-toolkit seems to be correctly installed."
                exit 0
            fi
        done
fi

In the file In vision_opencv/opencv2/manifest.xml...

Change the following line

 <cpp cflags="`pkg-config opencv-2.3.1 --cflags`" lflags="`pkg-config opencv-2.3.1 --libs`"/>

to

 <cpp cflags="`pkg-config opencv --cflags`" lflags="`pkg-config opencv --libs`"/>

I also needed to run in a shell

sudo apt-get install libcv-dev libhighgui-dev

to get the OpenCV C headers on my machine.

In the file stage/rosdep.yaml add

libjpeg:
  ubuntu:
    precise:
      apt:
        packages: [libjpeg8-dev]

Build libgtest as per the instructions at http://askubuntu.com/questions/145887/why-no-library-files-installed-for-google-test-on-12-04...

cd /usr/src/gtest
sudo cmake .
sudo make
sudo mv libg* /usr/lib/

(actually, as I understand it, the correct thing to do here would be to have gtest built for each package individually using cmake, but it seems to be okay this way in our case - see the link at the source for why).

Other packages that I have used that may need special treatment that I took some notes for (let me know if you need a push with these): newer versions of openni_ros & image_pipeline, perception_blort and brics_3d.

I hope this is helpful for someone. My suggestion would be to attempt a build and, seeing an error, make the appropriate fix from the above list.

Best wishes

Damien