From ae261aff4a0286193c46c95e1c6a5384103fd15d Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 25 Jul 2024 16:03:39 +0200 Subject: [PATCH] disable brake --- src/torque_controlled_generator.jl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/torque_controlled_generator.jl b/src/torque_controlled_generator.jl index fd18404..4b14fee 100644 --- a/src/torque_controlled_generator.jl +++ b/src/torque_controlled_generator.jl @@ -62,16 +62,16 @@ end function calc_acceleration(wm::TorqueControlledMachine, speed, force; set_torque=nothing, set_speed=nothing, use_brake = false) if use_brake - if abs(set_speed) < 0.9 * wm.v_min - wm.brake = true - elseif abs(set_speed) > 1.1 * wm.v_min - wm.brake = false - end - if wm.brake - # if the brake is active the acceleration proportional to the speed - # TODO: check if this is physically correct - return wm.brake_acc * speed - end + # if abs(set_speed) < 0.9 * wm.v_min + # wm.brake = true + # elseif abs(set_speed) > 1.1 * wm.v_min + # wm.brake = false + # end + # if wm.brake + # # if the brake is active the acceleration proportional to the speed + # # TODO: check if this is physically correct + # return wm.brake_acc * speed + # end end # limit the acceleration if ! isnothing(set_speed)