[Rock-dev] Prefix Extension for orogen deployments

Chris Mueller christoph.mueller at dfki.de
Mon May 9 18:06:13 CEST 2011


Am 09.05.2011 17:01, schrieb Sylvain Joyeux:
> On 05/09/2011 04:55 PM, Chris Mueller wrote:
>> Here are some of my thoughts about this issue:
>>
>> * Therefore we want to decide at runtime, which task should be 
>> started, we
>> need an instance of each task for all robotic systems in the
>> deployment's main.cpp
>> template.
> Why do you want that ? Should not you care only about adding a prefix 
> to all tasks, but starting the set of tasks that the deployment 
> contains ?

That's exactly what i'm thinking. The problem is only the commandline 
arguments are first known at runtime, after we have
started the deployment with a given prefix and when orogen already built 
it. Therefore orogen only knows the possible prefixes
and i need to list all instances of the tasks in order to filter it by 
the prefix in the generated main.cpp for deciding which tasks should be 
started.

The consequence for a deployment specification would be something like 
that, where i need to list all possible tasks that is startable by the 
prefix.

deployment "SIMULATION" do
    system_a = task("a_simulation", "a_simulation::Core")
    system_b = task("b_simulation", "b_simulation::Core")
    ....

Now assume there exists also 8-15 deployments with the same 
requirements, maybe for more than 4 prefixes/systems
and each task has additionally common configuration, but can differs 
slightly.

Of course, this is the simplest solution. But maybe there is also a 
better one, that suits more properly if additional systems
needs to be integrated in the future and the deployments needs to scale.

The aim is currently simplifying our current deployment situation, where 
we have one big deployment module for each system
and we would like to switch between them a little faster e.g. simple 
using the same deployments with a different prefix controlled
via a commandline argument. (Currently, we need to rebuild each 
deployment which configuration and task names is depending
on a system environment variable.).

>
>> * We need a mapping in an orogen deployment file for specifing the task
>> implementation
>> for a given prefix. Something like e.g.
>>
>> map = { "sherpa" =>  "sherpa_simulation::Core", "crex" =>
>> "crex_simulation::Core" };
> Aaaaheeeehhhehhehehehhhhh.
>
> This is going IMO waaaaay too far. If you want *different* deployments 
> based on a name, just create two deployments.
>

I know that and that's why i ask here, listening to your advice before 
integrating such a bigger modification ;]

> Now, here's the thing: I think that getting that flexible should *not* 
> be done through the current orogen deployment mechanism. If you 
> *really* want to be that flexible, then integrate support for the OCL 
> deployer in orocos.rb (which dynamically creates deployments based on 
> a XML configuration file or a LUA script).




More information about the Rock-dev mailing list