klampt.plan.rigidobjectcspace module

class klampt.plan.rigidobjectcspace.RigidObjectCSpace(rigidObject, collider=None, translationDomain=None, rotationDomain=None)[source]

Bases: klampt.plan.cspace.CSpace

A basic free-flying rigid object cspace that allows collision free motion.

The C-space is 6D, with parameters [tx,ty,tz,mx,my,mz]. [tx,ty,tz] is the translation and [mx,my,mz] are the exponential map parameters of the rotation.

rigidObject
Type

RigidObjectModel

rotationDomain
Type

see __init__, optional

collider
Type

WorldCollider

rotationWeight

the relative weight used for measuring rotation vs translation distance

Type

float

Parameters
  • rigidObject (RigidObjectModel) – the object that should move.

  • collider (WorldCollider, optional) – a collider instance containing the world in which the object lives. Any ignored collisions will be respected in the feasibility test.

  • translationDomain (list of pairs, optional) – a bounding box in which the translation should be sampled. If None (default), the improper logarithmic prior is used to sample translations.

  • rotationDomain (pair, optional) –

    If provided, must be a (rotation0,rdomain) pair specifying a range in which the rotation should be sampled. rotation0 must be an SO3 element. rdomain may be:

    • A number: rotation is sampled with absolute angular error from rotation0 in the range [0,rdomain].

    • A triple: rotation is sampled with euler angles with roll in the range [-rdomain[0],rdomain[0]], pitch in the range [-rdomain[1],rdomain[1]], and yaw in the range [-rdomain[2],rdomain[2]]. The sampled rotation is then multiplied by rotation0.

configToTransform(x)[source]
transformToConfig(T)[source]
setConfig(x)[source]
addConstraint(checker, name=None)[source]
sample()[source]

Overload this to implement custom sampling strategies.

envCollision(x=None)[source]

Checks whether the robot at its current configuration is in collision with the environment.

interpolate(a, b, u)[source]
distance(a, b)[source]
pathToTransforms(path)[source]
pathToTrajectory(path)[source]