Dear all,
I try to execute a scripts but even the basic things fail?!
An example I tried:
in deployer.xml I load a script :
<struct name="Deployer" type="OCL::DeploymentComponent">
<simple name="AutoStart" type="boolean"><value>1<value><simple>
<simple name="Service" type="string"><value>scripting<value><simple>
<simple name="RunScript"
type="string"><value>../scripts/init.ops<value><simple> -->
<struct>
in this init.ops file is this content: (AutoUnload being a property of
the deployer component
program bla{
AutoUnload = false;
}
when I start the deployer, I see in the taskBrowser:
Deployer [R]> ls
Listing TaskContext Deployer[R] :
Configuration Properties:
string RTT_COMPONENT_PATH =
/home/u0065688/src/svn/robotics-ros/packages/private-kul-ros-pkg/stacks/orocos_kinematics_dynamics/kdl_typekit/install/lib/orocos:/home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/lua:/home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/rtt/install/lib/orocos:/home/u0065688/src/svn/robotics-ros/packages/kul-ros-pkg/stacks/orocos_bayesian_filtering/bfl_typekit/lib/orocos:/home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/lib/orocos:
(Locations to look for components. Use a colon or semi-colon separated
list of paths. Defaults to the environment variable with the same name.)
bool AutoUnload = true (Stop, cleanup and
unload all components loaded by the DeploymentComponent when it is
destroyed.)
string Target = gnulinux (The Orocos Target
component suffix. Will be used in import statements to find matching
components. Only change this if you know what you are doing.)
Provided Interface:
Attributes :
bool Valid = true
int ORO_SCHED_RT = 1
int ORO_SCHED_OTHER = 0
int LowestPriority = 1
int HighestPriority = 99
Operations : activate addPeer cleanup cleanupComponents
clearConfiguration configure configureComponents connect connectPeers
connectPorts connectServices connectTwoPorts createStream
displayComponentTypes error getComponentTypes getPeriod import
inFatalError inRunTimeError isActive isConfigured isRunning kickOut
kickOutAll kickOutComponent kickStart loadComponent loadComponents
loadConfiguration loadConfigurationString loadLibrary loadService path
removePeer runScript setActivity setMasterSlaveActivity setPeriod
setPeriodicActivity setSequentialActivity setSlaveActivity start
startComponents stop stopComponents stream trigger unloadComponent
unloadComponents update
Data Flow Ports: (none)
Services:
bla ( Orocos Program Script )
scripting ( Orocos Scripting service. Use this service in order
to load or query programs or state machines. )
Requires Operations : (none)
Requests Services : (none)
Programs : bla[S]
Peers : CartesianMotion[S] CartesianTrajectoryGenerator[S]
FixedObject[R] KukaLWR[R] Reporter[S] Robot[S] Scene[U] Solver[S]
SuperVisor[R]
Deployer [R]> bla.start
= true
(here I started the script)
and then nothing happens.... he just says bla[R]
I tried this with different properties of different components,
functions, syntax (set before it, with or without ; behind it...)
What am I doing wrong? Can someone help me out?
thanks a lot!
Nick
executing scripts
On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> Dear all,
>
> I try to execute a scripts but even the basic things fail?!
>
> An example I tried:
>
> in deployer.xml I load a script :
>
> <struct name="Deployer" type="OCL::DeploymentComponent">
> <simple name="AutoStart" type="boolean"><value>1<value><simple>
>
> <simple name="Service" type="string"><value>scripting<value><simple>
> <simple name="RunScript"
> type="string"><value>../scripts/init.ops<value><simple> -->
> <struct>
>
> in this init.ops file is this content: (AutoUnload being a property of
> the deployer component
> program bla{
> AutoUnload = false;
>
> }
Your component is not periodic, so the script will only executed when the
component is triggered, or a period is set. Try for example:
program bla{
setPeriod(0.1)
AutoUnload = false;
}
I had a patch that warns when a program script is loaded in a non periodic
component. Maybe it's only "LoadProgramScript" that warns for this and not
RunScript. I'll take a look at it.
Peter
executing scripts
On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> > Dear all,
> >
> > I try to execute a scripts but even the basic things fail?!
> >
> > An example I tried:
> >
> > in deployer.xml I load a script :
> >
> > <struct name="Deployer" type="OCL::DeploymentComponent">
> > <simple name="AutoStart" type="boolean"><value>1<value><simple>
> >
> > <simple name="Service" type="string"><value>scripting<value><simple>
> > <simple name="RunScript"
> > type="string"><value>../scripts/init.ops<value><simple> -->
> > <struct>
> >
> > in this init.ops file is this content: (AutoUnload being a property of
> > the deployer component
> > program bla{
> >
> > AutoUnload = false;
> >
> > }
>
> Your component is not periodic, so the script will only executed when the
> component is triggered, or a period is set. Try for example:
>
> program bla{
> setPeriod(0.1)
> AutoUnload = false;
> }
>
> I had a patch that warns when a program script is loaded in a non periodic
> component. Maybe it's only "LoadProgramScript" that warns for this and not
> RunScript. I'll take a look at it.
Yep. I've pushed a better solution that will warn in each case to the
toolchain-2.2 branch.
Peter
executing scripts
On 01/17/2011 12:22 PM, Peter Soetens wrote:
> On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
>> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
>>> Dear all,
>>>
>>> I try to execute a scripts but even the basic things fail?!
>>>
>>> An example I tried:
>>>
>>> in deployer.xml I load a script :
>>>
>>> <struct name="Deployer" type="OCL::DeploymentComponent">
>>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
>>>
>>> <simple name="Service" type="string"><value>scripting<value><simple>
>>> <simple name="RunScript"
>>> type="string"><value>../scripts/init.ops<value><simple> -->
>>> <struct>
>>>
>>> in this init.ops file is this content: (AutoUnload being a property of
>>> the deployer component
>>> program bla{
>>>
>>> AutoUnload = false;
>>>
>>> }
>> Your component is not periodic, so the script will only executed when the
>> component is triggered, or a period is set. Try for example:
>>
>> program bla{
>> setPeriod(0.1)
>> AutoUnload = false;
>> }
>>
>> I had a patch that warns when a program script is loaded in a non periodic
>> component. Maybe it's only "LoadProgramScript" that warns for this and not
>> RunScript. I'll take a look at it.
> Yep. I've pushed a better solution that will warn in each case to the
> toolchain-2.2 branch.
>
Thanks a lot!
Now I have a different problem with scripts...
I load a script (in the same way as above, but in a component with a
periodic activity) with this content:
export void loadFSM(){
CartesianMotion.use_pose = false;
return
}
When call the function, it blocks my program: I can type things, but it
doesn't respond to it.
I tried 'export function loadFSM' and with or without a void or bool
return statement, but it doesn't do anything.
> Peter
Nick
executing scripts
On Monday 17 January 2011 13:09:59 Dominick Vanthienen wrote:
> On 01/17/2011 12:22 PM, Peter Soetens wrote:
> > On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
> >> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> >>> Dear all,
> >>>
> >>> I try to execute a scripts but even the basic things fail?!
> >>>
> >>> An example I tried:
> >>>
> >>> in deployer.xml I load a script :
> >>>
> >>> <struct name="Deployer" type="OCL::DeploymentComponent">
> >>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
> >>>
> >>> <simple name="Service" type="string"><value>scripting<value><simple>
> >>> <simple name="RunScript"
> >>> type="string"><value>../scripts/init.ops<value><simple> -->
> >>> <struct>
> >>>
> >>> in this init.ops file is this content: (AutoUnload being a property of
> >>> the deployer component
> >>> program bla{
> >>>
> >>> AutoUnload = false;
> >>>
> >>> }
> >>
> >> Your component is not periodic, so the script will only executed when
> >> the component is triggered, or a period is set. Try for example:
> >>
> >> program bla{
> >>
> >> setPeriod(0.1)
> >> AutoUnload = false;
> >>
> >> }
> >>
> >> I had a patch that warns when a program script is loaded in a non
> >> periodic component. Maybe it's only "LoadProgramScript" that warns for
> >> this and not RunScript. I'll take a look at it.
> >
> > Yep. I've pushed a better solution that will warn in each case to the
> > toolchain-2.2 branch.
>
> Thanks a lot!
>
> Now I have a different problem with scripts...
> I load a script (in the same way as above, but in a component with a
> periodic activity) with this content:
>
> export void loadFSM(){
> CartesianMotion.use_pose = false;
> return
> }
>
> When call the function, it blocks my program: I can type things, but it
> doesn't respond to it.
> I tried 'export function loadFSM' and with or without a void or bool
> return statement, but it doesn't do anything.
>
I have fixed this issue on the toolchain-2.2 branch of RTT. That together with
the parse error I mentioned in the other mail.
Thanks for the testing !
Peter
executing scripts
On 01/18/2011 12:44 PM, Peter Soetens wrote:
> On Monday 17 January 2011 13:09:59 Dominick Vanthienen wrote:
>> On 01/17/2011 12:22 PM, Peter Soetens wrote:
>>> On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
>>>> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
>>>>> Dear all,
>>>>>
>>>>> I try to execute a scripts but even the basic things fail?!
>>>>>
>>>>> An example I tried:
>>>>>
>>>>> in deployer.xml I load a script :
>>>>>
>>>>> <struct name="Deployer" type="OCL::DeploymentComponent">
>>>>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
>>>>>
>>>>> <simple name="Service" type="string"><value>scripting<value><simple>
>>>>> <simple name="RunScript"
>>>>> type="string"><value>../scripts/init.ops<value><simple> -->
>>>>> <struct>
>>>>>
>>>>> in this init.ops file is this content: (AutoUnload being a property of
>>>>> the deployer component
>>>>> program bla{
>>>>>
>>>>> AutoUnload = false;
>>>>>
>>>>> }
>>>> Your component is not periodic, so the script will only executed when
>>>> the component is triggered, or a period is set. Try for example:
>>>>
>>>> program bla{
>>>>
>>>> setPeriod(0.1)
>>>> AutoUnload = false;
>>>>
>>>> }
>>>>
>>>> I had a patch that warns when a program script is loaded in a non
>>>> periodic component. Maybe it's only "LoadProgramScript" that warns for
>>>> this and not RunScript. I'll take a look at it.
>>> Yep. I've pushed a better solution that will warn in each case to the
>>> toolchain-2.2 branch.
>> Thanks a lot!
>>
>> Now I have a different problem with scripts...
>> I load a script (in the same way as above, but in a component with a
>> periodic activity) with this content:
>>
>> export void loadFSM(){
>> CartesianMotion.use_pose = false;
>> return
>> }
>>
>> When call the function, it blocks my program: I can type things, but it
>> doesn't respond to it.
>> I tried 'export function loadFSM' and with or without a void or bool
>> return statement, but it doesn't do anything.
>>
> I have fixed this issue on the toolchain-2.2 branch of RTT. That together with
> the parse error I mentioned in the other mail.
>
> Thanks for the testing !
>
> Peter
Thanks!
But...
I just tested it:
When I do ordinarry stuff like
export bool startFSM(){
CartesianMotion.use_pose=false;
return true;
}
it works.
But when I try to activate (and start) my state machine:
export bool startFSM(){
CartesianMotion.use_pose=false;
Test.activate();
return true;
}
it doesn't work: he returns nothing and doesn't do the activate (I
placed a print.ln in between to check)
He just hangs, I can't type anything in the taskBrowser. (see below, log
in attachement)
Nick
(gdb) run
Starting program:
/home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/bin/deployer-gnulinux
-lwarning -s cartesian_velocity.xml
[Thread debugging using libthread_db enabled]
[New Thread 0xb6d47b70 (LWP 17818)]
[New Thread 0xb6546b70 (LWP 17819)]
[New Thread 0xb1e95b70 (LWP 17820)]
3.760 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xb1694b70 (LWP 17821)]
[New Thread 0xb0e93b70 (LWP 17822)]
3.762 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xb0692b70 (LWP 17823)]
3.763 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xafe91b70 (LWP 17824)]
3.764 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xaf690b70 (LWP 17825)]
3.765 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xaee8fb70 (LWP 17826)]
[New Thread 0xae68eb70 (LWP 17827)]
3.767 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xade8db70 (LWP 17828)]
3.768 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
type to SCHED_OTHER for non-privileged users..
[New Thread 0xad68cb70 (LWP 17829)]
[Thread 0xb1e95b70 (LWP 17820) exited]
[Thread 0xb0e93b70 (LWP 17822) exited]
[Thread 0xb0692b70 (LWP 17823) exited]
[Thread 0xafe91b70 (LWP 17824) exited]
[Thread 0xaf690b70 (LWP 17825) exited]
[Thread 0xae68eb70 (LWP 17827) exited]
[Thread 0xade8db70 (LWP 17828) exited]
[Thread 0xad68cb70 (LWP 17829) exited]
[New Thread 0xad68cb70 (LWP 17830)]
Switched to : Deployer
This console reader allows you to browse and manipulate TaskContexts.
You can type in an operation, expression, create or change variables.
(type 'help' for instructions and 'ls' for context info)
TAB completion and HISTORY is available ('bash' like)
Deployer [R]> ls
Listing TaskContext Deployer[R] :
Configuration Properties:
string RTT_COMPONENT_PATH =
/home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/lib/orocos
(Locations to look for components. Use a colon or semi-colon separated
list of paths. Defaults to the environment variable with the same name.)
bool AutoUnload = true (Stop, cleanup and
unload all components loaded by the DeploymentComponent when it is
destroyed.)
string Target = gnulinux (The Orocos Target
component suffix. Will be used in import statements to find matching
components. Only change this if you know what you are doing.)
Provided Interface:
Attributes :
bool Valid = true
int ORO_SCHED_RT = 1
int ORO_SCHED_OTHER = 0
int LowestPriority = 1
int HighestPriority = 99
Operations : activate addPeer cleanup cleanupComponents
clearConfiguration configure configureComponents connect connectPeers
connectPorts connectServices connectTwoPorts createStream
displayComponentTypes error getComponentTypes getPeriod import
inFatalError inRunTimeError isActive isConfigured isRunning kickOut
kickOutAll kickOutComponent kickStart loadComponent loadComponents
loadConfiguration loadConfigurationString loadLibrary loadService path
removePeer runScript setActivity setMasterSlaveActivity setPeriod
setPeriodicActivity setSequentialActivity setSlaveActivity start
startComponents stop stopComponents stream trigger unloadComponent
unloadComponents update
Data Flow Ports: (none)
Services:
scripting ( Orocos Scripting service. Use this service in order
to load or query programs or state machines. )
Requires Operations : (none)
Requests Services : (none)
Peers : CartesianMotion[S] CartesianTrajectoryGenerator[S]
FixedObject[R] KukaLWR[R] Reporter[S] Robot[S] Scene[S] Solver[S]
SuperVisor[R]
Deployer [R]> cd SuperVisor
Switched to : SuperVisor
SuperVisor [R]> ls
Listing TaskContext SuperVisor[R] :
Configuration Properties: (none)
Provided Interface:
Attributes : (none)
Operations : activate cleanup configure error getPeriod
inFatalError inRunTimeError isActive isConfigured isRunning setPeriod
start startFSM stop trigger update
Data Flow Ports: (none)
Services:
Test ( )
scripting ( Orocos Scripting service. Use this service in order
to load or query programs or state machines. )
Requires Operations : (none)
Requests Services : (none)
StateMachines: Test[I]
Peers : CartesianMotion[S] CartesianTrajectoryGenerator[S]
FixedObject[R] KukaLWR[R] Reporter[S] Robot[S] Scene[S] Solver[S]
SuperVisor [R]> startFSM
^Z =>I've to kill it myself
Program received signal SIGTSTP, Stopped (user).
0xb7fe1424 in __kernel_vsyscall ()
(gdb) q
executing scripts
On 01/18/2011 02:46 PM, Dominick Vanthienen wrote:
>
>
>
> On 01/18/2011 12:44 PM, Peter Soetens wrote:
>> On Monday 17 January 2011 13:09:59 Dominick Vanthienen wrote:
>>> On 01/17/2011 12:22 PM, Peter Soetens wrote:
>>>> On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
>>>>> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
>>>>>> Dear all,
>>>>>>
>>>>>> I try to execute a scripts but even the basic things fail?!
>>>>>>
>>>>>> An example I tried:
>>>>>>
>>>>>> in deployer.xml I load a script :
>>>>>>
>>>>>> <struct name="Deployer" type="OCL::DeploymentComponent">
>>>>>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
>>>>>>
>>>>>> <simple name="Service" type="string"><value>scripting<value><simple>
>>>>>> <simple name="RunScript"
>>>>>> type="string"><value>../scripts/init.ops<value><simple> -->
>>>>>> <struct>
>>>>>>
>>>>>> in this init.ops file is this content: (AutoUnload being a property of
>>>>>> the deployer component
>>>>>> program bla{
>>>>>>
>>>>>> AutoUnload = false;
>>>>>>
>>>>>> }
>>>>> Your component is not periodic, so the script will only executed when
>>>>> the component is triggered, or a period is set. Try for example:
>>>>>
>>>>> program bla{
>>>>>
>>>>> setPeriod(0.1)
>>>>> AutoUnload = false;
>>>>>
>>>>> }
>>>>>
>>>>> I had a patch that warns when a program script is loaded in a non
>>>>> periodic component. Maybe it's only "LoadProgramScript" that warns for
>>>>> this and not RunScript. I'll take a look at it.
>>>> Yep. I've pushed a better solution that will warn in each case to the
>>>> toolchain-2.2 branch.
>>> Thanks a lot!
>>>
>>> Now I have a different problem with scripts...
>>> I load a script (in the same way as above, but in a component with a
>>> periodic activity) with this content:
>>>
>>> export void loadFSM(){
>>> CartesianMotion.use_pose = false;
>>> return
>>> }
>>>
>>> When call the function, it blocks my program: I can type things, but it
>>> doesn't respond to it.
>>> I tried 'export function loadFSM' and with or without a void or bool
>>> return statement, but it doesn't do anything.
>>>
>> I have fixed this issue on the toolchain-2.2 branch of RTT. That together with
>> the parse error I mentioned in the other mail.
>>
>> Thanks for the testing !
>>
>> Peter
> Thanks!
> But...
> I just tested it:
> When I do ordinarry stuff like
>
> export bool startFSM(){
> CartesianMotion.use_pose=false;
> return true;
> }
>
> it works.
> But when I try to activate (and start) my state machine:
> export bool startFSM(){
> CartesianMotion.use_pose=false;
> Test.activate();
> return true;
> }
> it doesn't work: he returns nothing and doesn't do the activate (I
> placed a print.ln in between to check)
> He just hangs, I can't type anything in the taskBrowser. (see below, log
> in attachement)
solved: same problem as in other scripting problem: PeriodicActivity=>
Activity and the latest toolchain 2.2 version does the trick!
> Nick
>
> (gdb) run
> Starting program:
> /home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/bin/deployer-gnulinux
> -lwarning -s cartesian_velocity.xml
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb6d47b70 (LWP 17818)]
> [New Thread 0xb6546b70 (LWP 17819)]
> [New Thread 0xb1e95b70 (LWP 17820)]
> 3.760 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xb1694b70 (LWP 17821)]
> [New Thread 0xb0e93b70 (LWP 17822)]
> 3.762 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xb0692b70 (LWP 17823)]
> 3.763 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xafe91b70 (LWP 17824)]
> 3.764 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xaf690b70 (LWP 17825)]
> 3.765 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xaee8fb70 (LWP 17826)]
> [New Thread 0xae68eb70 (LWP 17827)]
> 3.767 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xade8db70 (LWP 17828)]
> 3.768 [ Warning][DeploymentComponent::loadComponents] Lowering scheduler
> type to SCHED_OTHER for non-privileged users..
> [New Thread 0xad68cb70 (LWP 17829)]
> [Thread 0xb1e95b70 (LWP 17820) exited]
> [Thread 0xb0e93b70 (LWP 17822) exited]
> [Thread 0xb0692b70 (LWP 17823) exited]
> [Thread 0xafe91b70 (LWP 17824) exited]
> [Thread 0xaf690b70 (LWP 17825) exited]
> [Thread 0xae68eb70 (LWP 17827) exited]
> [Thread 0xade8db70 (LWP 17828) exited]
> [Thread 0xad68cb70 (LWP 17829) exited]
> [New Thread 0xad68cb70 (LWP 17830)]
> Switched to : Deployer
>
> This console reader allows you to browse and manipulate TaskContexts.
> You can type in an operation, expression, create or change variables.
> (type 'help' for instructions and 'ls' for context info)
>
> TAB completion and HISTORY is available ('bash' like)
>
> Deployer [R]> ls
>
> Listing TaskContext Deployer[R] :
>
> Configuration Properties:
> string RTT_COMPONENT_PATH =
> /home/u0065688/src/svn/robotics-ros/packages/orocos_toolchain_ros/ocl/lib/orocos
> (Locations to look for components. Use a colon or semi-colon separated
> list of paths. Defaults to the environment variable with the same name.)
> bool AutoUnload = true (Stop, cleanup and
> unload all components loaded by the DeploymentComponent when it is
> destroyed.)
> string Target = gnulinux (The Orocos Target
> component suffix. Will be used in import statements to find matching
> components. Only change this if you know what you are doing.)
>
> Provided Interface:
> Attributes :
> bool Valid = true
> int ORO_SCHED_RT = 1
> int ORO_SCHED_OTHER = 0
> int LowestPriority = 1
> int HighestPriority = 99
>
> Operations : activate addPeer cleanup cleanupComponents
> clearConfiguration configure configureComponents connect connectPeers
> connectPorts connectServices connectTwoPorts createStream
> displayComponentTypes error getComponentTypes getPeriod import
> inFatalError inRunTimeError isActive isConfigured isRunning kickOut
> kickOutAll kickOutComponent kickStart loadComponent loadComponents
> loadConfiguration loadConfigurationString loadLibrary loadService path
> removePeer runScript setActivity setMasterSlaveActivity setPeriod
> setPeriodicActivity setSequentialActivity setSlaveActivity start
> startComponents stop stopComponents stream trigger unloadComponent
> unloadComponents update
>
> Data Flow Ports: (none)
>
> Services:
> scripting ( Orocos Scripting service. Use this service in order
> to load or query programs or state machines. )
>
> Requires Operations : (none)
> Requests Services : (none)
>
> Peers : CartesianMotion[S] CartesianTrajectoryGenerator[S]
> FixedObject[R] KukaLWR[R] Reporter[S] Robot[S] Scene[S] Solver[S]
> SuperVisor[R]
> Deployer [R]> cd SuperVisor
> Switched to : SuperVisor
> SuperVisor [R]> ls
>
> Listing TaskContext SuperVisor[R] :
>
> Configuration Properties: (none)
>
> Provided Interface:
> Attributes : (none)
> Operations : activate cleanup configure error getPeriod
> inFatalError inRunTimeError isActive isConfigured isRunning setPeriod
> start startFSM stop trigger update
>
> Data Flow Ports: (none)
>
> Services:
> Test ( )
> scripting ( Orocos Scripting service. Use this service in order
> to load or query programs or state machines. )
>
> Requires Operations : (none)
> Requests Services : (none)
> StateMachines: Test[I]
>
> Peers : CartesianMotion[S] CartesianTrajectoryGenerator[S]
> FixedObject[R] KukaLWR[R] Reporter[S] Robot[S] Scene[S] Solver[S]
> SuperVisor [R]> startFSM
>
>
>
>
>
> ^Z =>I've to kill it myself
> Program received signal SIGTSTP, Stopped (user).
> 0xb7fe1424 in __kernel_vsyscall ()
> (gdb) q
>
>
executing scripts
On Tuesday 18 January 2011 14:46:58 Dominick Vanthienen wrote:
> On 01/18/2011 12:44 PM, Peter Soetens wrote:
> > On Monday 17 January 2011 13:09:59 Dominick Vanthienen wrote:
> >> On 01/17/2011 12:22 PM, Peter Soetens wrote:
> >>> On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
> >>>> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> >>>>> Dear all,
> >>>>>
> >>>>> I try to execute a scripts but even the basic things fail?!
> >>>>>
> >>>>> An example I tried:
> >>>>>
> >>>>> in deployer.xml I load a script :
> >>>>>
> >>>>> <struct name="Deployer" type="OCL::DeploymentComponent">
> >>>>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
> >>>>>
> >>>>> <simple name="Service"
> >>>>> type="string"><value>scripting<value><simple> <simple
> >>>>> name="RunScript"
> >>>>> type="string"><value>../scripts/init.ops<value><simple> -->
> >>>>> <struct>
> >>>>>
> >>>>> in this init.ops file is this content: (AutoUnload being a property
> >>>>> of the deployer component
> >>>>> program bla{
> >>>>>
> >>>>> AutoUnload = false;
> >>>>>
> >>>>> }
> >>>>
> >>>> Your component is not periodic, so the script will only executed when
> >>>> the component is triggered, or a period is set. Try for example:
> >>>>
> >>>> program bla{
> >>>>
> >>>> setPeriod(0.1)
> >>>> AutoUnload = false;
> >>>>
> >>>> }
> >>>>
> >>>> I had a patch that warns when a program script is loaded in a non
> >>>> periodic component. Maybe it's only "LoadProgramScript" that warns for
> >>>> this and not RunScript. I'll take a look at it.
> >>>
> >>> Yep. I've pushed a better solution that will warn in each case to the
> >>> toolchain-2.2 branch.
> >>
> >> Thanks a lot!
> >>
> >> Now I have a different problem with scripts...
> >> I load a script (in the same way as above, but in a component with a
> >> periodic activity) with this content:
> >>
> >> export void loadFSM(){
> >>
> >> CartesianMotion.use_pose = false;
> >> return
> >>
> >> }
> >>
> >> When call the function, it blocks my program: I can type things, but it
> >> doesn't respond to it.
> >> I tried 'export function loadFSM' and with or without a void or bool
> >> return statement, but it doesn't do anything.
> >
> > I have fixed this issue on the toolchain-2.2 branch of RTT. That together
> > with the parse error I mentioned in the other mail.
> >
> > Thanks for the testing !
> >
> > Peter
>
> Thanks!
> But...
> I just tested it:
> When I do ordinarry stuff like
>
> export bool startFSM(){
> CartesianMotion.use_pose=false;
> return true;
> }
>
> it works.
> But when I try to activate (and start) my state machine:
> export bool startFSM(){
> CartesianMotion.use_pose=false;
> Test.activate();
> return true;
> }
> it doesn't work: he returns nothing and doesn't do the activate (I
> placed a print.ln in between to check)
> He just hangs, I can't type anything in the taskBrowser. (see below, log
> in attachement)
Can you run my test program in attachment and try to figure out why mine works
and yours doesn't ?
rosrun ocl deployer-gnulinux -s test-auto-start.ops -ldebug
Peter
executing scripts
On Monday 17 January 2011 13:09:59 Dominick Vanthienen wrote:
> On 01/17/2011 12:22 PM, Peter Soetens wrote:
> > On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
> >> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> >>> Dear all,
> >>>
> >>> I try to execute a scripts but even the basic things fail?!
> >>>
> >>> An example I tried:
> >>>
> >>> in deployer.xml I load a script :
> >>>
> >>> <struct name="Deployer" type="OCL::DeploymentComponent">
> >>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
> >>>
> >>> <simple name="Service" type="string"><value>scripting<value><simple>
> >>> <simple name="RunScript"
> >>> type="string"><value>../scripts/init.ops<value><simple> -->
> >>> <struct>
> >>>
> >>> in this init.ops file is this content: (AutoUnload being a property of
> >>> the deployer component
> >>> program bla{
> >>>
> >>> AutoUnload = false;
> >>>
> >>> }
> >>
> >> Your component is not periodic, so the script will only executed when
> >> the component is triggered, or a period is set. Try for example:
> >>
> >> program bla{
> >>
> >> setPeriod(0.1)
> >> AutoUnload = false;
> >>
> >> }
> >>
> >> I had a patch that warns when a program script is loaded in a non
> >> periodic component. Maybe it's only "LoadProgramScript" that warns for
> >> this and not RunScript. I'll take a look at it.
> >
> > Yep. I've pushed a better solution that will warn in each case to the
> > toolchain-2.2 branch.
>
> Thanks a lot!
>
> Now I have a different problem with scripts...
> I load a script (in the same way as above, but in a component with a
> periodic activity) with this content:
>
> export void loadFSM(){
> CartesianMotion.use_pose = false;
> return
> }
>
> When call the function, it blocks my program: I can type things, but it
> doesn't respond to it.
> I tried 'export function loadFSM' and with or without a void or bool
> return statement, but it doesn't do anything.
Yep, confirmed. Some completion event (ie semaphore) is getting lost, or
delivered to the wrong thread.
It's very likely taskbrowser-specific bug. I tested it with this:
export function bla {
return
}
require("print")
setPeriod(0.1);
program foo {
print.ln("foo");
bla()
print.ln("foo2");
}
foo.start()
And it prints foo and foo2. The parser has a bug that you can't put the
'require' statement before of the export statement. We need to fix that too.
Peter
executing scripts
2011/1/17 Dominick Vanthienen <dominick [dot] vanthienen [..] ...>
>
>
>
>
> On 01/17/2011 12:22 PM, Peter Soetens wrote:
> > On Monday 17 January 2011 12:10:23 Peter Soetens wrote:
> >> On Monday 17 January 2011 11:53:36 Dominick Vanthienen wrote:
> >>> Dear all,
> >>>
> >>> I try to execute a scripts but even the basic things fail?!
> >>>
> >>> An example I tried:
> >>>
> >>> in deployer.xml I load a script :
> >>>
> >>> <struct name="Deployer" type="OCL::DeploymentComponent">
> >>> <simple name="AutoStart" type="boolean"><value>1<value><simple>
> >>>
> >>> <simple name="Service" type="string"><value>scripting<value><simple>
> >>> <simple name="RunScript"
> >>> type="string"><value>../scripts/init.ops<value><simple> -->
> >>> <struct>
> >>>
> >>> in this init.ops file is this content: (AutoUnload being a property of
> >>> the deployer component
> >>> program bla{
> >>>
> >>> AutoUnload = false;
> >>>
> >>> }
> >> Your component is not periodic, so the script will only executed when
> the
> >> component is triggered, or a period is set. Try for example:
> >>
> >> program bla{
> >> setPeriod(0.1)
> >> AutoUnload = false;
> >> }
> >>
> >> I had a patch that warns when a program script is loaded in a non
> periodic
> >> component. Maybe it's only "LoadProgramScript" that warns for this and
> not
> >> RunScript. I'll take a look at it.
> > Yep. I've pushed a better solution that will warn in each case to the
> > toolchain-2.2 branch.
> >
> Thanks a lot!
>
> Now I have a different problem with scripts...
> I load a script (in the same way as above, but in a component with a
> periodic activity) with this content:
>
> export void loadFSM(){
> CartesianMotion.use_pose = false;
> return
> }
>
> When call the function, it blocks my program: I can type things, but it
> doesn't respond to it.
> I tried 'export function loadFSM' and with or without a void or bool
> return statement, but it doesn't do anything.
>
>
You should send some more detailled information like logfiles, commands to
run your app, relevant configuration files (like deployer.xml), "ls" of
relevant components as you did in your first mail because it is quite hard
to see what's going on :)
>
>
> > Peter
> Nick
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>