ref:dof_measure

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


ref:dof_measure [2023/12/14 16:03] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== DofMeasure ======
 +[[measure|Measure]] that adds a penalty for a specific degree-of-freedom (DoF). 
 +
 +Penalties can be based on ''position'', ''velocity'', ''acceleration'', ''limit_torque'' and ''actuator_torque''. Example: <code># Measure for upper body
 +DofMeasure {
 +    dof = pelvis_tilt
 +    position { min = -45 max = 0 abs_penalty = 10 } # Penalize leaning backwards
 +    velocity { min = -10 max = 10 abs_penalty = 10 } # Penalize upper body motion
 +}
 +# Measure for knee limits
 +CompositeMeasure {
 +    name = DofLimits
 +    symmetric = true
 +    DofMeasure {
 +        dof = knee_angle
 +        threshold = 2
 +        threshold_transition = 2
 +        weight = 0.1
 +        limit_torque { min = 0 max = 0 abs_penalty = 1 }
 +    }
 +}
 +</code>
 +
 +**Inherits from** [[measure|Measure]].
 +
 +==== Public Attributes ====
 +^ Parameter ^ Type ^ Description ^
 +^ dof | Dof & | Dof to which to apply the penalty to. |
 +^ parent | Dof * | Optional parent dof which will be added to the dof value. |
 +^ in_degrees | bool | Set if rotations are in degrees or radians; default = 1. |
 +^ position | [[range_penalty|RangePenalty]]< Real > | Penalty for when the DOF position [deg or m] is out of range. |
 +^ velocity | [[range_penalty|RangePenalty]]< Real > | Penalty for when the DOF velocity [deg/s or m/s] is out of range. |
 +^ acceleration | [[range_penalty|RangePenalty]]< Real > | Penalty for when the DOF acceleration [deg/s%%^%%2 or m/s%%^%%2] is out of range. |
 +^ limit_torque | [[range_penalty|RangePenalty]]< Real > | Penalty for when the DOF limit torque [Nm] is out of range (this value is signed!). |
 +^ actuator_torque | [[range_penalty|RangePenalty]]< Real > | Penalty for the DOF actuator torque (this value is signed!). |
 +^ name | String | Name of the [[measure|Measure]], to be used in reporting; defaults to measure type. |
 +^ weight | Real | Weighting factor applied to the result of the measure; default = 1. |
 +^ threshold | Real | Threshold above / below which the measure becomes zero; default = 0. |
 +^ threshold_transition | Real | Transition range above ''threshold'' between which the measure linearly decreases to zero; default = 0. |
 +^ result_offset | Real | Offset added to measure result; default = 0. |
 +^ minimize | bool | Indicate whether this measure should be minimized; default value depends on the measure type (usually true). |
 +^ start_time | TimeInSeconds | Time [s] at which [[controller|Controller]] becomes active; default = 0. |
 +^ stop_time | TimeInSeconds | Time [s] at which [[controller|Controller]] becomes inactive; default = until simulation ends. |
 +^ signature_prefix | String | Prefix signature with custom string. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |
 +^ signature_postfix | String | Append custom string to signature. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |
 +^ signature | String | Set custom signature and omit the auto-generated signature. |
 +
 +<sub>Converted from doxygen using [[https://github.com/tgeijten/dokugen|dokugen]]</sub>