ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

KDL, undefined reference to KDL::Chain

asked 2013-09-03 13:21:24 -0500

Franco gravatar image

Hello everyone!

I am having problems when trying to compile with rosmake a KDL example (the one found in the KDL website). I always get this output when doing rosmake

undefined reference to `KDL::Chain::~Chain()'

and a lot more of undefined reference... i did everything i could.. followed the ros instructions in order to get kdl up and running but i cannot get it to compile!

Note: i included the find_package(Orocos-kdl) in the CMakeLists but the problem persists...

Any help will be appreciated! thanks in advance, Franco

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-09-03 13:53:43 -0500

Franco gravatar image

updated 2013-09-03 16:44:11 -0500

I managed to get it compiled and linked!

For everyone: in the CMakeLists:

add:

project(prueba_kdl)

find_package(Eigen REQUIRED)
include_directories(${Eigen_INCLUDE_DIRS})
find_package(Orocos-KDL REQUIRED)

rosbuild_add_executable(prueba_kdl src/prueba.cpp)
target_link_libraries(${PROJECT_NAME} orocos-kdl)

Cheers Franco

edit flag offensive delete link more
1

answered 2013-09-04 08:45:03 -0500

moicez gravatar image

Hey! hello I had the exact same problem, but I was trying the tutorial for parsing a URDF to use the KDL library. Here is my solution: I also edit the CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(kdl_beginner)

find_package(catkin REQUIRED)

find_package(orocos_kdl)
find_package(kdl_parser)

add_executable(mykdl src/mykdl.cpp)
target_link_libraries(mykdl ${kdl_parser_LIBRARIES}   ${orocos_kdl_LIBRARIES} )

:D

BTW I am on ubuntu 12.04 running groovy

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-03 13:21:24 -0500

Seen: 1,763 times

Last updated: Sep 04 '13