Quantcast

IKFAST Error: Undefined symbol

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IKFAST Error: Undefined symbol

andreas
Hi all,

I've generated an IKFAST cpp file for the Baxter robot. Now, I'm trying to compile it into a shared library using:

gcc -fPIC -lstdc++ -DIKFAST_NO_MAIN -DIKFAST_CLIBRARY -shared -Wl,-soname,libik.so -o libik.so baxter_right_arm_ikfast_solver.cpp -I /home/andreas/software/openrave/python

However, I cannot load the *.so file in Python:

[ikfastmodule.cpp:277 SysLoadLibrary] /home/andreas/baxter_ws/src/object_grasping/scripts/libik.so: undefined symbol: _ZNSt8ios_base4InitD1Ev
[ikfastmodule.cpp:151 Init] failed to load library /home/andreas/baxter_ws/src/object_grasping/scripts/libik.so

My XML is:

<Robot name="Baxter" file="baxter_arm.right.rounded.dae">
   <Manipulator name="right_arm">
       <base>right_arm_mount</base>
       <effector>right_gripper</effector>
       <iksolver>/home/andreas/baxter_ws/src/object_grasping/scripts/libik.so</iksolver>
   </Manipulator>
</Robot>

And my Python code is:

from openravepy import *

env = Environment()

env.SetViewer('qtcoin')
env.Load('/home/andreas/baxter_ws/src/object_grasping/scripts/manipulator_baxter.xml')

I'm using the latest_stable branch of Openrave.

-- Andreas

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IKFAST Error: Undefined symbol

Abend
I'm having the same problem. I built OpenRave from source, because I'm using Indigo on Ubuntu 14.04 (Trusty), and the PPA doesn't have packages for 14.04. I'm using a modified version of Andreas's XML, with different paths for my .dae and .so files, and "left" in place of "right".

I generated an IKFast solver using the instructions from here:
http://sdk.rethinkrobotics.com/wiki/Custom_IKFast_for_your_Baxter

My "Baxter" is actually a single Baxter arm mounted on a mobility scooter, so it has a simplified URDF file describing a single (left) arm on a pedestal.

I initially compiled the ikfast solver using
gcc -fPIC -shared -lstdc++ -I /home/ams/ros_indigo_ws/src/openrave/python/ -o  baxter_left_ik.so baxter_left_arm_ikfast_solver.cpp -llapack
but attempting to load that .so as my ik solver got me an error message indicating that the method GetIkRealSize was missing:

Initializing ROS
Initializing OpenRave
[plugindatabase.h:577 Create] Failed to create name ode, interface collisionchecker
[plugindatabase.h:577 Create] Failed to create name bullet, interface collisionchecker
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[ikfastmodule.cpp:158 Init] failed to find GetIkRealSize in /home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so
[xmlreaders-core.cpp:2572 endElement] failed to create iksolver /home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so

Using nm shows that the method has been name-mangled:
$ nm -g baxter_left_ik.so  | grep RealSize
000000000001163e T _Z13GetIkRealSizev

Using Andreas's command line options for gcc results in unmangled names:
$ nm -g baxter_left_ik.so  | grep RealSize
000000000000622e T GetIkRealSize

But then loading fails because a mangled name is expected later on:
Initializing ROS
Initializing OpenRave
[plugindatabase.h:577 Create] Failed to create name ode, interface collisionchecker
[plugindatabase.h:577 Create] Failed to create name bullet, interface collisionchecker
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which means the item will be rendered invisible, this must be a mistake so setting to opaque (1)
[ikfastmodule.cpp:277 SysLoadLibrary] /home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so: undefined symbol: _ZNSt8ios_base4InitD1Ev
[ikfastmodule.cpp:151 Init] failed to load library /home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so
[xmlreaders-core.cpp:2572 endElement] failed to create iksolver /home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so

Thanks,
Abe

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IKFAST Error: Undefined symbol

Rosen Diankov
Administrator
try compiling with -DIKFAST_NO_MAIN -DIKFAST_CLIBRARY

ios_base means there's iostreams or other printing functions being accessed, which shouldn't be the case if the above two defines are being used...

2015-07-30 8:40 GMT+09:00 Abend <[hidden email]>:
I'm having the same problem. I built OpenRave from source, because I'm using
Indigo on Ubuntu 14.04 (Trusty), and the PPA doesn't have packages for
14.04. I'm using a modified version of Andreas's XML, with different paths
for my .dae and .so files, and "left" in place of "right".

I generated an IKFast solver using the instructions from here:
http://sdk.rethinkrobotics.com/wiki/Custom_IKFast_for_your_Baxter

My "Baxter" is actually a single Baxter arm mounted on a mobility scooter,
so it has a simplified URDF file describing a single (left) arm on a
pedestal.

I initially compiled the ikfast solver using
gcc -fPIC -shared -lstdc++ -I /home/ams/ros_indigo_ws/src/openrave/python/
-o  baxter_left_ik.so baxter_left_arm_ikfast_solver.cpp -llapack
but attempting to load that .so as my ik solver got me an error message
indicating that the method GetIkRealSize was missing:

Initializing ROS
Initializing OpenRave
[plugindatabase.h:577 Create] Failed to create name ode, interface
collisionchecker
[plugindatabase.h:577 Create] Failed to create name bullet, interface
collisionchecker
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[ikfastmodule.cpp:158 Init] failed to find GetIkRealSize in
/home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so
[xmlreaders-core.cpp:2572 endElement] failed to create iksolver
/home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so

Using nm shows that the method has been name-mangled:
$ nm -g baxter_left_ik.so  | grep RealSize
000000000001163e T _Z13GetIkRealSizev

Using Andreas's command line options for gcc results in unmangled names:
$ nm -g baxter_left_ik.so  | grep RealSize
000000000000622e T GetIkRealSize

But then loading fails because a mangled name is expected later on:
Initializing ROS
Initializing OpenRave
[plugindatabase.h:577 Create] Failed to create name ode, interface
collisionchecker
[plugindatabase.h:577 Create] Failed to create name bullet, interface
collisionchecker
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[colladareader.cpp:2130 FillGeometryColor] transparecy is 1.000000, which
means the item will be rendered invisible, this must be a mistake so setting
to opaque (1)
[ikfastmodule.cpp:277 SysLoadLibrary]
/home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so:
undefined symbol: _ZNSt8ios_base4InitD1Ev
[ikfastmodule.cpp:151 Init] failed to load library
/home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so
[xmlreaders-core.cpp:2572 endElement] failed to create iksolver
/home/ams/ros_indigo_ws/src/scooter_ui/src/ikfast_left_arm/baxter_left_ik.so

Thanks,
Abe





--
View this message in context: http://openrave-users-list.185357.n3.nabble.com/IKFAST-Error-Undefined-symbol-tp4027432p4027521.html
Sent from the OpenRAVE Users List mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users


------------------------------------------------------------------------------

_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Loading...