klampt.plan.cspaceutils module

class klampt.plan.cspaceutils.CompositeCSpace(spaces)[source]

Bases: klampt.plan.cspace.CSpace

A cartesian product of multiple spaces, given as a list upon construction. The feasible method can be overloaded to include interaction tests.

feasible(x)[source]
join(xs)[source]
sample()[source]
split(x)[source]
subDims()[source]
class klampt.plan.cspaceutils.EmbeddedCSpace(ambientspace, subset, xinit=None)[source]

Bases: klampt.plan.cspace.CSpace

A subspace of an ambient space, with the active DOFs given by a list of DOF indices of that ambient space.

ambientspace

the ambient configuration space

Type:CSpace
mapping

the list of active indices into the ambient configuration space

Type:list
xinit

the initial configuration in the ambient space (by default, 0 vector)

Type:list, optional
feasible(x)[source]
lift(xemb)[source]

Embedded space -> ambient space

liftPath(path)[source]

Given a CSpace path path, lifts this to the full ambient space configuration

project(xamb)[source]

Ambient space -> embedded space

sample()[source]
klampt.plan.cspaceutils.default_distance(a, b)[source]
klampt.plan.cspaceutils.default_interpolate(a, b, u)[source]
klampt.plan.cspaceutils.default_sampleneighborhood(c, r)[source]
klampt.plan.cspaceutils.default_visible(a, b)[source]
klampt.plan.cspaceutils.makedefault(space)[source]

Helper: makes a space’s callbacks perform the default Cartesian space operations.