warp1337 / ros_aruco

Simple ROS Node to publish single marker trans and rot
25 stars 19 forks source link

Error - catkin_make #3

Open hecsaniz opened 9 years ago

hecsaniz commented 9 years ago

Hi, I have downloaded this package because it could be very useful for my project. I have followed all the steps of the "BUILDING AND USAGE" section but I get this error when I use the catkin_make command (step 7):

/home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:50:1: error: ‘VideoCapture’ does not name a type /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/rosaruco.cpp: In function ‘int main(int, char*)’: /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:131:2: error: ‘TheVideoCapturer’ was not declared in this scope /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:152:2: error: ‘namedWindow’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:153:2: error: ‘namedWindow’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:160:2: error: ‘createTrackbar’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:161:2: error: ‘createTrackbar’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:210:5: error: ‘Rodrigues’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:267:5: error: ‘imshow’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:268:5: error: ‘imshow’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:274:7: error: ‘waitKey’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/rosaruco.cpp: In function ‘void cvTackBarEvents(int, void)’: /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:313:5: error: ‘imshow’ is not a member of ‘cv’ /home/laboratorio/catkin_ws/src/ros_aruco/ros_aruco/src/ros_aruco.cpp:314:5: error: ‘imshow’ is not a member of ‘cv’ make[2]: * [ros_aruco/ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o] Error 1 make[1]: * [ros_aruco/ros_aruco/CMakeFiles/ros_aruco.dir/all] Error 2 make: *\ [all] Error 2 Invoking "make" failed

I don't know why I get this error because I have followed all the steps. It would be great if you could help me. Thank you!

Asukamax commented 8 years ago

well I met the same question when I use the catkin_make command:

######################### Scanning dependencies of target ros_aruco [ 90%] Building CXX object ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:50:1: error: ‘VideoCapture’ does not name a type VideoCapture TheVideoCapturer; ^ /home/asuka/catkin_ws/src/ros_aruco/src/rosaruco.cpp: In function ‘int main(int, char*)’: /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:131:2: error: ‘TheVideoCapturer’ was not declared in this scope TheVideoCapturer.open(0); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:149:13: error: ‘class aruco::MarkerDetector’ has no member named ‘pyrDown’ MDetector.pyrDown(ThePyrDownLevel); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:152:2: error: ‘namedWindow’ is not a member of ‘cv’ cv::namedWindow("THRESHOLD IMAGE",1); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:153:2: error: ‘namedWindow’ is not a member of ‘cv’ cv::namedWindow("INPUT IMAGE",1); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:160:2: error: ‘createTrackbar’ is not a member of ‘cv’ cv::createTrackbar("ThresParam1", "INPUT IMAGE",&iThresParam1, 13, cvTackBarEvents); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:161:2: error: ‘createTrackbar’ is not a member of ‘cv’ cv::createTrackbar("ThresParam2", "INPUT IMAGE",&iThresParam2, 13, cvTackBarEvents); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:210:5: error: ‘Rodrigues’ is not a member of ‘cv’ cv::Rodrigues(TheMarkers[0].Rvec,rot_mat); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:267:5: error: ‘imshow’ is not a member of ‘cv’ cv::imshow("INPUT IMAGE",TheInputImageCopy); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:268:5: error: ‘imshow’ is not a member of ‘cv’ cv::imshow("THRESHOLD IMAGE",MDetector.getThresholdedImage()); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:274:7: error: ‘waitKey’ is not a member of ‘cv’ key=cv::waitKey(1); ^ /home/asuka/catkin_ws/src/ros_aruco/src/rosaruco.cpp: In function ‘void cvTackBarEvents(int, void)’: /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:313:5: error: ‘imshow’ is not a member of ‘cv’ cv::imshow("INPUT IMAGE",TheInputImageCopy); ^ /home/asuka/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:314:5: error: ‘imshow’ is not a member of ‘cv’ cv::imshow("THRESHOLD IMAGE",MDetector.getThresholdedImage()); ^ make[2]: * [ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o] Error 1 make[1]: * [ros_aruco/CMakeFiles/ros_aruco.dir/all] Error 2 make: *\ [all] Error 2 Invoking "make -j4 -l4" failed ############################

I try to solved this problem for many times but all failed, is that problem due to the GCC compiler? Is that your work did with c++11?All any case, thanks for the possible response.

sbperceptron commented 7 years ago

I am getting the following error when i run cmake Invoking "cmake" failed

warp1337 commented 7 years ago

Do you have an OpenCV installation in your system? You might give the ros-opencv package a try. Did you source your ROS setup.bash before invoking cmake?