klampt.plan.contactcspace module

class klampt.plan.contactcspace.MultiContactCSpace(robot, contacts, stabilityTestObjects=None, collider=None)[source]

Bases: klampt.plan.cspaceutils.CompositeCSpace

A cspace with contacts that impose closed-chain constraints between a robot and zero or more objects. NOT IMPLEMENTED YET

Collisions are not checked between the world and fixed robot links, or contacting links that are initially already colliding with the world.

gravity

the gravity vector (default [0,0,-9.8])

contactMap

a dictionary mapping (obj1,obj2) pairs to lists of contacts. Same structures that results from contactMap.

Type:dict
holds

a list of Holds associated with the contacts.

Type:list of Hold
robotCSpace

a ClosedLoopRobotCSpace for the robot

Type:ClosedLoopRobotCSpace
objectCSpaces

a list of RigidObjectCSpace’s for each moving object

Type:list of RigidObjectCSpace
movingObjects

a list of moving robots and rigid objects.

Type:list
stabilityTestObjects

a list of moving robots and rigid objects that will be stability tested

Type:list
supportPolygon

a list of supportPolygon planes (result from contact.supportPolygon).

Type:list
supportPolygonVerts

a list of support polygon vertices.

Type:list

Initializes the ContactCSpace. The members contactMap, and objectives are constructed from the contacts argument.

Parameters:
  • robot (RobotModel) – the moving robot
  • contacts – a list of Holds, or ContactPoint objects with the object1 and/or object2 elements filled out.
  • stabilityTestObjects (list, optional) – if provided, specifies which objects are stability tested (either type RobotModel or RigidObjectModel). Otherwise, all objects and free-floating robots in contact are stability tested.
class klampt.plan.contactcspace.StanceCSpace(robot, holds, collider=None, world=None, checkTorqueLimits=False)[source]

Bases: klampt.plan.robotcspace.ClosedLoopRobotCSpace

A cspace with contacts that impose closed-chain constraints between a robot and zero or more objects.

Collisions are not checked between the world and fixed robot links, or contacting links that are initially already colliding with the world.

robot, collider, solver, tol, maxIters

inherited from ClosedLoopRobotCSpace

gravity

the gravity vector (default [0,0,-9.8] – currently cannot accept anything else)

holds

a list of Holds associated with the contacts.

Type:list of Holds
supportPolygon

the support polygon planes resulting from contact.supportPolygon(holds)

Type:list
testSupportPolygon(q)[source]
class klampt.plan.contactcspace.TransitionCSpace(space1, space2)[source]

Bases: klampt.plan.robotcspace.ClosedLoopRobotCSpace

A configuration space for a transition between stances.