Hi,
In the rtt-exercise-1.6.1/controller-1-solution, when I deploy it with controller.cpf, it shows me
<code>
0.017 [ Info ][PropertyLoader:configure] Configuring TaskContext 'Controller' with './deployment/controller.cpf'.
0.018 [ ERROR ][refreshProperties] Could not find Property double Kp in source.
0.018 [ ERROR ][DeploymentComponent::configureComponents] Failed to configure properties for component Controller
</code>
But in fact Kp is in source file "Controller.hpp" and that file said "the Kp property should have been read from an xml file "controller.cpf"".
What's that meanning? Should I load Kp in "controller.cpf", but how?
Best,
Liu
How to configure property value in XML configure file?
Submitted by guoliang liu on Mon, 2009-02-09 10:05 |
How to configure property value in XML configure file?
On Monday 09 February 2009 11:00:30 guoliang liu wrote:
> Hi,
> In the rtt-exercise-1.6.1/controller-1-solution, when I deploy it with
> controller.cpf, it shows me
>
>
> But in fact Kp is in source file "Controller.hpp" and that file said "the
> Kp property should have been read from an xml file "controller.cpf"".
>
> What's that meanning? Should I load Kp in "controller.cpf", but how?
I've prepared a new rtt-exercises release v1.6.2. You can find it on the
webpage or here:
http://people.mech.kuleuven.be/~orocos/pub/stable/examples/rtt/tutorial/
Peter
How to configure property value in XML configure file?
On Monday 09 February 2009 11:00:30 guoliang liu wrote:
> Hi,
> In the rtt-exercise-1.6.1/controller-1-solution, when I deploy it with
> controller.cpf, it shows me
>
>
> But in fact Kp is in source file "Controller.hpp" and that file said "the
> Kp property should have been read from an xml file "controller.cpf"".
>
> What's that meanning? Should I load Kp in "controller.cpf", but how?
It's an error in the exercise. Don't use controller.cpf: that file only loads a
component, it does not configure its properties. Create a file Controller.cpf
with the Kp property:
And list that file in application.cpf.
Peter
How to configure property value in XML configure file?
Hi,
Thanks a lot for replying. It works but I have another problem:
<code>
0.061 [ Info ][ParserScriptingAccess::loadStateMachine] Parsing file statemachine.osd
0.064 [ Info ][ParserScriptingAccess::loadStateMachine] Building int Constant 'TIMER_ID' with value 1
0.068 [ ERROR ][ParserScriptingAccess::loadStateMachine] statemachine.osd :Parse error at line 50: Syntactic error: From TaskContext 'ModeSwitch': Task 'ModeSwitch' has no task or object 'ModeSwitch'.
</code>
In the file "statemachine.osd",the line 50 is
"transition ModeSwitch.switchMode(new_mode)
if (new_mode == "manual") select Manual;
"
I can not see anything is wrong here...
Can you give me some hint on it?
Best,
Liu
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Hi,
> In the rtt-exercise-1.6.1/controller-1-solution, when I deploy it with
> controller.cpf, it shows me
> <code>
> 0.017 [ Info ][PropertyLoader:configure] Configuring TaskContext
> 'Controller' with './deployment/controller.cpf'.
> 0.018 [ ERROR ][refreshProperties] Could not find Property double Kp in
> source.
> 0.018 [ ERROR ][DeploymentComponent::configureComponents] Failed to
> configure properties for component Controller
> </code>
>
> But in fact Kp is in source file "Controller.hpp" and that file said "the
> Kp property should have been read from an xml file "controller.cpf"".
>
> What's that meanning? Should I load Kp in "controller.cpf", but how?
It's an error in the exercise. Don't use controller.cpf: that file only loads a
component, it does not configure its properties. Create a file Controller.cpf
with the Kp property:
And list that file in application.cpf.
Peter
<font color="#888888">--
Peter Soetens -- FMTC -- <http://www.fmtc.be>
<font><blockquote>
How to configure property value in XML configure file?
On Monday 09 February 2009 12:00:57 guoliang liu wrote:
> Hi,
> Thanks a lot for replying. It works but I have another problem:
>
>
> In the file "statemachine.osd",the line 50 is
> "transition ModeSwitch.switchMode(new_mode)
> if (new_mode == "manual") select Manual;
> "
>
> I can not see anything is wrong here...
> Can you give me some hint on it?
The tutorial seems to be in pretty bad shape. The Error is that you're already
in the ModeSwitch component, so you need to omit the 'ModeSwitch.' before
switchMode. There were other errors in there as well.
I tested and uploaded a new version, 1.6.3. I moved statemachine.osd to the
deployment/ subdirectory, fixed the application.cpf file and the compilation
errors you warned about.
Thanks for testing,
Peter
How to configure property value in XML configure file?
Thanks a lot ..In the end I finish this exercise...
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Hi,
> Thanks a lot for replying. It works but I have another problem:
> <code>
> 0.061 [ Info ][ParserScriptingAccess::loadStateMachine] Parsing file
> statemachine.osd
> 0.064 [ Info ][ParserScriptingAccess::loadStateMachine] Building int
> Constant 'TIMER_ID' with value 1
> 0.068 [ ERROR ][ParserScriptingAccess::loadStateMachine] statemachine.osd
>
> :Parse error at line 50: Syntactic error: From TaskContext 'ModeSwitch':
>
> Task 'ModeSwitch' has no task or object 'ModeSwitch'.
>
> </code>
>
> In the file "statemachine.osd",the line 50 is
> "transition ModeSwitch.switchMode(new_mode)
> if (new_mode == "manual") select Manual;
> "
>
> I can not see anything is wrong here...
> Can you give me some hint on it?
The tutorial seems to be in pretty bad shape. The Error is that you're already
in the ModeSwitch component, so you need to omit the 'ModeSwitch.' before
switchMode. There were other errors in there as well.
I tested and uploaded a new version, 1.6.3. I moved statemachine.osd to the
deployment/ subdirectory, fixed the application.cpf file and the compilation
errors you warned about.
Thanks for testing,
--
Peter Soetens -- FMTC -- <http://www.fmtc.be>
<blockquote>