Add <damper> actuator shortcut and related mjGAIN_AFFINE.
**Rationale** A general `mjGAIN_AFFINE` actuator adds the term `force = (c + kp * length + kv * velocity) * ctrl`. The damper shortcut restricts it to `kv * velocity * ctrl` and sets the `ctrllimited` attribute to true. **API** ```xml <actuator> <damper ctrlrange="0 1" kv="1"/> </actuator> ``` * Required attributes: `ctrlrange` (>=0) * Optional attributes: `kv` (>=0) PiperOrigin-RevId: 455366866 Change-Id: I88773abbeccabb6442f215c9fc05e205df63f692
This commit is contained in:
committed by
Copybara-Service
parent
e0b6ba4a13
commit
307cf692e5
@@ -227,6 +227,7 @@ public enum mjtDyn : int{
|
||||
}
|
||||
public enum mjtGain : int{
|
||||
mjGAIN_FIXED = 0,
|
||||
mjGAIN_AFFINE = 1,
|
||||
mjGAIN_MUSCLE = 1,
|
||||
mjGAIN_USER = 2,
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ public class MjGeneralActuatorTests {
|
||||
}
|
||||
|
||||
[TestCase(MujocoLib.mjtGain.mjGAIN_FIXED, "fixed")]
|
||||
[TestCase(MujocoLib.mjtGain.mjGAIN_AFFINE, "affine")]
|
||||
[TestCase(MujocoLib.mjtGain.mjGAIN_MUSCLE, "muscle")]
|
||||
[TestCase(MujocoLib.mjtGain.mjGAIN_USER, "user")]
|
||||
public void GainTypeMjcf(MujocoLib.mjtGain value, string expected) {
|
||||
|
||||
Reference in New Issue
Block a user