Parameters: |
|
---|
An Config instance represents a configuration variable in the generalized coordinates, \(q\), of a mechanical system. Configuration variables primarily parameterize rigid-body transformations between coordinate frames in the system, though sometimes special configuration variables are used only by constraints.
Configuration variables are created automatically by Frame and Constraint when needed, so you do not need to create them directly unless defining a new constraint type.
If a name is provided, it can be used to identify and retrieve configuration variables.
The current values and their derivatives of a configuration variable can be accessed directly (q, dq, ddq) for an individual variable, or through System to access all configuration variables at once (System.q, System.dq, System.ddq)
Warning
Currently trep does not enforce unique names for configuration variables. It is recommended to provide a unique name for every Config so they can be unambiguously retrieved by System.get_config().
A configuration variable can be dynamic or kinematic. Dynamic configuration variables, \(q_d\), are traditional configuration variables. Their trajectory is determined by the system dynamics \((\ddot{q_d} = f(q(t), \dot{q}(t), u(t)))\). Dynamic configuration variables must parameterize a rigid-body transformation, and there must be a coordinate frame with non-zero mass that depends on the dynamic variable (directly or indirectly).
Kinematic configuration variables, \(q_k\), are considered perfectly controllable. Their second derivative is specified directly as an additional input to the system \((\ddot{q_k} = u_k(t))\). Kinematic configuration variables can parameterize any rigid body transformation in a system, regardless of whether or not a frame with non-zero mass depends directly or indirectly on the variable. Additionally, kinematic configuration variables that do not parameterize a transformation can be defined by constraint functions. For example, the Distance constraint uses a kinematic configuration variable to maintain a time-varying distance between two coordinate frames.
The current value of the configuration variable.
The 1st time derivative (velocity) of the configuration variable (i.e, \(\dot{q}\)).
The 2nd time derivative (acceleration) of the configuration variable (i.e, \(\ddot{q}\)).
Boolean indicating if this configuration variable is dynamic or kinematic.
(read only)
The Frame that depends on this configuration variable for its transformation, or None if it is not used by a coordinate frame (e.g, a kinematic configuration variable in a constraint).
(read only)
The name of this configuration variable or None.
Index of the configuration variable in System.configs.
For dynamic configuration variables, this is also the index of the variable in System.dyn_configs.
(read only)
For kinematic configuration variables, this is the index of this variable in System.kin_configs.
(read-only)
A tuple of all coordinate frames with non-zero masses that depend (directly or indirectly) on this configuration variable.
(read-only)