Anpassung der geschwindigkeit besser

This commit is contained in:
2026-05-21 21:43:18 +02:00
parent cef14e82c6
commit aad90a5def
@@ -246,7 +246,7 @@ def callback(data):
# The velocity is decoded as value between 0...100, capped by speed limit
stick_length = min(math.sqrt(x*x + y*y), 1.0)
rover_cmd.vel = int(get_speed_limit() * math.pow(stick_length, VELOCITY_EXPO))
rover_cmd.vel = int(100.0 * math.pow(get_speed_limit() / 100.0 * stick_length, VELOCITY_EXPO))
# The steering is described as an angle between -180...180
# Which describe the joystick position as follows: