Motor simulator#
A single DC-motor joint: simulated dynamics, a noisy encoder and a privileged PD expert.
Classes
One position-controlled motor joint (simulated). |
Functions
Saturated PD command toward |
- class OneMotor(gain=8.0, damping=2.0, coulomb=0.3, dt=0.05, encoder_noise=0.005, velocity_filter=0.4, randomise=True)[source]#
Bases:
objectOne position-controlled motor joint (simulated).
dtheta = omega,domega = gain*u - damping*omega - coulomb*tanh(omega/0.02)with the commanduclipped to [-1, 1]. The joint position is normalised to the workspace [-1, 1]. The encoder reads the position with Gaussian noise; the velocity estimate is a filtered finite difference of the noisy readings, as on a real drive.randomisedraws the gain and damping per episode (domain randomisation), so a policy cannot memorise one plant.- Parameters: