R: using rock to create deployable components

Dear Sir,

Here below are the output of the commands:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib/rock
make install
deployer-gnulinux (cdeployer-gnulinux has the same behaviour)

it appears that OCL is detected and that component is built, but when deployer tries to load
the libraries it gets an error.
In my module I linked external libraries (opencv , irrlicht)

If I use the deployment generated by orogen every things work fine.

I apologize for my frequent questions.

root@UBU1004:~/rock/Rosetta1-2/build# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/lib/rock
-- documentation can be built
-- Orocos reports in /usr/src/rock/install/include/rtt/transports/corba/rtt-corba-config.h to use the OMNIORB
-- OCL found, the generated task library will be compatible with the deployer component
Orocos-RTT found in /usr/src/rock/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
-- Found orocos-rtt 2.2.0 for the gnulinux target. Available transports: corba mqueue
-- Found RTT_PLUGIN_rtt-typekit
-- Found RTT_PLUGIN_rtt-transport-corba
-- Found RTT_PLUGIN_rtt-marshalling
-- Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path
-- Configuring done
-- Generating done
-- Build files have been written to: /root/rock/Rosetta1-2/build

root@UBU1004:~/rock/Rosetta1-2/build# make install
[ 8%] Built target rosetta1-typekit-gnulinux
[ 34%] Built target rosetta1-transport-corba-gnulinux
[ 39%] Built target check-uptodate
[ 78%] Built target rosetta1-tasks-gnulinux
[ 91%] Built target rosetta1-transport-typelib-gnulinux
[ 95%] Built target Rosetta1
[100%] Built target check-typekit-uptodate
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/orogen-project-rosetta1.pc
-- Up-to-date: /usr/local/lib/rock/share/orogen/Rosetta1.orogen
-- Up-to-date: /usr/local/lib/rock/bin/Rosetta1
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/orogen-Rosetta1.pc
-- Up-to-date: /usr/local/lib/rock/lib/orocos/types/librosetta1-typekit-gnulinux.so
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/Types.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/typekit/Plugin.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/types/rosetta1/./personInfo.h
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/rosetta1-typekit-gnulinux.pc
-- Up-to-date: /usr/local/lib/rock/share/orogen/rosetta1.tlb
-- Up-to-date: /usr/local/lib/rock/share/orogen/rosetta1.typelist
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/rosetta1-transport-typelib-gnulinux.pc
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/typelib/TransportPlugin.hpp
-- Up-to-date: /usr/local/lib/rock/lib/orocos/types/librosetta1-transport-typelib-gnulinux.so
-- Up-to-date: /usr/local/lib/rock/lib/orocos/types/librosetta1-transport-corba-gnulinux.so
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/rosetta1-transport-corba-gnulinux.pc
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/corba/Convertions.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/corba/TransportPlugin.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/corba/Convertions.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/corba/rosetta1Types.idl
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/transports/corba/rosetta1TypesC.h
-- Up-to-date: /usr/local/lib/rock/lib/pkgconfig/rosetta1-tasks-gnulinux.pc
-- Up-to-date: /usr/local/lib/rock/lib/orocos/librosetta1-tasks-gnulinux.so
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/BehaviourDefinitionBase.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/HumanTrackingBase.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/InjuriesInterfaceBase.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/IntentionEstimationBase.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/BehaviourDefinition.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/HumanTracking.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/InjuriesInterface.hpp
-- Up-to-date: /usr/local/lib/rock/include/orocos/rosetta1/IntentionEstimation.hpp
root@UBU1004:~/rock/Rosetta1-2/build#

