| 52 | |
| 53 | |
| 54 | class RobotArmDampingPolicy(Policy): |
| 55 | def __init__(self, model: pin.Model, damping_factor: float): |
| 56 | self.actuation = np.eye(model.nv) |
| 57 | self.damping_factor = damping_factor |
| 58 | |
| 59 | def act( |
| 60 | self, simulator: simple.Simulator, q: np.ndarray, v: np.ndarray, dt |
| 61 | ) -> np.ndarray: |
| 62 | # Note: simulator and model should coincide |
| 63 | tau_act = -self.damping_factor * v |
| 64 | return self.actuation @ tau_act |
| 65 | |
| 66 | |
| 67 | def setPhysicsProperties( |
nothing calls this directly
no outgoing calls
no test coverage detected