An error in compiling the sample icp

In the MRPT 0.9.1
When compiling the sample icp on kubuntu 10.04

Linking CXX executable icp
../../lib/libmrpt-vision.so.0.9.1: undefined reference to `cv::FAST(cv::Mat const&, std::vector >&, int, bool)'
collect2: ld returned 1 exit status

Thanks for your help

jlblanco's picture

Hi , What version of opencv

Hi ,

What version of opencv do you have? (In the MRPT build dir, do a "cmake . | grep OpenCV")

In case you used opencv from the Ubuntu repository and later changed to a manually compiled version, try deleting the MRPT's "CMakeCache.txt" file and rebuilding again just to make sure that's not the problem.

JL

lukc1234's picture

The same problem

Hi!

I actually encountered the same problem, while trying to compile MRPT package on Debian based Xenomai.
There seems to be a problem with the vision lib, and i haven't been able to fix it yet.

Does anyone have any suggestions?

(For my project it is only important to build Slam without any machine vision support (like bumblebee, OpenCV, etc...), only need icp-slam with laser sensor. How do I build only this? )

Thanks, Luka

jlblanco's picture

Hi Luka, If you check

Hi Luka,

If you check DISABLE_OPENCV (in "advanced" cmake options) I think the errors will go, but you'll probably lost many other features (load/save grid maps as images, ...).

What exact version of Xenomai (and OpenCV) do you use?

Edit: It seems that Xenomai is a RT kernel, not a full distribution with precompiled binaries... in that case, relevant info is just opencv & gcc versions.

JL

lukc1234's picture

SOlved

Hello!

I managed to compile both the 0.9.0.orig and 0.9.1 versions with full support (OpenCV etc, without Bumblebee) on Xenomai (Yes, it's realtime). The problem was, there was one small lib missing. Which was of course my fault, you did a great job at preparing MRPT and the instructions for compiling it. ( I have the latest OpenCV, btw )

Although, when i invoke
$  ccmake  $ $  .  $
in the same dir after i ran
$  cmake  $ $ path to mrpt root  $
it doesn't open the cmake opts. Don't know why, and at the moment I don't really care :) As long as I know MRPT can run on our machine, it's ok. Now back to programming...

I'll probably have some more stupid questions in the future, so Thank you very much for being patient.
R,
Luka

jcorrea's picture

Same error

I have the same error, how did you manage to solve it?

ricardo's picture

Error executing the localization example

Hi,
I do not achieve to execute the pf-localization application. It always ends with an exception about parsing the ini file. Both application and ini file are the ones included in the svn.
Can anyone give me some light about how to solve this problem, please?
I'm executing the application from the svn (read only) code.

The execution line:
ricardo@england:~/Development/mrpt-read-only/bin$ ./pf-localization ../share/mrpt/config_files/pf-localization/localization_demo.ini

The output:

ParticleFilter Localization - Version 0.2 - Part of the MRPT
MRPT C++ Library: MRPT 0.9.2 - BUILD DATE Sep 2 2010
-------------------------------------------------------------------

-------------------------------------------------------------
RAWLOG_FILE = /home/ricardo/Development/mrpt-read-only/share/mrpt/datasets/localization_demo.rawlog
MAP_FILE = /home/ricardo/Development/mrpt-read-only/share/mrpt/datasets/localization_demo.simplemap.gz
GT_FILE =
OUT_DIR_PREFIX = LOG_LOCALIZATION
#particles = [40000 ]
-------------------------------------------------------------

----------- [CParticleFilter::TParticleFilterOptions] ------------

PF_algorithm = pfStandardProposal
m_resamplingMethod = prMultinomial
adaptiveSampleSize = Y
sampleSize = 1
BETA = 0.500000
pfAuxFilterOptimal_MaximumSearchSamples = 10
powFactor = 1.000000
max_loglikelihood_dyn_range = 15.000000
pfAuxFilterStandard_FirstStageWeightsMonteCarlo = N
pfAuxFilterOptimal_MLE = N

====================================================================

Set of internal maps for 'CMultiMetricMap' object

====================================================================
likelihoodMapSelection = -1 (Fuse from all maps)
enableInsertion_pointsMap = true
enableInsertion_landmarksMap = true
enableInsertion_beaconMap = true
enableInsertion_gridMaps = true
enableInsertion_gasGridMaps = true
enableInsertion_heightMaps = true
Showing next the 1 internal maps:

------------------------- Internal map 1 out of 1 --------------------------
C++ Class: 'COccupancyGridMap2D'
m_disableSaveAs3DObject = false
resolution = 0.060
min_x = -10.000
max_x = 10.000
min_y = -10.000
max_y = 10.000

----------- [COccupancyGridMap2D::TInsertionOptions] ------------

mapAltitude = 0.000000
maxDistanceInsertion = 15.000000
maxOccupancyUpdateCertainty = 0.550000
useMapAltitude = NO
considerInvalidRangesAsFreeSpace = YES
decimation = 1
horizontalTolerance = 0.000000
CFD_features_gaussian_size = 1.000000
CFD_features_median_size = 3.000000
wideningBeamsWithDistance = NO

----------- [COccupancyGridMap2D::TLikelihoodOptions] ------------

likelihoodMethod = lmLikelihoodField_Thrun
enableLikelihoodCache = Y
LF_stdHit = 0.200000
LF_zHit = 0.950000
LF_zRandom = 0.050000
LF_maxRange = 80.000000
LF_decimation = 20
LF_maxCorrsDistance = 0.300000
LF_alternateAverageMethod = N
MI_exponent = 10.000000
MI_skip_rays = 10
MI_ratio_max_distance = 2.000000
rayTracing_useDistanceFilter = N
rayTracing_decimation = 10
rayTracing_stdHit = 0.300000
consensus_takeEachRange = 30
consensus_pow = 1.00
OWA_weights = [0.010 0.010 0.010 ... 0.010 0.010 ] (size=100)

====================================================================

Set of internal maps for 'CMultiMetricMap' object

====================================================================
likelihoodMapSelection = -1 (Fuse from all maps)
enableInsertion_pointsMap = true
enableInsertion_landmarksMap = true
enableInsertion_beaconMap = true
enableInsertion_gridMaps = true
enableInsertion_gasGridMaps = true
enableInsertion_heightMaps = true
Showing next the 1 internal maps:

------------------------- Internal map 1 out of 1 --------------------------
C++ Class: 'COccupancyGridMap2D'
m_disableSaveAs3DObject = false
resolution = 0.060
min_x = -10.000
max_x = 10.000
min_y = -10.000
max_y = 10.000

----------- [COccupancyGridMap2D::TInsertionOptions] ------------

mapAltitude = 0.000000
maxDistanceInsertion = 15.000000
maxOccupancyUpdateCertainty = 0.550000
useMapAltitude = NO
considerInvalidRangesAsFreeSpace = YES
decimation = 1
horizontalTolerance = 0.000000
CFD_features_gaussian_size = 1.000000
CFD_features_median_size = 3.000000
wideningBeamsWithDistance = NO

----------- [COccupancyGridMap2D::TLikelihoodOptions] ------------

likelihoodMethod = lmLikelihoodField_Thrun
enableLikelihoodCache = Y
LF_stdHit = 0.200000
LF_zHit = 0.950000
LF_zRandom = 0.050000
LF_maxRange = 80.000000
LF_decimation = 20
LF_maxCorrsDistance = 0.300000
LF_alternateAverageMethod = N
MI_exponent = 10.000000
MI_skip_rays = 10
MI_ratio_max_distance = 2.000000
rayTracing_useDistanceFilter = N
rayTracing_decimation = 10
rayTracing_stdHit = 0.300000
consensus_takeEachRange = 30
consensus_pow = 1.00
OWA_weights = [0.010 0.010 0.010 ... 0.010 0.010 ] (size=100)

Loading '.simplemap' file...Caught MRPT exception:

=============== MRPT EXCEPTION =============
void mrpt::utils::CStream::ReadObject(mrpt::utils::CSerializable*), line 656:
Stored class does not match with existing object!!:
Stored: CSensFrameProbSequence
Expected: CSimpleMap
Exception while parsing typed object 'CSensFrameProbSequence' from stream!

jlblanco's picture

Hi Ricardo, Well, this was a

Hi Ricardo,

Well, this was a subtle bug. Hopefully it's fixed now with this patch: http://code.google.com/p/mrpt/source/detail?r=2164

The thing is... it worked for me! There are a series of classes that changed their names over MRPT history, and they have duplicated name entries in the RTTI subsystem...but aparently the "old" names were stupidly registered twice, and depending on the compiler or whatever, the registration order decides if it works or not (as in your case!).

Please, when possible, update your SVN working copy and confirm me if this definitely solves the problem.

JL

ricardo's picture

the bug in the pf-localization example

Hi JL,
I updated the svn version, and the demo now works. Thanks a lot for your help.
By the way, I messed up a little bit with my post on this forum, and copied it on a new forum thread. Could you please remove it for me? (I tried to remove but was not allowed).
Sorry for the inconvenience

jlblanco's picture

So it was here... I knew I

So it was here... I knew I already read you a few days ago, but couldn't find where :-)

Son't worry, I will mark the new thread as solved and that it is.

Syndicate content

The Mobile Robot Programming Toolkit (MRPT) initiative (C) 2012