klampt.model.config module¶
A uniform interface for getting/setting configurations of arbitrary objects. A configuration is a flattened list of floats describing the physical pose of an object.
Supported objects include world entities, mathematical objects, and IK goals. You can also set a configuration of a set of objects, or a world, in which case the configuration is the concatenation of the configurations of each object.
Supported objects include:
WorldModel
RobotModel
RigidObjectModel
point
rotation
rigid transform
coordinates module objects
IKObjective
lists containing multiple objects (including nested lists)
Notably, used in the klampt.vis.visualization.setItemConfig()
,
klampt.vis.visualization.getItemConfig()
, and
klampt.vis.visualization.animate()
methods. Also used in Cartesian
interpolation in the cartesian_trajectory
module.
Module summary¶
API¶
|
Returns a flattened version of the configuration of the given item. |
|
Sets the configuration of the given item to the given vector. |
|
Returns a list giving string names for each configuration dimension of given item. |
|
Returns the number of free parameters in the flattened version of the configuration of the given item. |
|
Returns a distance metric for the given configurations a and b of the given item. |
|
Returns a distance metric for the given configurations a and b of the given item. |
Helpers¶
|
|
|
For compound items returns a list of all component sub-items. |
|
For compound items returns a list of names of all component sub-items. |
-
klampt.model.config.
componentNames
(item)[source]¶ For compound items returns a list of names of all component sub-items. For non-compound items, returns a singular name.
-
klampt.model.config.
components
(item)[source]¶ For compound items returns a list of all component sub-items. For non-compound items, returns a singular item.
-
klampt.model.config.
distance
(item, a, b)[source]¶ Returns a distance metric for the given configurations a and b of the given item. If possible this is a geodesic distance.
-
klampt.model.config.
getConfig
(item)[source]¶ Returns a flattened version of the configuration of the given item. Nearly all Klamp’t objects are recognized, including RobotModel’s, RigidObjectModel’s, WorldModel’s, IKObjectives, and all variable types in the coordinates module.
TODO: ContactPoint
-
klampt.model.config.
getConfigNames
(item)[source]¶ Returns a list giving string names for each configuration dimension of given item. Nearly all Klamp’t objects are recognized, including RobotModel’s, RigidObjectModel’s, WorldModel’s, IKObjectives, and all variable types in the coordinates module.
TODO: ContactPoint
-
klampt.model.config.
interpolate
(item, a, b, u)[source]¶ Returns a distance metric for the given configurations a and b of the given item. If possible this is a geodesic distance.
-
klampt.model.config.
numConfigParams
(item)[source]¶ Returns the number of free parameters in the flattened version of the configuration of the given item. Nearly all Klamp’t objects are recognized, including RobotModel’s, RigidObjectModel’s, WorldModel’s, IKObjectives, and all variable types in the coordinates module.