root@UBU1004:~/rock/Viewer-Es1/build# deployer-gnulinux
0.235 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was already added for type /posizione/pos
0.289 [ Warning][TypekitRepository::Import] Overriding TypeInfo for '/posizione/pos'.
0.289 [ Warning][TypekitRepository::Import] Attempt to register Type '/posizione/pos' twice to the Orocos Type System.
0.289 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was already added for type /posizione/pos
0.315 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was already added for type /posizione/pos
1.001 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was already added for type /std/string
1.004 [ Warning][TypekitRepository::Import] Overriding TypeInfo for '/std/string'.
1.004 [ Warning][TypekitRepository::Import] Attempt to register Type '/std/string' twice to the Orocos Type System.
1.004 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was already added for type /std/string
1.660 [ Warning][TypekitRepository::Import] Overriding TypeInfo for '/std/string'.
1.982 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was already added for type /std/string
2.294 [ ERROR ][DeploymentComponent::configure] Could not load library '/usr/local/lib/rock/lib/orocos/libtcpconnection-tasks-gnulinux.so':
2.294 [ ERROR ][DeploymentComponent::configure] /usr/local/lib/rock/lib/orocos/libtcpconnection-tasks-gnulinux.so: undefined symbol: _ZN15QAbstractSocket18disconnectFromHostEv
2.404 [ ERROR ][DeploymentComponent::configure] Could not load library '/usr/local/lib/rock/lib/orocos/librosetta1-tasks-gnulinux.so':
2.404 [ ERROR ][DeploymentComponent::configure] /usr/local/lib/rock/lib/orocos/librosetta1-tasks-gnulinux.so: undefined symbol: _ZTVN2cv12VideoCaptureE
Switched to : Deployer

This console reader allows you to browse and manipulate TaskContexts.
You can type in an operation, expression, create or change variables.
(type 'help' for instructions and 'ls' for context info)

TAB completion and HISTORY is available ('bash' like)

Deployer [S]> displayComponentTypes
I can create the following component types:
OCL::ConsoleReporting
OCL::FileReporting
OCL::HMIConsoleOutput
OCL::HelloWorld
OCL::LuaComponent
OCL::TcpReporting
OCL::TimerComponent
TaskContext
canbus::Task
controldev::GenericTask
controldev::Local
controldev::Remote
corridor_planner::Task
dynamixel::Task
gps::BaseTask
gps::GPSDTask
gps::MB500Task
hokuyo::Task
logger::Logger
logger::LoggerTest
mattest::matTask
parport::Task
robtipo::hmi
robtipo::oneaxisfilter
robtipo::robot
skid4_control::Controller
skid4_control::FourWheelController
skid4_control::SimpleController
trajectory_follower::Task
vettest::matTask
vicon::Task
waypoint_navigation::Task
wifimon::Monitor
xsens_imu::Task
= (void)

Thank you.

Gianpaolo Rizzi

----Messaggio originale----
Da: sylvain [dot] joyeux [..] ...
Data: 3-gen-2011 12.39 PM
A: "gprizzi [..] ..."<gprizzi [..] ...>
Cc: "Orocos Developers"<orocos-dev [..] ...>
Ogg: Re: [Orocos-Dev] using rock to create deployable components

On 01/03/2011 12:19 PM, Sylvain Joyeux wrote:
> On 12/30/2010 06:27 PM, gprizzi [..] ... wrote:
>> Dear Sir,
>>
>> I would like to know if it is possible to use orogen to create component
>> that can be
>> loaded by OCL deployer(s).
>>
>> In the "Deployment component" manual form OROCOS documentation
>> is said that the macro ORO_CREATE_COMPONENT or
>> ORO_CREATE_COMPONENT_TYPE and
>> ORO_LIST_COMPONENT_TYPE
>>
>> have to be used to create a deployable component.
>>
>> I had a look to the code generated by orogen and I didn't find these macros.
The task contexts are registered as OCL components in
.orogen/tasks/DeployerComponent.cpp

which should be built into the shared library if OCL is present

I had a look and it indeed does that on my machine.

The oroGen's component CMake should tell you

-- OCL found, the generated task library will be compatible with the
deployer component

In my case, the shared library does contain symbols that seem to be
related to the OCL component loading, namely:

OCL::ComponentFactoryLoader<xsens_imu::Task>::createComponent(std::string)
OCL::ComponentFactoryLoader<xsens_imu::Task>::ComponentFactoryLoader(std::string)