Re: Orocos program
Peter Soetens <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.user |
|---|---|
| Organization | KU Leuven |
| Message-ID | <[email protected]> |
On Friday 14 May 2004 09:54, Andrea Consonni wrote:
> >BTW you probably want to specify 7 parameters to add a time or velocity
> >
> >argument. If you could provide more details about what your program script
> >
> >should do, I'll be happy to see how it fits in Orocos.
>
> We would want to specify 6 joint positions and 6 velocity or time
> arguments. We have tried to extending the Orocos parser to support Double6D
> type, but
>
> we have compile errors.
> How could we do this?
It's not easy if you're not familiar with the template technique... :-]
It is very shortly introduced in the program parser manual how you have to add
a custom type (like vector,frame) in the parser. Once the type is known, you
can do any operation (like +,*,..) which is defined in the added type. I agree
that for a first tryout, two Double6Ds could be used. However, if you want to
introduce a constructor like :
var Double6D d6 = Double6D(0.,1.,2.,3.,4.,5.)
you need a 'sixfold' operator ( a function object with 6 parameters ) to do
the inline construction. The vector constructor uses a TernaryOperator (See
Operators.hpp and Operators.cxx). A '[]' operator might be handy too, bounds
checking can be done during the program parsing.
Once these are in place, the Operators.cxx file must be adapted to contain all
Double6D operations. When the ExpressionParser is extended with this type, it
can be used by the whole parser.
This aproach only scales limited. For each Double'N'D, we need to start all
over again (there are 6[+/-] axis machines). The parser was not meant to
tackle a wide range of function parameters. Of course, an alternative (which
scales better) must be provided if we reach the limits of the parser.
Specifying a 3D Trajectory* to the generator is also impossible using the
parser, but instructing the generator to loadFile("trajectory.trj"), is much
more suited.
Another option is introducing an 'array' type which maps to a vector<double>
in the implementation. We would still need the [] operator though.
What do you think ?
Peter
>
> With kind regards,
> Andrea & Stefano
>
> PS: About the release 0.14.2, it's all right :-)
Ah finally ! thanks :-)
>
> _______________________________________________
> Orocos mailing list
> [email protected]
> http://mail.mech.kuleuven.ac.be/mailman/listinfo/orocos
--
------------------------------------------------------------------------
Peter Soetens, Research Assistent http://www.orocos.org
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322773
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B [email protected]
B-3001 Leuven Belgium http://www.mech.kuleuven.ac.be/pma
------------------------------------------------------------------------