mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-22 16:14:37 +08:00
Fix for issue where using sensorless mode with input mode VEL_RAMP would cause the motor to try and reach a very high speed at the end of the sensorless ramp
This commit is contained in:
@@ -555,7 +555,7 @@ void Axis::run_state_machine_loop() {
|
||||
if (status) {
|
||||
// call to controller.reset() that happend when arming means that vel_setpoint
|
||||
// is zeroed. So we make the setpoint the spinup target for smooth transition.
|
||||
controller_.vel_setpoint_ = config_.sensorless_ramp.vel;
|
||||
controller_.vel_setpoint_ = config_.sensorless_ramp.vel / (2.0f * M_PI * motor_.config_.pole_pairs);
|
||||
status = run_sensorless_control_loop();
|
||||
}
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user