User Tools

Site Tools


robotsoftware:mobotware:install:mobotware-ros

Compile MobotWare with ROS Electric

This should only be a problem for older versions of MobotWare. MobotWare has been updated, and the conflict is resolved in the current version.


We are currently working on solving the problems between ROS and MobotWare.

There are problems with

libcv-dev
libhighgui-dev

and the OpenCV package from ROS.

This is a walkthrough on how to solve the problem.

It does not solv all problems yet, we are still working on it. The testing stopped at bayer2rgb, they may bee more problems thatt needs to be fixed in order to run an older version of MobotWare alongside ROS.

There are no plans for updating this page because of the new version of MobotWare, but we plan on leaving it as is.

Initial changes

First remove

libcv-dev
libhighgui

if you haven´t removed them, they will be removed automatically when you install ROS.

Then install ROS, when it is installed return here.

Execute these commands - Check you version of opencv to make sure you create the right links.

sudo ln -s /usr/include/opencv-2.3.1/opencv2 /usr/include/opencv2
sudo ln -s /usr/include/opencv-2.3.1/opencv /usr/include/opencv

Update

/usr/lib/pkgconfig/opencv-2-3-1.pc

so it look like this

# Package Information for pkg-config

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv-2.3.1/opencv
includedir_new=${prefix}/include/opencv-2.3.1

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.3.1
#Libs:  -l${exec_prefix}/lib/libopencv_contrib.so.2.3.1 -l${exec_prefix}/lib/libopencv_legacy.so.2.3.1 -l${exec_prefix}/lib/libopencv_objdetect.so.2.3.1 -l${exec_prefix}/lib/libopencv_calib3d.so.2.3.1 -l${exec_prefix}/lib/libopencv_features2d.so.2.3.1 -l${exec_prefix}/lib/libopencv_video.so.2.3.1 -l${exec_prefix}/lib/libopencv_highgui.so.2.3.1 -l${exec_prefix}/lib/libopencv_ml.so.2.3.1 -l${exec_prefix}/lib/libopencv_imgproc.so.2.3.1 -l${exec_prefix}/lib/libopencv_flann.so.2.3.1 -l${exec_prefix}/lib/libopencv_core.so.2.3.1
Libs: -L${exec_prefix}/lib -lopencv_contrib -lopencv_legacy -lopencv_objdetect -lopencv_calib3d -lopencv_features2d -lopencv_video -lopencv_highgui -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core
Cflags: -I${includedir_old} -I${includedir_new}

Change following make files

(This is only the first file that has to be updated. Try to find a solution so it can all be written in one file so you don´t have to change it.)

ulmsserver

/aurobotserves/trunk/src/ulmsserver/makefile

Remove

   -lcxcore
   -lcv

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in ulmsserver makefile> LDFLAGS = -g3 -O0 -L../../lib -lurob4o -lugen4o -lumap4o -lcxcore -lcv -ldl -rdynamic \

  1. lcurses -lreadline -lpng -liau_mat

</sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in ulmsserver makefile> LDFLAGS = -g3 -O0 -L../../lib -lurob4o -lugen4o -lumap4o -L/usr/lib `pkg-config opencv-2.3.1 –libs` -ldl -rdynamic \

  1. lcurses -lreadline -lpng -liau_mat

#Removed because of ROS update: -lcxcore -lcv -lhighgui #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

auclient

/aurobotserves/trunk/src/auclient/makefile

Remove

   -lcxcore
   -lcv
   -lhighgui

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in auclient makefile> LDFLAGS = -g3 -lcxcore -lcv -lhighgui \

  1. L../../lib -lurob4o -lugen4o -lumap4o \

-lpng -ldl -rdynamic -lcurses -lreadline -lurob4o -liau_mat </sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in auclient makefile> LDFLAGS = -g3 -L/usr/lib `pkg-config opencv-2.3.1 –libs` \

  1. L../../lib -lurob4o -lugen4o -lumap4o \

-lpng -ldl -rdynamic -lcurses -lreadline -lurob4o -liau_mat # extra preprocessor defines (mainly for module testcode) # change NO_USE_HIGHGUI to USE_HIGHGUI for X-display direct # if NO_USE_HIGHGUI, then -lhighgui may be removed from LDFLAGS

#Removed because of ROS update: -lcxcore -lcv -lhighgui #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

cameracalibrate

/aurobotserves/trunk/utils/cameracalibrate/makefile

Remove

   -lcxcore
   -lcv
   -lhighgui

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in cameracalibrate makefile> LDFLAGS = -lcxcore -lcv -lhighgui </sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in cameracalibrate makefile> LDFLAGS = -L/usr/lib `pkg-config opencv-2.3.1 –libs` #Removed because of ROS update: -lcxcore -lcv -lhighgui #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

stereocalibrate

/aurobotserves/trunk/utils/stereocalibrate/makefile

Remove

   -lcxcore
   -lcv
   -lhighgui

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in stereocalibrate makefile> LDFLAGS = -lcxcore -lcv -lhighgui </sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in stereocalibrate makefile> LDFLAGS = -L/usr/lib `pkg-config opencv-2.3.1 –libs` #Removed because of ROS update: -lcxcore -lcv -lhighgui #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

utmpose2kml

/aurobotserves/trunk/utils/utmpose2kml/makefile

Remove

   -lcxcore

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in utmpose2kml makefile> LDFLAGS = -L../../lib -lugen4o -lcxcore -lexpat </sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in utmpose2kml makefile> LDFLAGS = -L../../lib -lugen4o -L/usr/lib `pkg-config opencv-2.3.1 –libs` -lexpat #Removed because of ROS update: -lcxcore #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

bayer2rgb

There is some problem caused by ugen4 haven´t found it yet. Uncommented bayer2rgb from

.../utils/makefile

Here are the bayer2rgb makefile

/aurobotserves/trunk/utils/bayer2rgb/makefile

Remove

   -lcxcore

from the LDFLAGS <sxh java; highlight: [1]; title: Changes in bayer2rgb makefile> LDFLAGS = -lcxcore -lcv -lhighgui -L../../lib -lugen4o </sxh> Insert

-L/usr/lib `pkg-config opencv-2.3.1 --libs`

in LDFLAGS <sxh java; highlight: [1]; title: Changes in bayer2rgb makefile> LDFLAGS = -L/usr/lib `pkg-config opencv-2.3.1 –libs` -L../../lib -lugen4o #Removed because of ROS update: -lcxcore -lcv -lhighgui #Inserted because of ROS update: -L/usr/lib `pkg-config opencv-2.3.1 –libs` </sxh>

robotsoftware/mobotware/install/mobotware-ros.txt · Last modified: 2021/08/14 04:21 (external edit)