Made changes reflecting PR comments.

Added torque_ramp_rate to controller config.
Changed INPUT_MODE_CURRENT_RAMP to INPUT_MODE_TORQUE_RAMP for controller input mode enum.
Torque limits and current limits are now observed seperately. Torque limit is in the controller, current limit is in the motor object.
Fixed torque -> current calculation in motor_update to handle ACIM motors.
This commit is contained in:
pjohnson
2020-06-17 13:15:36 -04:00
parent d78119e29f
commit ceabd24582
9 changed files with 35 additions and 32 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ public:
float vel_limit = 20000.0f; // [counts/s] Infinity to disable.
float vel_limit_tolerance = 1.2f; // ratio to vel_lim. Infinity to disable.
float vel_ramp_rate = 10000.0f; // [(counts/s) / s]
float current_ramp_rate = 1.0f; // A / sec
float torque_ramp_rate = 0.1f; // Nm / sec
bool setpoints_in_cpr = false;
float inertia = 0.0f; // [A/(count/s^2)]
float input_filter_bandwidth = 2.0f; // [1/s]