0

Hello I am trying to use a package that requires the aruco library I downloaded the lib extracted and executed $ cmake $ make $ sudo make install No error so far but when I try to do catkin_make on my ros workspace the following error occurs

terminal output

1

I am new to ROS and generaly cmake files but I think the problem is that the lib has no include directory and both cpp and .h are on the src folder.

Is there a way to fix this?

this is my cmake file for this package

cmake_minimum_required(VERSION 2.8.3)
project(aruco_mapping)

find_package(OpenCV REQUIRED)
find_package(aruco REQUIRED)

find_package(catkin REQUIRED COMPONENTS 
             roscpp
             message_generation
             image_transport
             cv_bridge
             tf
             aruco
             visualization_msgs
             camera_calibration_parsers)

include_directories(${catkin_INCLUDE_DIRS} }
                    ${PROJECT_SOURCE_DIR}/include/)
                    

include_directories(${PROJECT_SOURCE_DIR}/src/)


SET(SOURCES ${PROJECT_SOURCE_DIR}/src/main.cpp
            ${PROJECT_SOURCE_DIR}/src/aruco_mapping.cpp)
   
SET(HEADERS ${PROJECT_SOURCE_DIR}/include/aruco_mapping.h)

add_message_files(FILES ArucoMarker.msg)

generate_messages(DEPENDENCIES
                  std_msgs
                  geometry_msgs)
   
catkin_package(
  INCLUDE_DIRS include
  LIBRARIES
)

add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} aruco_mapping_gencpp )
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} ${aruco_LIBS} ${ROS_LIBRARIES} ${catkin_LIBRARIES})


 

Can you please help me connect them

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • Stack Overflow discourages using **images** for represent *textual* information. Please, paste into the question post the error message as **text**. See also that question on meta: https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors – Tsyvarev Dec 25 '22 at 09:40

1 Answers1

0

While trying to figure it out I realized that the path it was searching for did not exist because I had changed the location of the file through the GUI so it was looking at the wrong path. I just kept the code files and rebuilded the project in a different file and deleted the the previous project, it worked perfectly.

So I would suggest to simply copy the code files and rebuilt the project it only takes a minute. At least this worked for me