ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Using moveit kinematics plugin without moveit (undefined symbol for urdf)

asked 2013-03-06 19:42:02 -0600

updated 2013-03-07 00:11:15 -0600

I have IKFast MoveIt kinematics plugin created according to this tutorial. It works fine within MoveIt framework, however I would like to use it as a separate kinematics solver with service/topic interface.

So I wrote a small wrapper that loads plugin with pluginlib (based on tutorial).

However I am getting runtime error:

lwa_ikfast_wrapper_node: symbol lookup error: undefined symbol: _ZN4urdf5Model10initStringERKSs

Demangled symbol is:

urdf::Model::initString(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)

This function is called within plugin's KinematicBase::initialize() method.

Obviously that happens because urdf libraries are not linked to plugin at compile time. Thus, they have to be linked to node executable somehow. But that only happens if there is an explicit call to model::initString() in my node.

I tried to add all sort of dependencies to CMakeLists.txt and package.xml, but can't get rid of the problem.

The relevant files (stripped versions):

  1. lwa_ikfast_wrapper_node.cpp
  2. CMakeLists.txt
  3. package.xml


When model::initString() is called explicitly, ldd reports the following urdf libraries for executable: => /opt/ros/groovy/lib/ (0x00007fe421056000) => /opt/ros/groovy/lib/ (0x00007fe41e9f0000)

However adding these to dependencies doesn't solve the problem.

Any ideas?

P.S. It is maybe more of general programming question, but I think it might be interesting to the community in the context.



edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-07 02:00:02 -0600

Ok, that was a silly mistake - not the executable, but plugin library should be linked with dependencies. That is quite obvious now, but somehow I missed it at the beginning.

So linker adds reference to shared library only if it finds that there is something that uses it. Since there is explicit call in plugin library reference is added there without a problem.

Thus, the sufficient solution is to add the following to CMakeLists.txt in plugin package:

find_package(catkin REQUIRED COMPONENTS ... urdf)
target_link_libraries(lwa_ikfast_plugin ${catkin_LIBRARIES})
edit flag offensive delete link more

answered 2013-03-06 23:10:58 -0600

fergs gravatar image

I presume that if you are using moveit, you are under Groovy. Have you tried adding a dependency on "urdfdom"? (and possibly "urdfdom_headers"). These packages seem to contain the actual implementations (for instance, there is a

edit flag offensive delete link more


Unfortunately it didn't help... Thanks for suggestion

Boris gravatar image Boris  ( 2013-03-06 23:36:53 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2013-03-06 19:42:02 -0600

Seen: 1,246 times

Last updated: Mar 07 '13