Add support for actuators to Mujoco USD interop.
PiperOrigin-RevId: 764740692 Change-Id: Ib045653fee840087bc3891ee7e770bdaac08548c
This commit is contained in:
committed by
Copybara-Service
parent
6b919162d1
commit
b2e8589e7a
@@ -247,3 +247,90 @@ class "MeshCollisionAPI" (
|
||||
)
|
||||
}
|
||||
|
||||
class "PhysicsActuatorAPI" (
|
||||
doc = "API describing a Mujoco actuator."
|
||||
)
|
||||
{
|
||||
uniform int mjc:actDim = -1 (
|
||||
doc = "Dimension of the activation state. The default value of -1 instructs the compiler to set the dimension according to the dyntype. Values larger than 1 are only allowed for user-defined activation dynamics, as native types require dimensions of only 0 or 1. For activation dimensions bigger than 1, the last element is used to generate force."
|
||||
)
|
||||
uniform bool mjc:actEarly = 0 (
|
||||
doc = "If true, force computation will use the next value of the activation variable rather than the current one. Setting this flag reduces the delay between the control and accelerations by one time-step."
|
||||
)
|
||||
uniform token mjc:actLimited = "auto" (
|
||||
allowedTokens = ["false", "true", "auto"]
|
||||
doc = "If true, the internal state (activation) associated with this actuator is automatically clamped to actrange at runtime. If false, activation clamping is disabled. If 'auto' and autolimits is set in compiler, activation clamping will automatically be set to true if actrange is defined without explicitly setting this attribute to 'true'. See the Activation clamping section for more details."
|
||||
)
|
||||
uniform double mjc:actRange:max = 0 (
|
||||
doc = "Maximum range for clamping the activation state. The first value must be no greater than the second value. See the Activation clamping section for more details. Setting this attribute without specifying actlimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double mjc:actRange:min = 0 (
|
||||
doc = "Minimum range for clamping the activation state. The first value must be no greater than the second value. See the Activation clamping section for more details. Setting this attribute without specifying actlimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double[] mjc:biasPrm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] (
|
||||
doc = "Bias parameters. The affine bias type uses three parameters. The length of this array is not enforced by the parser, so the user can enter as many parameters as needed. These defaults are not compatible with muscle actuators."
|
||||
)
|
||||
uniform token mjc:biasType = "none" (
|
||||
allowedTokens = ["none", "affine", "muscle", "user"]
|
||||
doc = "The gain and bias together determine the output of the force generation mechanism, which is currently assumed to be affine."
|
||||
)
|
||||
uniform double mjc:crankLength = 0 (
|
||||
doc = "Used only for the slider-crank transmission type. Specifies the length of the connecting rod. The compiler expects this value to be positive when a slider-crank transmission is present."
|
||||
)
|
||||
rel mjc:crankSite (
|
||||
doc = "If specified, the actuator acts on a slider-crank mechanism which is implicitly determined by the actuator (i.e., it is not a separate model element). The target site corresponds to the pin joining the crank and the connecting rod."
|
||||
)
|
||||
uniform token mjc:ctrlLimited = "auto" (
|
||||
allowedTokens = ["false", "true", "auto"]
|
||||
doc = "If true, the control input to this actuator is automatically clamped to ctrlrange at runtime. If false, control input clamping is disabled. If 'auto' and autolimits is set in compiler, control clamping will automatically be set to true if ctrlrange is defined without explicitly setting this attribute to 'true'. Note that control input clamping can also be globally disabled with the clampctrl attribute of option/flag."
|
||||
)
|
||||
uniform double mjc:ctrlRange:max = 0 (
|
||||
doc = "Maximum range for clamping the control input. The first value must be smaller than the second value. Setting this attribute without specifying ctrllimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double mjc:ctrlRange:min = 0 (
|
||||
doc = "Minimum range for clamping the control input. The first value must be smaller than the second value. Setting this attribute without specifying ctrllimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double[] mjc:dynPrm = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0] (
|
||||
doc = "Activation dynamics parameters. The built-in activation types (except for muscle) use only the first parameter, but we provide additional parameters in case user callbacks implement a more elaborate model. The length of this array is not enforced by the parser, so the user can enter as many parameters as needed. These defaults are not compatible with muscle actuators."
|
||||
)
|
||||
uniform token mjc:dynType = "none" (
|
||||
allowedTokens = ["none", "integrator", "filter", "filterexact", "muscle", "user"]
|
||||
doc = "Activation dynamics type for the actuator. The available dynamics types were already described in the Actuation model section."
|
||||
)
|
||||
uniform token mjc:forceLimited = "auto" (
|
||||
allowedTokens = ["false", "true", "auto"]
|
||||
doc = "If true, the force output of this actuator is automatically clamped to forcerange at runtime. If false, force clamping is disabled. If 'auto' and autolimits is set in compiler, force clamping will automatically be set to true if forcerange is defined without explicitly setting this attribute to 'true'."
|
||||
)
|
||||
uniform double mjc:forceRange:max = 0 (
|
||||
doc = "Maximum range for clamping the force output. The first value must be no greater than the second value. Setting this attribute without specifying forcelimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double mjc:forceRange:min = 0 (
|
||||
doc = "Minimum range for clamping the force output. The first value must be no greater than the second value. Setting this attribute without specifying forcelimited is an error if autolimits is 'false' in compiler."
|
||||
)
|
||||
uniform double[] mjc:gainPrm = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0] (
|
||||
doc = "Gain parameters. The built-in gain types (except for muscle) use only the first parameter, but we provide additional parameters in case user callbacks implement a more elaborate model. The length of this array is not enforced by the parser, so the user can enter as many parameters as needed. These defaults are not compatible with muscle actuators."
|
||||
)
|
||||
uniform token mjc:gainType = "fixed" (
|
||||
allowedTokens = ["fixed", "affine", "muscle", "user"]
|
||||
doc = "The gain and bias together determine the output of the force generation mechanism, which is currently assumed to be affine."
|
||||
)
|
||||
uniform double[] mjc:gear = [1, 0, 0, 0, 0, 0] (
|
||||
doc = "This attribute scales the length (and consequently moment arms, velocity and force) of the actuator, for all transmission types. It is different from the gain in the force generation mechanism, because the gain only scales the force output and does not affect the length, moment arms and velocity. For actuators with scalar transmission, only the first element of this vector is used. The remaining elements are needed for joint, jointinparent and site transmissions where this attribute is used to specify 3D force and torque axes."
|
||||
)
|
||||
uniform bool mjc:jointInParent = 0 (
|
||||
doc = "If true and applied to ball and free joints, the 3d rotation axis given by gear is defined in the parent frame (which is the world frame for free joints) rather than the child frame."
|
||||
)
|
||||
uniform double mjc:lengthRange:max = 0 (
|
||||
doc = "Maximum range of feasible lengths of the actuator’s transmission."
|
||||
)
|
||||
uniform double mjc:lengthRange:min = 0 (
|
||||
doc = "Minimum range of feasible lengths of the actuator’s transmission."
|
||||
)
|
||||
rel mjc:refSite (
|
||||
doc = "When applied to a site, measure the translation and rotation w.r.t the frame of the refsite. In this case the actuator does have length and position actuators can be used to directly control an end effector, see refsite.xml example model. As above, the length is the dot product of the gear vector and the frame difference. So gear='0 1 0 0 0 0' means 'Y-offset of site in the refsite frame', while gear='0 0 0 0 0 1' means rotation 'Z- rotation of site in the refsite frame'. It is recommended to use a normalized gear vector with nonzeros in only the first 3 or the last 3 elements of gear, so the actuator length will be in either length units or radians, respectively. As with ball joints (see joint above), for rotations which exceed a total angle of pi will wrap around, so tighter limits are recommended."
|
||||
)
|
||||
rel mjc:sliderSite (
|
||||
doc = "Used only for the slider-crank transmission type. The target site is the pin joining the slider and the connecting rod. The slider moves along the z-axis of the slidersite frame. Therefore the site should be oriented as needed when it is defined in the kinematic tree; its orientation cannot be changed in the actuator definition."
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user