For more information about this bug, visit
A new bug was added:
Summary: Programs not accessible in stateMachine
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Scripting
AssignedTo: orocos-dev [..] ...
ReportedBy: tinne [dot] delaet [..] ...
Before the syntax:
programs.CalibrateOffsetsProg ....
could be used.
But the taskbrowser gives the following warning:
0.239 [ Warning][ParserScriptingAccess::loadStateMachine] 'programs' peer not
found. The use of 'programs' has been deprecated.
0.239 [ Warning][ParserScriptingAccess::loadStateMachine] Modify your script to
use the program's or state machine's name directly.
0.242 [ Warning][ParserScriptingAccess::loadStateMachine] 'programs' peer not
found. The use of 'programs' has been deprecated.
0.242 [ Warning][ParserScriptingAccess::loadStateMachine] Modify your script to
use the program's or state machine's name directly.
0.243 [ Warning][ParserScriptingAccess::loadStateMachine] 'programs' peer not
found. The use of 'programs' has been deprecated.
0.243 [ Warning][ParserScriptingAccess::loadStateMachine] Modify your script to
use the program's or state machine's name directly.
So we changed the syntax from:
programs.CalibrateOffsetsProg.start()
in:
CalibrateOffsetsProg.start()
Now, the stateMachine returns an error at this line:
49 do Kuka160Sensor.start()
50 do Kuka160GeneratorPos.start()
51 do Kuka160ControllerPos.start()
52 do Kuka160EffectorVel.start()
53
E> 54 do CalibrateOffsetsProg.start()
55 }
56 exit {
57 do Kuka160EffectorVel.stop()
58 do Kuka160ControllerPos.stop()
59 do Kuka160GeneratorPos.stop()
60 do Kuka160Sensor.stop()
61
62 }
If we load the program before the stateMachine:
super.scripting()->loadPrograms("cpf/program_calibrate_offsets.ops");
super.scripting()->loadStateMachines("cpf/states.osd");
The program is not available in the taskbrowser.
If we change the order, the program becomes available in the taskbrowser but
the stateMachine still gives the same error as explained above.
If we manually start the program everything works fine:
In Task Singularity. (Status of last Command : none )
(type 'ls' for context info) :CalibrateOffsetsProg.start()
Got :CalibrateOffsetsProg.start()
In Task Singularity. (Status of last Command : done )
(type 'ls' for context info) :list CalibrateOffsetsProg
1 /**
2 * Script to calibrate the joint velocity offsets
3 */
4
5 program CalibrateOffsetsProg{
6 const double sleep = 4.0
7 const int number_of_samples = 100
8 var int i
9
R>10 do Kuka160ControllerPos.measureOffset(sleep, number_of_samples)
11 var array offset = Kuka160ControllerPos.getOffset()
12 for(set i=0;i<6;set i=i+1){
13 do Kuka160.addDriveOffset(i,offset[i])
Tinne and Ruben
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
tinne [dot] delaet [..] ... changed:
What |Removed |Added
---------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED
------- Comment #8 from tinne [dot] delaet [..] ... 2007-04-20 14:22
Everything works fine now!!!
Thanks for the incredible fast service!
Tinne
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #7 from peter [dot] soetens [..] ... 2007-04-20 13:33
Can you verify that the bug has been fixed in r6916. ?
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #6 from tinne [dot] delaet [..] ... 2007-04-20 11:05
Created an attachment (id=123)
--> (http://www.fmtc.be/orocos-bugzilla/attachment.cgi?id=123&action=view)
orocos log file
first load the statemachine then the program
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #5 from tinne [dot] delaet [..] ... 2007-04-20 11:04
Created an attachment (id=122)
--> (http://www.fmtc.be/orocos-bugzilla/attachment.cgi?id=122&action=view)
orocos log file
first load program then stateMachine
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #4 from tinne [dot] delaet [..] ... 2007-04-20 11:03
Next I will provide two attachements containing two orocos.log files with
ORO_LOGLEVEL put to 7.
The first one corresponds with first loading the program and next the
stateMachine.
The second one corresponds with first loading the stateMachine and next the
program.
Tinne
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #3 from peter [dot] soetens [..] ... 2007-04-20 10:55
(In reply to comment #2)
> The program is indeed deleted!
As you surely could have guessed by now, I'd really like the complete
orocos.log file with ORO_LOGLEVEL=7
Peter
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #2 from tinne [dot] delaet [..] ... 2007-04-20 10:46
If the program is loaded before the stateMachine orocos.log contains the
following output:
322 0.170 [ Info ][ProgramLoader::loadProgram] Loading Program
'CalibrateOffsetsProg'
323 0.171 [ Info ][ParserScriptingAccess::loadStateMachine] Parsing file
cpf/states.osd
324 0.219 [ Info ][CompletionProcessor] SingleThread created with
priority 253 and period 0.
325 0.219 [ Info ][CompletionProcessor] Scheduler type was set to `0'.
326 0.219 [ Info ][ParserScriptingAccess::loadStateMachine]
CompletionProcessor created with priority 253
327 0.282 [ Info ][ParserScriptingAccess::loadStateMachine] Looking for
constructor rotation with 3 Args.
....
348 0.338 [ Info ][ParserScriptingAccess::loadStateMachine]
ProgramProcessor deletes Program CalibrateOffsetsProg...
349 0.340 [ Info ][ParserScriptingAccess::loadStateMachine] Loading
StateMachine 'Default'
The program is indeed deleted!
Tinne
[Bug 376] Programs not accessible in stateMachine
For more information about this bug, visit
A comment was added:
------- Comment #1 from peter [dot] soetens [..] ... 2007-04-20 10:37
Thanks for the report,
(In reply to comment #0)
> Now, the stateMachine returns an error at this line:
> 49 do Kuka160Sensor.start()
> 50 do Kuka160GeneratorPos.start()
> 51 do Kuka160ControllerPos.start()
> 52 do Kuka160EffectorVel.start()
> 53
> E> 54 do CalibrateOffsetsProg.start()
This can mean only two things: program is running, or program has been
unloaded.
>
> If we load the program before the stateMachine:
> super.scripting()->loadPrograms("cpf/program_calibrate_offsets.ops");
> super.scripting()->loadStateMachines("cpf/states.osd");
> The program is not available in the taskbrowser.
Hence we need to find out why it was unloaded in the first place. Does the
logger report (orocos.log) that the program is being unloaded ? at which point
?
Peter