Skip to content
/ pyKDL Public

SWIG Python bindings to KDL, making use of numpy arrays.

License

Notifications You must be signed in to change notification settings

arocchi/pyKDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyKDL

SWIG Python bindings to KDL, making use of numpy arrays.

Features

An extensive list of features implemented at this time are explained in the following code.

import numpy
from pyKDL import Frame, Vector, Rotation

f = Frame()
f0 = Frame(R,v)
print f

v = Vector()
v0 = Vector()
print v

R = Rotation()
R0 = Rotation()
print R

v1 = v + v0
v2 = v - v1
v3 = v1 * v2
v4 = Vector()
v4.assign(v)

v4 = R * v
R1 = R * R0
R2 = Rotation()
R2.assign(R)

f1 = Frame()
f1.assign(f0)
v5 = f * v
f2 = f * f0
f_p = f.p()     # reference to position vector in Frame
f_o = f.M()
print f
f_p.assign(Vector(1,2,3))
print f         # frame changed

R_numpy = R.ndarray()
R3 = Rotation(*R_numpy)

v_numpy = v.ndarray()
v5 = Vector(*v_numpy)

v.x()           # get 0th element of v
v.x(1.0)        # set 0th element of v

R[0,0]          # equivalent to R(0,0) in c++
R[0,0] = 1.0    # equivalent to R(0,0) = 1.0 in c++

About

SWIG Python bindings to KDL, making use of numpy arrays.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •