pbio/drivebase: update defaults for counts
Now that the drivebase state is measured in motor counts instead of motor degrees, we need to adjust the settings by a factor 2 as well.
Eventually, these values should be adopted from the servos that make up the drivebase.
#if PBDRV_CONFIG_NUM_MOTOR_CONTROLLER != 0
static pbio_control_settings_t settings_drivebase_heading_default = {
- .max_rate = 1000,
- .abs_acceleration = 2000,
- .rate_tolerance = 8,
- .count_tolerance = 8,
- .stall_rate_limit = 8,
+ .max_rate = 2000,
+ .abs_acceleration = 4000,
+ .rate_tolerance = 16,
+ .count_tolerance = 16,
+ .stall_rate_limit = 16,
.stall_time = 200,
- .pid_kp = 400,
- .pid_ki = 1500,
- .pid_kd = 5,
- .integral_range = 50,
- .integral_rate = 6,
+ .pid_kp = 200,
+ .pid_ki = 750,
+ .pid_kd = 2,
+ .integral_range = 100,
+ .integral_rate = 12,
.max_control = 20000,
};
static pbio_control_settings_t settings_drivebase_distance_default = {
- .max_rate = 1000,
- .abs_acceleration = 2000,
- .rate_tolerance = 8,
- .count_tolerance = 8,
- .stall_rate_limit = 8,
+ .max_rate = 2000,
+ .abs_acceleration = 4000,
+ .rate_tolerance = 16,
+ .count_tolerance = 16,
+ .stall_rate_limit = 16,
.stall_time = 200,
- .pid_kp = 400,
- .pid_ki = 1500,
- .pid_kd = 5,
- .integral_range = 50,
- .integral_rate = 6,
+ .pid_kp = 200,
+ .pid_ki = 750,
+ .pid_kd = 2,
+ .integral_range = 100,
+ .integral_rate = 12,
.max_control = 20000,
};
