Re: Orocos program

"Andrea Consonni" <[email protected]>
Newsgroups gmane.science.robotics.orocos.user
Message-ID <[email protected]>
>On Monday 03 May 2004 12:09, Andrea Consonni wrote:
>> 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?
>
>This is a good question again :-). There were some unclear semantics about
the 
>command dataobject in the past. The problem is that discrete commands like
>'moveto', 'wait' etc are not suited for data objects. These should be 
>commands from the programscript (or HMI) and not passed through a dataobject.
>
>DataObjects are only for data flow, for example if the generator must 
>interpolate between points given in the command DataObject, which were

>calculated in a higher level control loop. In this way, the 
>CartesianComponent's examples violate this 'protocol' since it gives a

>trajectory command through the dataobject and not through a method call.
>
>Another conclusion is that the Command Dataobject is only usefull for 
>cascaded control kernels.

OK, now it's clear.

>>
>> 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:
>
>We were working on such a component too for moveTo(frame, time)
>(CartesianNSGenerator).
>
>>
>> program {
>>    var double par = XX
>>    do MyComponent.MoveTo(par)
>> }
>
>Is this double the setpoint ?

No, this is the joint position which we want to reach. 

>>
>> 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?
>
>What we do is :
>
>program  {
>	var frame endpos = frame( vector(x,y,z), rotation(x,y,z) )
>	var double time = 10.0;
>	do CartesianGenerator.moveTo( endpos, time )
>}
>
>Where the moveTo method of the generator prepares a new trajectory and
the
>generator starts interpolating from the current position to the endpos
and
>writes the result in the setpoints dataobject.
>
>>
>> 2) We want to pass to the method "MoveTo" more than one parameter, but,
>> if we export this, we have some compile errors. Why?
>
>We support up to three parameters. It is possible that in 0.12, there was
>still a bug in the parser framework which did not allow this. The next

>release guarantees 1,2 and 3 parameters to work. If you are familiar with
>the subversion tree, you can just check out the execution directory again.
If
>you use the packages, I have added a package (labeled 0.13.99) which contains
>the upgraded parser on 
><http://people.mech.kuleuven.ac.be/~psoetens/orocos-packages/execution-0.13.99.epk>

Why only do you support up to three parameters? We are interested in (for
now) controlling in joint space, so we would want to pass six parameters
(six joint positions).

Regards,
        Andrea & Stefano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.