[prev in list] [next in list] [prev in thread] [next in thread] 

List:       orocos-users
Subject:    [Orocos-users] load a lua script in a
From:       peter () thesourceworks ! com (Peter Soetens)
Date:       2012-02-07 21:14:30
Message-ID: CAMYDobXXHwzadzmc2O=vJiT75_BQgi3TAojCx7Fz0HRA9z6YoA () mail ! gmail ! com
[Download RAW message or body]

On Tue, Feb 7, 2012 at 9:41 PM, Willy Lambert <lambert.willy at gmail.com> wrote:
>
>
> 2012/2/7 <goepfert.benoit at gmail.com>
>
>> I tried the following instructions :
>>
>> In my file ComponentA.cpp :
>> ...
>> this->getProvider("scripting")->runScript("deploy.ops");
>> ...
>>
>> and in deploy.ops (as shown by willy) :
>> loadService("Deployer","Lua")
>> Lua.exec_file("deploy.lua")
>>
>> but it doesn't work and I get the following errors :
>>
>> #rosrun ocl deployer-gnulinux -s connect.xml
>> 0.186 [ ERROR ?][ScriptingService] deploy.ops :Parse error at line 1: No
>> method "loadService" registered for the object or task "ComponentA".
>>
>> What's the problem?
>
>
> You can only do this in a deployer component !
> I already opened a thread about the possibility to use loadService in
> "normal" component. People are shared on it.

Adding this is trivial, as the attachment shows. Is it such a common
use case ? Others ?

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-taskcontext-add-loadService-operation-to-every-TC.patch
Type: text/x-patch
Size: 2542 bytes
Desc: not available
Url : http://lists.mech.kuleuven.be/pipermail/orocos-users/attachments/20120207/e675d742/attachment.bin 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic