[Rock-dev] Writing a plugin for Orogen

Charles Lesire-Cabaniols charles.lesire at gmail.com
Mon Dec 3 10:42:32 CET 2012


2012/12/3 Sylvain Joyeux <sylvain.joyeux at dfki.de>

> On 12/03/2012 09:35 AM, Charles Lesire-Cabaniols wrote:
>
>> Hi rock-devs,
>>
>> I am trying to extend the standard orogen syntax by providing extra key
>> words. For instance, I would like to standardize an output port of my
>> system components by forcing its name to be 'system_state'.
>>
> Are you aware of other methods to achieve the same:
>  - subclassing (http://www.rock-robotics.org/**
> stable/documentation/orogen/**task_inheritance.html<http://www.rock-robotics.org/stable/documentation/orogen/task_inheritance.html>
> )
>  - the custom states (I don't know what you want to put in 'system_state',
> so that might be absolutely not relevant ;-))


Yes, I looked at them, but I defintely think that developing a plugin is
the best way to go...

Even if I will use custom states as well ! :)



>
>
>  I hence would like my users to use system_state('my_type') instead of
>> output_port('system_state', 'my_type') to avoid mistakes (as far as
>> possible).
>>
>> I then decided to implement an orogen plugin.
>>
>> Having a look at http://rock-robotics.org/**stable/documentation/orogen/*
>> *plugins.html<http://rock-robotics.org/stable/documentation/orogen/plugins.html>,
>> I tried the simple example: I wrote a file with the first code snippet of
>> the link, and put it on install/share/orogen/plugins.
>>
>> I then defined a new Orogen component with the instruction
>> add_boolean_attribute "test"
>>
>> But after generating the code with orogen my_component.orogen, I found
>> nothing related to this boolean attribute!
>>
>> What is wrong in the process I followed?
>>
> All the "_base_" methods define stuff on the Base class, i.e. in
> .orogen/tasks/MyTaskBase.hpp. Have you looked there ?
>

Yes. I found absolutely nothing about my "test" attribute.
Is there a way to know if Orogen has found the plugin?


>
> If you want to generate in the user-visible parts, use the user methods,
> i.e. add_user_member instead of add_base_member
>
> Sylvain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20121203/73fca395/attachment-0001.htm 


More information about the Rock-dev mailing list