MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / RobotArmDampingPolicy

Class RobotArmDampingPolicy

sandbox/simulation_utils.py:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54class 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
67def setPhysicsProperties(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected