(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Rosbuild: How to use ViSP from Subversion repository rather than the last release

Description: This tutorial explains how to use ViSP current in development version from Subversion repository. This tutorial is only to consider if you use rosbuild.

Tutorial Level: BEGINNER

Next Tutorial: Using ViSP snapshot

Using ViSP trunk

visp package is a ROS wrapper over ViSP library. This package downloads and build ViSP lastest release. This tutorial explains how to use rather the current in development version of ViSP available from Subversion repository.

We suppose now that visp package was downloaded.

roscd visp

ViSP Subversion repository is available from Inria GForge.

To use the current version from trunk, you may modify the visp/Makefile file like this:

all: visp

SVN_DIR     = ViSP-trunk
SVN_URL     = svn://scm.gforge.inria.fr/svn/visp/trunk/ViSP
BUILD_DIR   = ViSP-build
include $(shell rospack find mk)/svn_checkout.mk

INSTALL_DIR = install

# Gdk include path is required for Fedora 15.
CMAKE_CXX_FLAGS=-DNDEBUG -march=native -O3 -g `pkg-config --cflags gtk+-2.0`

CMAKE_FLAGS = -DCMAKE_INSTALL_PREFIX=`rospack find visp`/$(INSTALL_DIR)/ \
              -DCMAKE_CXX_FLAGS:STRING="$(CMAKE_CXX_FLAGS)"              \
              -DBUILD_DEMOS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF \
              -DBUILD_SHARED_LIBS=ON -DBUILD_DEPRECATED=ON               \
              -DUSE_DC1394_1=OFF -DUSE_FFMPEG=OFF                        \
              -DUSE_DC1394_2=ON -DUSE_V4L2=ON -DUSE_OPENCV=ON            \
              -DUSE_COIN_SIMULATOR=ON -DUSE_LAPACK=ON -DUSE_GSL=OFF      \
              -DUSE_XML2=ON -DUSE_GTK2=ON -DUSE_LIBJPEG=ON               \
              -DUSE_LIBPNG=ON -DUSE_LIBPLOTTER=ON                        \
              -DDESIRED_QT_VERSION=4                                     \
              -DOpenCV_DIR=`rospack find opencv2`/opencv                 \
              -DBOOST_ROOT=`rosboost-cfg --root`

visp: $(INSTALL_DIR)/installed

$(INSTALL_DIR)/installed: $(SVN_DIR)
        mkdir -p $(BUILD_DIR)                    \
        && cd $(BUILD_DIR)                       \
        && cmake ../$(SVN_DIR) ${CMAKE_FLAGS}    \
        && make -j 8                             \
        && make -j 8 install
        touch $(INSTALL_DIR)/installed

clean:
        rm -rf $(INSTALL_DIR)

wipe: clean
        rm -rf $(BUILD_DIR)

Note: Since tabulation are replaced by spaces in this wiki presentation, if you copy/paste the content of the Makefile you will come to build issues. You should rather download the Makefile.

To build visp package just run:

make wipe
rosdep install visp
rosmake visp

Wiki: visp/Tutorials/UsingViSPTrunk (last edited 2014-04-17 08:42:48 by FabienSpindler)