angusleigh / leg_tracker

BSD 3-Clause "New" or "Revised" License
192 stars 100 forks source link

build error #26

Closed aaravrav142 closed 3 years ago

aaravrav142 commented 3 years ago

Hi,

I am building on ubuntu 18 with ROS melodic and constantly getting the following errors.

CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o: In function `DetectLegClusters::laserCallback(boost::shared_ptr<sensor_msgs::LaserScan_<std::allocator<void> > const> const&)':
detect_leg_clusters.cpp:(.text._ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE[_ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE]+0xc05): undefined reference to `cv::ml::RTrees::getVotes(cv::_InputArray const&, cv::_OutputArray const&, int) const'
collect2: error: ld returned 1 exit status
leg_tracker/CMakeFiles/detect_leg_clusters.dir/build.make:225: recipe for target '/home/alexr/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters' failed
make[2]: *** [/home/alexr/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters] Error 1
CMakeFiles/Makefile2:21967: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

I can make out that the error is related to opencv. I have opencv 3.4.5 sourced installed on my system.

Can you help.

Thanks.

angusleigh commented 3 years ago

The cv::ml::RTrees::getVotes function seems to exist for OpenCV 3.4.5: https://docs.opencv.org/3.4.5/d0/d65/classcv_1_1ml_1_1RTrees.html. I'm not an expert at these types of linking issues but I'd guess it's a misconfigured OpenCV instillation. I would try re-installing.

You could also give the noetic branch a try, if you're able to upgrade to Ubutunu 20.04.