acfr / cam_lidar_calibration

(ITSC 2021) Optimising the selection of samples for robust lidar camera calibration. This package estimates the calibration parameters from camera to lidar frame.
Apache License 2.0
436 stars 102 forks source link

Error when running the quick start #48

Closed juannn01 closed 8 months ago

juannn01 commented 9 months ago

Hi! I am facing an error when running the calibration process using the quick-start data provided. A snapshot of the error is shown below. Look forward for your reply! Thanks in advance! (Additional information: ROS Noetic, Ubuntu 20.04) Quick Start Error

YHuniv commented 8 months ago

This resolved my problem, because i am using opencv 4.2.0 : change #include <opencv/cv.hpp> to #include <opencv2/opencv.hpp> in optimiser.h. (/catkin_ws/src/cam_lidar_calibration/include/cam_lidar_calibration/optimiser.h) and change optimiser.cpp:
from // cv::reduce(trans_diff, summed_diff, 1, CV_REDUCE_SUM, CV_64F);

// to cv::reduce(trans_diff, summed_diff, 1, cv::REDUCE_SUM, CV_64F);

(/catkin_ws/src/cam_lidar_calibration/src/optimiser.cpp)

jclinton830 commented 8 months ago

@YHuniv thanks for your input to the issue.

If that does not work, please feel free to reopen this issue. I am closing it as done for now.

natik-bw commented 4 months ago

Reopening this topic, as the solution didn't resolve my error.

I was able to successfully build when I replaced `#include <opencv/cv.hpp>' to:

#include <opencv2/core/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/calib3d.hpp>

But then, still got the same runtime error when executing the quick start roslaunch cam_lidar_calibration run_optimiser.launch import_samples:=true

image

logs rosout-1-stdout.log rosout.log roslaunch-netanel-Precision-5560-26735.log master.log

NOTE I don't know if this is correct, but I used the calib_v2 branch, and there cv::reduce(...) under optimiser.cpp here was not commented out (all I had to do was replace CV_REDUCE_SUM by cv::REDUCE_SUM for proper compatibility), so I wasn't sure whether I missed an additional change I had to do. It wasn't clear to me from @YHuniv 's instructions.