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

Importing multiple Orocos/ROS packages in an RTT .ops script

asked 2012-04-13 23:17:08 -0600

jbohren gravatar image

updated 2012-04-13 23:17:32 -0600

I've recently refactored some Orocos/RTT components into a couple different ROS packages. I have an Orocos .ops script for testing each collection of components separately, but when I create a third package for testing integration, and combine the contents of the two other .ops scripts, they no longer run without segfaulting.

The odd thing is that it complains about one or the other library as being already loaded, and says "try to RELOAD":

3.834 [ Warning][DeploymentComponent::import] Library /home/jbohren/versioned/ros/bard/bard_controllers/lib/orocos/xenomai/libcomponents-xenomai.so already loaded... try to RELOAD

then it's the other library which causes a segfault on import:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe7876910 in ?? () from /home/jbohren/versioned/ros/bard/bard_simulation/lib/orocos/xenomai/libcomponents-xenomai.so
(gdb) where
#0  0x00007fffe7876910 in ?? ()
   from /home/jbohren/versioned/ros/bard/bard_simulation/lib/orocos/xenomai/libcomponents-xenomai.so
#1  0x00007ffff73140ef in OCL::ComponentLoader::loadComponent (this=<value optimized out>, name=..., type=...)
    at /home/jbohren/versioned/ros/orocos_toolchain/ocl/deployment/ComponentLoader.cpp:641
#2  0x00007ffff728e90e in OCL::DeploymentComponent::loadComponent (this=0x7fffffffd590, name=..., type=...)
    at /home/jbohren/versioned/ros/orocos_toolchain/ocl/deployment/DeploymentComponent.cpp:1531
#3  0x00007ffff72c75d4 in boost::function2<bool, std::string const&, std::string const&>::operator() (
    this=<value optimized out>, t1=..., t2=...) at /usr/include/boost/function/function_template.hpp:1013
#4  call_impl<std::string const&, std::string const&> (this=<value optimized out>, t1=..., t2=...)
    at /home/jbohren/versioned/ros/orocos_toolchain/install/include/rtt/internal/../internal/LocalOperationCaller.hpp:386
#5  RTT::internal::InvokerImpl<2, bool ()(std::string const&, std::string const&), RTT::internal::LocalOperationCallerImpl<bool ()(std::string const&, std::string const&)> >::call(std::string const&, std::string const&) (this=<value optimized out>, 
    t1=..., t2=...) at /home/jbohren/versioned/ros/orocos_toolchain/install/include/rtt/internal/../internal/Invoker.hpp:125

Is anyone familiar with problems arising from factoring and combining components from multiple ros packages in a single orocos script?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-04-14 07:16:29 -0600

jbohren gravatar image

It turns out this was happening because the component libraries had the same name even though they were in different paths. I was still using the default name for the libraries in each CMakeLists.txt file, ie:

pkg_one/CMakeLists.txt:

...
orocos_component(components src_1.cpp src_2.cpp)
...

pkg_two/CMakeLists.txt:

...
orocos_component(components src_3.cpp src_4.cpp)
...

So giving these unique names solved the problem.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-13 23:17:08 -0600

Seen: 535 times

Last updated: Apr 14 '12