ROS-orocos KDL::Frame communication

Hi all,
I have the following issue:
I am writing a controller for the PR2, mainly using KDL,
at some point i want to publish a frame, and the topic will be then
connected to an orocos port

at the moment, the only way i found is:
- compute my KDL::Frame Tkdl,
- convert it to a geometry_msgs::Pose Ttf
tf::PoseKDLToMsg(Tkdl,Ttf);
- publish Ttf

and then, on the orocos side, revert the procedure...
There is a smarter way? (i believe that there are no KDL messages
implement in ros, at the moment...)
Thanks, Gianni.

ROS-orocos KDL::Frame communication

2012/10/16 Gianni Borghesan <gianni [dot] borghesan [..] ...>:
>
>
> On 10/16/2012 03:41 PM, Steven Bellens wrote:
>>
>> 2012/10/16 Gianni Borghesan <gianni [dot] borghesan [..] ...>:
>>>
>>> Hi all,
>>> I have the following issue:
>>> I am writing a controller for the PR2, mainly using KDL,
>>> at some point i want to publish a frame, and the topic will be then
>>> connected to an orocos port
>>>
>>> at the moment, the only way i found is:
>>> - compute my KDL::Frame Tkdl,
>>> - convert it to a geometry_msgs::Pose Ttf
>>> tf::PoseKDLToMsg(Tkdl,Ttf);
>>> - publish Ttf
>>>
>>> and then, on the orocos side, revert the procedure...
>>> There is a smarter way? (i believe that there are no KDL messages
>>> implemented in ros, at the moment...)
>>
>>
>> Unfortunately, there is not.
>> If you want to do ROS <-> OROCOS communication you'll have to convert
>> between KDL::Frame and ros messages. If you just need OROCOS<->OROCOS
>
>
> In my case is a ROS->OROCOS comunication (the controller is a plugin for the
> PR2 realtime controller, so it behaves as a ROS node w.r.t. messages and so
> on, )

So then you'll read in the geometry_msgs/pose data from the ROS node
in your OROCOS component and convert it to a KDL::Frame. That's the
way it works atm
I have no idea if it would even be possible to generate a new ROS
message from an existing KDL struct.

Steven

> the setpoints (joint velocities, OROCOS->ROS) are given as std_msgs/Float64
> (a topic for each joint), so no big issue on this side...
>
>
>
>> communication (which you are also suggesting, but with a ROS node in
>> between?) you can of course just put the KDL::Frame on the port,
>> eliminating the ROS node.
>
>
>
>>
>> regards,
>>
>> Steven
>>
>>> Thanks, Gianni.
>>> --
>>> ------------------------------------------------
>>> Gianni Borghesan, PhD
>>> Robot Assisted Surgery group
>>> Robotics Research group
>>> KU Leuven,
>>> Department of Mechanical Engineering,
>>> Division of PMA
>>> Room 01.017
>>> Celestijnenlaan 300B, B-3001 Heverlee, Belgium.
>>> Tel: +32 16 322515.
>>> Fax: +32 16 322987
>>> ------------------------------------------------
>>> --
>>> Orocos-Users mailing list
>>> Orocos-Users [..] ...
>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
>
> --
> ------------------------------------------------
> Gianni Borghesan, PhD
> Robot Assisted Surgery group
> Robotics Research group
> KU Leuven,
> Department of Mechanical Engineering,
> Division of PMA
> Room 01.017
> Celestijnenlaan 300B, B-3001 Heverlee, Belgium.
> Tel: +32 16 322515.
> Fax: +32 16 322987
> ------------------------------------------------

ROS-orocos KDL::Frame communication

2012/10/16 Gianni Borghesan <gianni [dot] borghesan [..] ...>:
> Hi all,
> I have the following issue:
> I am writing a controller for the PR2, mainly using KDL,
> at some point i want to publish a frame, and the topic will be then
> connected to an orocos port
>
> at the moment, the only way i found is:
> - compute my KDL::Frame Tkdl,
> - convert it to a geometry_msgs::Pose Ttf
> tf::PoseKDLToMsg(Tkdl,Ttf);
> - publish Ttf
>
> and then, on the orocos side, revert the procedure...
> There is a smarter way? (i believe that there are no KDL messages
> implement in ros, at the moment...)

Unfortunately, there is not.
If you want to do ROS <-> OROCOS communication you'll have to convert
between KDL::Frame and ros messages. If you just need OROCOS<->OROCOS
communication (which you are also suggesting, but with a ROS node in
between?) you can of course just put the KDL::Frame on the port,
eliminating the ROS node.

regards,

Steven

> Thanks, Gianni.
> --
> ------------------------------------------------
> Gianni Borghesan, PhD
> Robot Assisted Surgery group
> Robotics Research group
> KU Leuven,
> Department of Mechanical Engineering,
> Division of PMA
> Room 01.017
> Celestijnenlaan 300B, B-3001 Heverlee, Belgium.
> Tel: +32 16 322515.
> Fax: +32 16 322987
> ------------------------------------------------
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

ROS-orocos KDL::Frame communication

On 10/16/2012 03:41 PM, Steven Bellens wrote:
> 2012/10/16 Gianni Borghesan <gianni [dot] borghesan [..] ...>:
>> Hi all,
>> I have the following issue:
>> I am writing a controller for the PR2, mainly using KDL,
>> at some point i want to publish a frame, and the topic will be then
>> connected to an orocos port
>>
>> at the moment, the only way i found is:
>> - compute my KDL::Frame Tkdl,
>> - convert it to a geometry_msgs::Pose Ttf
>> tf::PoseKDLToMsg(Tkdl,Ttf);
>> - publish Ttf
>>
>> and then, on the orocos side, revert the procedure...
>> There is a smarter way? (i believe that there are no KDL messages
>> implement in ros, at the moment...)
>
> Unfortunately, there is not.
> If you want to do ROS <-> OROCOS communication you'll have to convert
> between KDL::Frame and ros messages. If you just need OROCOS<->OROCOS
> communication (which you are also suggesting, but with a ROS node in
> between?) you can of course just put the KDL::Frame on the port,
> eliminating the ROS node.
a ros message is in the end just a struct, how much work is it to create one for KDL types?
Can it be automated, the other way around of what we have, message->typekit?
Did someone already create such messages?
>
> regards,
>
> Steven
>
>> Thanks, Gianni.
>> --
>> ------------------------------------------------
>> Gianni Borghesan, PhD
>> Robot Assisted Surgery group
>> Robotics Research group
>> KU Leuven,
>> Department of Mechanical Engineering,
>> Division of PMA
>> Room 01.017
>> Celestijnenlaan 300B, B-3001 Heverlee, Belgium.
>> Tel: +32 16 322515.
>> Fax: +32 16 322987
>> ------------------------------------------------
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users