Corba & custom structs

Hi,

I have started developing an application for Orocos.

I found one major obstacle I can't seem to solve on my own:
Basically, I need to send over a couple custom structs to a remote Orocos task in order to visualize sensor data. (using Qt)
I understood the process of connecting two tasks via Corba (that is well documented/shown). However, I am not sure how I connect the datastreams with those custom structs. I looked at the KDL Corba folder, but that wasn't helpful to me.

I would be *very* grateful if someone could post a code example on how to approach it.

I think I should mention that my cmake knowledge isn't really good (used the template and slightly modified it) so please not too complicated.

Thanks in advance.

Corba & custom structs

On Thu, Jul 23, 2009 at 17:08, <grandmastermt2000 [..] ...> wrote:
> Hi,
>
> I have started developing an application for Orocos.
>
> I found one major obstacle I can't seem to solve on my own:
> Basically, I need to send over a couple custom structs to a remote Orocos task in order to visualize sensor data. (using Qt)
> I understood the process of connecting two tasks via Corba (that is well documented/shown). However, I am not sure how I connect the datastreams with those custom structs. I looked at the KDL Corba folder, but that wasn't helpful to me.

Getting the C++ data type to corba transportable data type
'automagically' is a major issue on orocos-dev right now. Sylvain
Joyeux created a tool 'orogen' to do this for you, but it is alfa
right now. For now you need to create your own .idl file and define
how the data is copied to your idl struct and back to C++ (it's based
on AnyConversion in CorbaConversion.hpp). The forum/Google is the
place to look for clues right now...

Peter

Corba & custom structs

On Aug 10, 2009, at 04:58 , Peter Soetens wrote:

> On Thu, Jul 23, 2009 at 17:08, <grandmastermt2000 [..] ...> wrote:
>> Hi,
>>
>> I have started developing an application for Orocos.
>>
>> I found one major obstacle I can't seem to solve on my own:
>> Basically, I need to send over a couple custom structs to a remote
>> Orocos task in order to visualize sensor data. (using Qt)
>> I understood the process of connecting two tasks via Corba (that is
>> well documented/shown). However, I am not sure how I connect the
>> datastreams with those custom structs. I looked at the KDL Corba
>> folder, but that wasn't helpful to me.
>
> Getting the C++ data type to corba transportable data type
> 'automagically' is a major issue on orocos-dev right now. Sylvain
> Joyeux created a tool 'orogen' to do this for you, but it is alfa
> right now. For now you need to create your own .idl file and define
> how the data is copied to your idl struct and back to C++ (it's based
> on AnyConversion in CorbaConversion.hpp). The forum/Google is the
> place to look for clues right now...

Or our own (in progress) tutorial ...

http://orocos.org/wiki/rtt/simple-examples/developing-plugins-and-toolkits

I intend to finish the tutorial this week.
Stephen

Corba & custom structs

You first need to define a Conversion of your type info Corba::Any (inheriting the AnyConversion structure).
Second, you must define a TransportPlugin where a transport protocol musr be added to your type.

I asked some questions about that for IplImages on the forum, and the answers I add (that helped me making my transport work) should be accessible searching 'Corba' and 'Image' on the forum (I guess).

---
Charles

Well,I gave up on corba and

Well,
I gave up on corba and the custom structs.
I will try to make it work with the supported types such as vector.

Though I have a question, I have tried to play around with the KTaskBrowser and used the corba-example (smallnet) and connected to the ComponentA as described.
Is it possible, that the KTaskBrowser is awfully slow when it comes to get it ready to browse the process?
I also modified the data-flow example and connected with the same result. KTaskBrowser is very slow setting up the information and it responds slow as well.

What's up with that?

Well,I gave up on corba and

On Jul 25, 2009, at 15:23 , grandmastermt2000 [..] ... wrote:

> Well,
> I gave up on corba and the custom structs.
> I will try to make it work with the supported types such as
> vector<double>.

Shame, but I do know how difficult plugins can be the first time. I'm
hoping to write a tutorial this week or next, on how to do this.

> Though I have a question, I have tried to play around with the
> KTaskBrowser and used the corba-example (smallnet) and connected to
> the ComponentA as described.
> Is it possible, that the KTaskBrowser is awfully slow when it comes
> to get it ready to browse the process?
> I also modified the data-flow example and connected with the same
> result. KTaskBrowser is very slow setting up the information and it
> responds slow as well.
>
> What's up with that?

Have not used KTaskBrowser, but do you have completely working forward
and reverse DNS? The CORBA packages are unnecessarily sensitive to
incorrect DNS settings (that is our biggest runtime nightmare with
Orocs, damn CORBA sensitivites!). Typically you will see (multiple) 5
second delays injected as CORBA tries to lookup names (even when you
_explicitily_ tell it not to).

HTH
S

A tutorial would be much

A tutorial would be much appreciated. The learning curve is really high, especially for someone who has limited knowledge with Corba and co.

As for the KTaskBrowser, I haven't thought about DNS honestly.
I will look into it, and will get back once I succeeded or failed.

EDIT:
My KTaskBrowser problem was solved using the method:
"Non-working DNS or you must use IP addresses" as described in the wiki regarding Corba.
It's as fas as you expect it to be. Now I only need to wait for your tutorial regarding the structs. :)