simple_pendulum.controllers.ddpg
Deep Deterministic Policy Gradient Control
Submodules
simple_pendulum.controllers.ddpg.ddpg_controller
DDPG Controller
- class simple_pendulum.controllers.ddpg.ddpg_controller.ddpg_controller(model_path, torque_limit, state_representation=3)
Bases:
AbstractController
DDPG controller class
- get_control_output(meas_pos, meas_vel, meas_tau=0, meas_time=0)
The function to compute the control input for the pendulum actuator. Supposed to be overwritten by actual controllers. The API of this method should be adapted. Unused inputs/outputs can be set to None.
- Parameters:
- meas_pos: float
The position of the pendulum [rad]
- meas_vel: float
The velocity of the pendulum [rad/s]
- meas_tau: float
The meastured torque of the pendulum [Nm]
- meas_time: float
The collapsed time [s]
- Returns:
- des_pos: float
The desired position of the pendulum [rad]
- des_vel: float
The desired velocity of the pendulum [rad/s]
- des_tau: float
The torque supposed to be applied by the actuator [Nm]
- get_observation(state)