[Bug 508] New: KDL types are not transportable with CORBA

For more infomation about this bug, visit
Summary: KDL types are not transportable with CORBA
Product: KDL
Version: kdl-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Plugin
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

If we want to use the KDL-types in a distributed application using KDL the
KDL-types have to be transportable with CORBA.

I guess we have to implement the addProtocol function for every type, but since
i cannot find an example of what has to happen inside that function this will
be a painfull exploration of the rtt-code

Ruben

Ruben Smits's picture

[Bug 508] KDL types are not transportable with CORBA

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #3 from Ruben Smits <ruben [dot] smits [..] ...> 2008-06-04 10:00:22 ---
This is committed on trunk and tested multiple times, a seperate toolkit is
created that is installed in $(install_prefix)/lib/rtt/${OROCOS_TARGET}/plugins
orocos-kdltk-corba-${OROCOS_TARGET}

For now only the basic types (Frame,Twist,Rotation,Vector,Wrench) are
supported.

Ruben

[Bug 508] KDL types are not transportable with CORBA

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |peter [dot] soetens [..] ...

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-01-31 11:18:58 ---
(In reply to comment #1)
> The first changes are comitted.
>
> If KDLTK is build with Corba enabled RTT cmake will build an extra lib
> orocos-kdltk-corba with the corba extensions for the basic KDL-types: Vector,
> Rotation, Frame, Twist and Wrench
>
> The type system detects the new transport:
>
> 0.023 [ Info ][Toolkit] Loading Tool KDL.
> 0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type System.
> 0.025 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for frame
> 0.025 [ Warning][Toolkit] No 'CORBA' transport available for frame

This is wrong... you must use 'CORBA' as transport type, also for your KDL
types. All toolkits should use 'CORBA' if they use CORBA.

Peter

Ruben Smits's picture

[Bug 508] KDL types are not transportable with CORBA

On Thursday January 31 2008 11:18:58 Peter Soetens wrote:
> For more infomation about this bug, visit
>
>
> Peter Soetens
<peter [dot] soetens [..] ...> changed:
>
> What |Removed |Added
> --------------------------------------------------------------------------
> CC| |peter [dot] soetens [..] ...
>
>
>
> --- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-01-31
> 11:18:58 --- (In reply to comment #1)
>
> > The first changes are comitted.
> >
> > If KDLTK is build with Corba enabled RTT cmake will build an extra lib
> > orocos-kdltk-corba with the corba extensions for the basic KDL-types:
> > Vector, Rotation, Frame, Twist and Wrench
> >
> > The type system detects the new transport:
> >
> > 0.023 [ Info ][Toolkit] Loading Tool KDL.
> > 0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type
> > System. 0.025 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for
> > frame 0.025 [ Warning][Toolkit] No 'CORBA' transport available for frame
>
> This is wrong... you must use 'CORBA' as transport type, also for your KDL
> types. All toolkits should use 'CORBA' if they use CORBA.

Why is it wrong? It works anyway,
The ID of the protocol is the same as in RTT, only the name differs:

if ( name == "vector" )
return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol<
KDL::Vector >() );

std::string getTransportName() const {
return "CORBAKDL";
}

if we change the CORBAKDL to CORBA
every type will be tried to register anyway:

0.004 [ Info ][Logger] Loading CorbaKDL in RTT type system.
0.005 [ Info ][Logger] Loading CorbaLib in RTT type system.
0.006 [ Info ][Toolkit] Loading Tool RealTime.
0.006 [ Debug ][Toolkit] Registered Type 'int' to the Orocos Type System.
0.007 [ Warning][Toolkit] No 'CORBA' transport available for int
0.007 [ Info ][Toolkit] Registered new 'CORBA' transport for int
0.008 [ Debug ][Toolkit] Registered Type 'uint' to the Orocos Type System.
0.008 [ Warning][Toolkit] No 'CORBA' transport available for uint
0.009 [ Warning][Toolkit] No 'CORBA' transport available for uint
0.009 [ Debug ][Toolkit] Registered Type 'double' to the Orocos Type System.
0.011 [ Warning][Toolkit] No 'CORBA' transport available for double
0.011 [ Info ][Toolkit] Registered new 'CORBA' transport for double
0.012 [ Debug ][Toolkit] Registered Type 'bool' to the Orocos Type System.
0.012 [ Warning][Toolkit] No 'CORBA' transport available for bool
0.013 [ Info ][Toolkit] Registered new 'CORBA' transport for bool
0.013 [ Debug ][Toolkit] Registered Type 'PropertyBag' to the Orocos Type
System.
0.014 [ Warning][Toolkit] No 'CORBA' transport available for PropertyBag
0.014 [ Info ][Toolkit] Registered new 'CORBA' transport for PropertyBag
0.015 [ Debug ][Toolkit] Registered Type 'float' to the Orocos Type System.
0.016 [ Warning][Toolkit] No 'CORBA' transport available for float
0.016 [ Info ][Toolkit] Registered new 'CORBA' transport for float
0.016 [ Debug ][Toolkit] Registered Type 'char' to the Orocos Type System.
0.017 [ Warning][Toolkit] No 'CORBA' transport available for char
0.017 [ Warning][Toolkit] No 'CORBA' transport available for char
0.020 [ Debug ][Toolkit] Registered Type 'array' to the Orocos Type System.
0.020 [ Warning][Toolkit] No 'CORBA' transport available for array
0.021 [ Info ][Toolkit] Registered new 'CORBA' transport for array
0.021 [ Debug ][Toolkit] Registered Type 'string' to the Orocos Type System.
0.022 [ Warning][Toolkit] No 'CORBA' transport available for string
0.022 [ Info ][Toolkit] Registered new 'CORBA' transport for string
0.023 [ Info ][Toolkit] Loading Tool KDL.
0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type System.
0.024 [ Info ][Toolkit] Registered new 'CORBA' transport for frame
0.025 [ Warning][Toolkit] No 'CORBA' transport available for frame
0.025 [ Debug ][Toolkit] Registered Type 'rotation' to the Orocos Type
System.
0.026 [ Info ][Toolkit] Registered new 'CORBA' transport for rotation
0.026 [ Warning][Toolkit] No 'CORBA' transport available for rotation
0.027 [ Debug ][Toolkit] Registered Type 'vector' to the Orocos Type System.
0.027 [ Info ][Toolkit] Registered new 'CORBA' transport for vector
0.028 [ Warning][Toolkit] No 'CORBA' transport available for vector
0.028 [ Debug ][Toolkit] Registered Type 'twist' to the Orocos Type System.
0.029 [ Info ][Toolkit] Registered new 'CORBA' transport for twist
0.029 [ Warning][Toolkit] No 'CORBA' transport available for twist
0.031 [ Debug ][Toolkit] Registered Type 'wrench' to the Orocos Type System.
0.031 [ Info ][Toolkit] Registered new 'CORBA' transport for wrench
0.032 [ Warning][Toolkit] No 'CORBA' transport available for wrench
0.032 [ Debug ][Toolkit] Registered Type 'Joint' to the Orocos Type System.
0.033 [ Warning][Toolkit] No 'CORBA' transport available for Joint
0.033 [ Warning][Toolkit] No 'CORBA' transport available for Joint
0.034 [ Debug ][Toolkit] Registered Type 'Segment' to the Orocos Type System.
0.035 [ Warning][Toolkit] No 'CORBA' transport available for Segment
0.035 [ Warning][Toolkit] No 'CORBA' transport available for Segment
0.036 [ Debug ][Toolkit] Registered Type 'std::vector' to the Orocos Type
System.
0.036 [ Warning][Toolkit] No 'CORBA' transport available for std::vector
0.037 [ Warning][Toolkit] No 'CORBA' transport available for std::vector

Ruben

> Peter
>
> --
> Configure bugmail:
> https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email ------- You are
> receiving this mail because: -------
> You are on the CC list for the bug.
> You are the assignee for the bug.

[Bug 508] KDL types are not transportable with CORBA

On Thursday 31 January 2008 12:41:48 Ruben Smits wrote:
> On Thursday January 31 2008 11:18:58 Peter Soetens wrote:
> > For more infomation about this bug, visit
> >
> >
> > Peter Soetens
<peter [dot] soetens [..] ...> changed:
> >
> > What |Removed |Added
> >
> > -------------------------------------------------------------------------
> >- CC| |peter [dot] soetens [..] ...
> >
> >
> >
> > --- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-01-31
> > 11:18:58 --- (In reply to comment #1)
> >
> > > The first changes are comitted.
> > >
> > > If KDLTK is build with Corba enabled RTT cmake will build an extra lib
> > > orocos-kdltk-corba with the corba extensions for the basic KDL-types:
> > > Vector, Rotation, Frame, Twist and Wrench
> > >
> > > The type system detects the new transport:
> > >
> > > 0.023 [ Info ][Toolkit] Loading Tool KDL.
> > > 0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type
> > > System. 0.025 [ Info ][Toolkit] Registered new 'CORBAKDL' transport
> > > for frame 0.025 [ Warning][Toolkit] No 'CORBA' transport available for
> > > frame
> >
> > This is wrong... you must use 'CORBA' as transport type, also for your
> > KDL types. All toolkits should use 'CORBA' if they use CORBA.
>
> Why is it wrong? It works anyway,
> The ID of the protocol is the same as in RTT, only the name differs:
>
> if ( name == "vector" )
> return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol<
> KDL::Vector >() );
>
> std::string getTransportName() const {
> return "CORBAKDL";
> }
>
> if we change the CORBAKDL to CORBA
> every type will be tried to register anyway:
>
> 0.004 [ Info ][Logger] Loading CorbaKDL in RTT type system.
> 0.005 [ Info ][Logger] Loading CorbaLib in RTT type system.
> 0.006 [ Info ][Toolkit] Loading Tool RealTime.
> 0.006 [ Debug ][Toolkit] Registered Type 'int' to the Orocos Type System.
> 0.007 [ Warning][Toolkit] No 'CORBA' transport available for int
> 0.007 [ Info ][Toolkit] Registered new 'CORBA' transport for int

This is clearly a bug in the RTT type system. You should only get a warning
about types which are in the type system but not in the CORBA transport (like
uint and char)

Furthermore, using another name than 'CORBA' (like CORBAKDL) may break your
transport in the future, as the name may be used to associate it with the
ORO_CORBA_PROTOCOL_ID. Maybe we should have defined a ORO_CORBA_PROTOCOL_NAME
macro which is set to "CORBA", to avoid all confusion...

Peter

> 0.008 [ Debug ][Toolkit] Registered Type 'uint' to the Orocos Type System.
> 0.008 [ Warning][Toolkit] No 'CORBA' transport available for uint
> 0.009 [ Warning][Toolkit] No 'CORBA' transport available for uint
> 0.009 [ Debug ][Toolkit] Registered Type 'double' to the Orocos Type
> System. 0.011 [ Warning][Toolkit] No 'CORBA' transport available for double
> 0.011 [ Info ][Toolkit] Registered new 'CORBA' transport for double 0.012
> [ Debug ][Toolkit] Registered Type 'bool' to the Orocos Type System. 0.012
> [ Warning][Toolkit] No 'CORBA' transport available for bool
> 0.013 [ Info ][Toolkit] Registered new 'CORBA' transport for bool
> 0.013 [ Debug ][Toolkit] Registered Type 'PropertyBag' to the Orocos Type
> System.
> 0.014 [ Warning][Toolkit] No 'CORBA' transport available for PropertyBag
> 0.014 [ Info ][Toolkit] Registered new 'CORBA' transport for PropertyBag
> 0.015 [ Debug ][Toolkit] Registered Type 'float' to the Orocos Type
> System. 0.016 [ Warning][Toolkit] No 'CORBA' transport available for float
> 0.016 [ Info ][Toolkit] Registered new 'CORBA' transport for float 0.016
> [ Debug ][Toolkit] Registered Type 'char' to the Orocos Type System. 0.017
> [ Warning][Toolkit] No 'CORBA' transport available for char
> 0.017 [ Warning][Toolkit] No 'CORBA' transport available for char
> 0.020 [ Debug ][Toolkit] Registered Type 'array' to the Orocos Type
> System. 0.020 [ Warning][Toolkit] No 'CORBA' transport available for array
> 0.021 [ Info ][Toolkit] Registered new 'CORBA' transport for array 0.021
> [ Debug ][Toolkit] Registered Type 'string' to the Orocos Type System.
> 0.022 [ Warning][Toolkit] No 'CORBA' transport available for string 0.022 [
> Info ][Toolkit] Registered new 'CORBA' transport for string 0.023 [ Info
> ][Toolkit] Loading Tool KDL.
> 0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type
> System. 0.024 [ Info ][Toolkit] Registered new 'CORBA' transport for
> frame 0.025 [ Warning][Toolkit] No 'CORBA' transport available for frame
> 0.025 [ Debug ][Toolkit] Registered Type 'rotation' to the Orocos Type
> System.
> 0.026 [ Info ][Toolkit] Registered new 'CORBA' transport for rotation
> 0.026 [ Warning][Toolkit] No 'CORBA' transport available for rotation
> 0.027 [ Debug ][Toolkit] Registered Type 'vector' to the Orocos Type
> System. 0.027 [ Info ][Toolkit] Registered new 'CORBA' transport for
> vector 0.028 [ Warning][Toolkit] No 'CORBA' transport available for vector
> 0.028 [ Debug ][Toolkit] Registered Type 'twist' to the Orocos Type
> System. 0.029 [ Info ][Toolkit] Registered new 'CORBA' transport for
> twist 0.029 [ Warning][Toolkit] No 'CORBA' transport available for twist
> 0.031 [ Debug ][Toolkit] Registered Type 'wrench' to the Orocos Type
> System. 0.031 [ Info ][Toolkit] Registered new 'CORBA' transport for
> wrench 0.032 [ Warning][Toolkit] No 'CORBA' transport available for wrench
> 0.032 [ Debug ][Toolkit] Registered Type 'Joint' to the Orocos Type
> System. 0.033 [ Warning][Toolkit] No 'CORBA' transport available for Joint
> 0.033 [ Warning][Toolkit] No 'CORBA' transport available for Joint 0.034 [
> Debug ][Toolkit] Registered Type 'Segment' to the Orocos Type System.
> 0.035 [ Warning][Toolkit] No 'CORBA' transport available for Segment 0.035
> [ Warning][Toolkit] No 'CORBA' transport available for Segment 0.036 [
> Debug ][Toolkit] Registered Type 'std::vector' to the Orocos Type System.
> 0.036 [ Warning][Toolkit] No 'CORBA' transport available for std::vector
> 0.037 [ Warning][Toolkit] No 'CORBA' transport available for std::vector
>
> Ruben
>
> > Peter
> >
> > --
> > Configure bugmail:
> > https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email ------- You
> > are receiving this mail because: -------
> > You are on the CC list for the bug.
> > You are the assignee for the bug.
>
> --
> Ir. Ruben Smits
> Robotics Research - Autonomous Compliant Motion
> Division Production engineering, Machine design and Automation
> Department of Mechanical Engineering
> Katholieke Universiteit Leuven

Ruben Smits's picture

[Bug 508] KDL types are not transportable with CORBA

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
Target Milestone|--- |1.0.0

--- Comment #1 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-30 18:19:33 ---
The first changes are comitted.

If KDLTK is build with Corba enabled RTT cmake will build an extra lib
orocos-kdltk-corba with the corba extensions for the basic KDL-types: Vector,
Rotation, Frame, Twist and Wrench

The type system detects the new transport:

0.023 [ Info ][Toolkit] Loading Tool KDL.
0.024 [ Debug ][Toolkit] Registered Type 'frame' to the Orocos Type System.
0.025 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for frame
0.025 [ Warning][Toolkit] No 'CORBA' transport available for frame
0.026 [ Debug ][Toolkit] Registered Type 'rotation' to the Orocos Type System.
0.026 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for rotation
0.027 [ Warning][Toolkit] No 'CORBA' transport available for rotation
0.027 [ Debug ][Toolkit] Registered Type 'vector' to the Orocos Type System.
0.028 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for vector
0.028 [ Warning][Toolkit] No 'CORBA' transport available for vector
0.029 [ Debug ][Toolkit] Registered Type 'twist' to the Orocos Type System.
0.030 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for twist
0.030 [ Warning][Toolkit] No 'CORBA' transport available for twist
0.031 [ Debug ][Toolkit] Registered Type 'wrench' to the Orocos Type System.
0.031 [ Info ][Toolkit] Registered new 'CORBAKDL' transport for wrench
0.032 [ Warning][Toolkit] No 'CORBA' transport available for wrench
0.032 [ Debug ][Toolkit] Registered Type 'Joint' to the Orocos Type System.
0.033 [ Warning][Toolkit] No 'CORBAKDL' transport available for Joint
0.033 [ Warning][Toolkit] No 'CORBA' transport available for Joint
0.034 [ Debug ][Toolkit] Registered Type 'Segment' to the Orocos Type System.
0.034 [ Warning][Toolkit] No 'CORBAKDL' transport available for Segment
0.035 [ Warning][Toolkit] No 'CORBA' transport available for Segment
0.035 [ Debug ][Toolkit] Registered Type 'std::vector' to the Orocos Type
System.
0.036 [ Warning][Toolkit] No 'CORBAKDL' transport available for std::vector
0.037 [ Warning][Toolkit] No 'CORBA' transport available for std::vector

I have no idea though if this behaviour is the desired one (the CORBAKDL
transport also tries to register the non kdl types, and the CORBA transport
tries to register the KDL ones.)

Some minor tests show that the transport works.

A unittest still has to be added.

Ruben