Ask Your Question
0

Why do I get this error when catkin_make my package?

asked 2014-03-14 13:26:57 -0500

Joao Ferreira gravatar image

updated 2014-03-15 07:06:13 -0500

Linking CXX executable /home/joao/catkin_ws/devel/lib/testbot_description/parser /opt/ros/hydro/lib/liburdf.so: undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)' /opt/ros/hydro/lib/liburdf.so: undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' collect2: ld returned 1 exit status make[2]: *** [/home/joao/catkin_ws/devel/lib/testbot_description/parser] Error 1 make[1]: *** [testbot_description/CMakeFiles/parser.dir/all] Error 2 make: *** [all] Error 2 Invoking "make" failed

[ROS Hydro and Ubuntu 12.04]

I am trying to follow the urdf parser tutorial.

My testbot_description package has a /src/parser.cpp file and a /urdf/my_robot.urdf file

Both are identical to the ones suggested by the tutorial page. (I already copied and pasted the code to make sure).

This is my CMakeLists:

cmake_minimum_required(VERSION 2.8.3)
project(testbot_description)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS urdf)



## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES testbot_description
#  CATKIN_DEPENDS urdf
#  DEPENDS system_lib
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)


add_executable(parser src/parser.cpp)
target_link_libraries(parser ${catkin_LIBRARIES})

And this is my package.xml:

<package>
  <name>testbot_description</name>
  <version>0.0.1</version>
  <description>The testbot_description package</description>


  <maintainer email="joao.cicero@ifce.edu.br">Joao Cicero</maintainer>

  <license>BSD</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>urdf</build_depend>
  <run_depend>urdf</run_depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->

    <!-- Other tools can request additional information be placed here -->
  </export>
</package>
edit retag flag offensive close merge delete

Comments

Please also post your package.xml

BennyRe gravatar image BennyRe  ( 2014-03-15 06:02:54 -0500 )edit

Thanks, BennyRe. I just added it. I hope it will help.

Joao Ferreira gravatar image Joao Ferreira  ( 2014-03-15 07:07:15 -0500 )edit

I just realized that when I comment the code that calls for initFile() I get rid of this error and I am able to build my package. In my parser.cpp , if I keep the " if (!model.initFile(urdf_file)) { ROS_ERROR("Failed to parse urdf file"); return -1; } " the error appears again.

Joao Ferreira gravatar image Joao Ferreira  ( 2014-03-15 12:32:36 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2014-03-17 04:43:00 -0500

Joao Ferreira gravatar image

updated 2014-03-17 05:24:53 -0500

Well, I don't know why, but when I git cloned the robot_model package to my catkin workspace, instead of just installing it using apt-get I finally managed to build my testbot_description package.

Does anyone know why? At least I can proceed with the urdf tutorials, now, and I hope this will help others.

$ cd ~/catkin_ws/src

$ git clone https://github.com/ros/robot_model

$ cd ~/catkin_ws

$ catkin_make
edit flag offensive delete link more
0

answered 2014-10-07 05:52:40 -0500

updated 2014-10-17 03:55:23 -0500

Hello!

I added these lines: "find_package(... urdf)" and "find_package(urdfdom_headers REQUIRED)"

Here is my full CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  message_generation
  message_runtime
  urdf
)
find_package(urdfdom_headers REQUIRED)

add_message_files(
  DIRECTORY msg
  FILES Num.msg
)

add_service_files(
  DIRECTORY srv
  FILES AddTwoInts.srv
)

generate_messages(
  DEPENDENCIES
  std_msgs
)

catkin_package(
  CATKIN_DEPENDS message_runtime
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)

add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)

add_executable(add_two_ints_server src/add_two_ints_server.cpp)
target_link_libraries(add_two_ints_server ${catkin_LIBRARIES})
add_dependencies(add_two_ints_server beginner_tutorials_gencpp)

add_executable(add_two_ints_client src/add_two_ints_client.cpp)
target_link_libraries(add_two_ints_client ${catkin_LIBRARIES})
add_dependencies(add_two_ints_client beginner_tutorials_gencpp)

add_executable(parser src/parser.cpp)
target_link_libraries(parser ${catkin_LIBRARIES})
add_dependencies(parser beginner_tutorials_gencpp)
edit flag offensive delete link more
0

answered 2014-09-18 14:27:09 -0500

[ROS groovy and Ubuntu 12.04 LTS] Hi, I also got this error at this point of the parser urdf tutorial. Did anyone have figured out why? Thanks

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-03-14 13:26:57 -0500

Seen: 1,836 times

Last updated: Oct 17 '14