0
$\begingroup$

Rosanswers logo

Hello I'm trying to use this pkg: https://github.com/warp1337/ros_aruco

I installed OpenCV and Aruco 1.2.4.

I tested the Aruco and It works.

Problem:

In step 7 I get this error

[100%] Building CXX object ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o
/home/paulo/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:35:19: fatal error: aruco.h: No such file or directory
#include "aruco.h"
               ^
compilation terminated.
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 -j8 -l8" failed

I think I'm not understanding what he means by -DARUCO_PATH=/usr/local.

I'm simply using the command: catkin_make --pkg ros_aruco -DARUCO_PATH=/usr/local/include/aruco

And in that location is the aruco.h file. I don't understand how the system isn't finding it.

Maybe I didin't install aruco globaly on my pc, but I don't know how to do that.

Anyone knows how to solve this problem?

Thx so much.

UPDATE:

Thx to gvdhoorn now I can detect the aruco.h file.

Problem I get another Error:

CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o: In function `main':

ros_aruco.cpp:(.text+0x10a6): undefined reference to aruco::CvDrawingUtils::draw3dCube(cv::Mat&, aruco::Marker&, aruco::CameraParameters const&)' CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o: In function cvTackBarEvents(int, void*)': ros_aruco.cpp:(.text+0x182b): undefined reference to `aruco::CvDrawingUtils::draw3dCube(cv::Mat&, aruco::Marker&, aruco::CameraParameters const&)' collect2: error: ld returned 1 exit status make[2]: *** [ros_aruco/ros_aruco] Error 1 make[1]: *** [ros_aruco/CMakeFiles/ros_aruco.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j8 -l8" failed

Don't know what to do here...

FINAL UPDATE

Problem solved. i HAD A package that was conflicting with this one. I had aruco_ros-master, I'm testing several different packages and that one was the one getting the errors. They have near names.

It compiles with no Errors now. THx you all-


Originally posted by End-Effector on ROS Answers with karma: 162 on 2015-03-09

Post score: 0


Original comments

Comment by dani on 2017-04-30:\

Hello, i have the same problem, how do i compile cmake files? In the TODO section what should I add?

thx so much

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think I'm not understanding what he means by -DARUCO_PATH=/usr/local.

I'm simply using the command: catkin_make --pkg ros_aruco -DARUCO_PATH=/usr/local/include/aruco

And in that location is the aruco.h file. [..]

If you look at ros_aruco/CMakeLists.txt, you'll see that ARUCO_PATH is used as a prefix to form other paths (lines 10 & 11):

[..]
SET(CMAKE_MODULE_PATH ${ARUCO_PATH}/lib/cmake )
SET(ARUCO_INCLUDE_DIRS ${ARUCO_PATH}/include/aruco )
[..]

So ARUCO_PATH should not be set to the full path to aruco.h, but to the directory containing the lib/cmake and include/aruco paths. In most cases, this will be /usr/local (as is mentioned in README.md, under BUILDING AND USAGE, step 7).

If you set ARUCO_PATH to /usr/local/include/aruco, this will eventually cause ARUCO_INCLUDE_DIRS to be set to /usr/local/include/aruco/include/aruco, which is obviously incorrect. The same is true for all other variables that prefix ARUCO_PATH.


Originally posted by gvdhoorn with karma: 86574 on 2015-03-09

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.