Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catkin_make Error | ROS Melodic OpenCV 3.4.0 #17

Closed
jnisa opened this issue Jul 26, 2019 · 3 comments
Closed

catkin_make Error | ROS Melodic OpenCV 3.4.0 #17

jnisa opened this issue Jul 26, 2019 · 3 comments

Comments

@jnisa
Copy link

jnisa commented Jul 26, 2019

Hi,

After clonning the repository to my catkin workspace, and after make the installations required (python-scipy and pykalman), I performed the catkin_make and I got the following error:

[ 83%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters
[ 86%] Building CXX object leg_tracker/CMakeFiles/extract_positive_training_clusters.dir/src/laser_processor.cpp.o
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]+0x6bc): 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:226: recipe for target '/home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters' failed
make[2]: *** [/home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters] Error 1
CMakeFiles/Makefile2:830: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 88%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/train_leg_detector
[ 88%] Built target train_leg_detector
[ 91%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/extract_positive_training_clusters
[ 91%] Built target extract_positive_training_clusters
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

I got the Melodic version of ROS and the OpenCV is the required, 3.4.0.

Can you help me to fix this problem?

Thanks in advance!

@angusleigh
Copy link
Owner

angusleigh commented Jul 26, 2019

detect_leg_clusters.cpp:(.text._ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE[_ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE]+0x6bc): undefined reference to `cv::ml::RTrees::getVotes(cv::_InputArray const&, cv::_OutputArray const&, int) const'

The error is coming from this line: https://github.com/angusleigh/leg_tracker/blob/melodic/src/detect_leg_clusters.cpp#L216

I'm wondering if your OpenCV is properly installed and the version 3.4 is actually be called for compilation?

Can you try using this formula instead? https://github.com/angusleigh/leg_tracker/blob/melodic/src/detect_leg_clusters.cpp#L212 and deleting these lines https://github.com/angusleigh/leg_tracker/blob/melodic/src/detect_leg_clusters.cpp#L210-L220.

@jnisa
Copy link
Author

jnisa commented Jul 27, 2019

It worked :) Thanks!

@jnisa jnisa closed this as completed Jul 27, 2019
@hoppss
Copy link

hoppss commented Aug 19, 2020

cmakelists didnot include and link OpenCV for this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants