Orocos program
"Andrea Consonni" <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
we have some questions about the command dataobject and orocos program.
We are trying to understand how to give a command in an orocos program.
We have had a look at your example "program-state" and, if we have understood
right, you want that we create a real trajectory in the oro_main, write
it in the command dataobject and, in the orocos program "program.ops", load
the trajectory through the command "do CartesianGenerator.loadTrajectory()".
Our question is: if we want to write in the command dataobject from an
orocos program, how can we do?
As test, we have written an our component "MyComponent" which has a method
"MoveTo" which writes an double parameter in the command dataobject. Besides,
we have exported this method to the Orocos Parser. In our orocos program
we have written:
program {
var double par = XX
do MyComponent.MoveTo(par)
}
and everything is all right.
However, we have two problems:
1) We have to pass to the component "MyComponent" a kernel* parameter so
we can give the instruction "kernel->getCommand()->Set(command)", but we
think this is not good. How can we do in other way?
2) We want to pass to the method "MoveTo" more than one parameter, but,
if we export this, we have some compile errors. Why?
With kindest regards,
Andrea & Stefano