KDL typekit
The use of KDL types in the TaskBrowser
Compiling
You need to check out the rtt_geometry stack which contains the kdl_typekit package here:http://github.com/orocos-toolchain/rtt_geometryand build&install it using the provided Makefile (uses defaults) or CMakeLists.txt (if you want to modify paths).
Importing
Import the kdl_typekit in Orocos by using the 'import' Deployment command in the TaskBrowser or the 'Import' Deployment property in your deployment xml file:
import("kdl_typekit")
Creation of variables of a KDL type
- Make sure you've loaded the KDL typekit, by checking all available types in the TaskBrowser:
.types
- In the list you should find eg. KDL.Frame, so you can create a variable z of this type by:
var KDL.Frame z
- z has a standard value now (Identity frame), there are multiple ways to change it:
- value by value:
z.p.X=1
orz.M.X_x=2
- the full position vector
z.p = KDL.Vector(1,2,3)
- the full rotation matrix
z.M=KDL.Rotation(0,1.57,0)
(roll, pitch, yaw angles???)
- You can check the current value by just typing it's variable name, for this example, z.
z
- Look in the KDL typekit for more details
»
- Printer-friendly version
- Login or register to post comments