From 191c9d613d26cf79674cf5ce2c2199afeb065c6a Mon Sep 17 00:00:00 2001 From: David Date: Sat, 11 Apr 2026 19:12:49 -0500 Subject: [PATCH] fix(headless): correctly scale cmd_vel values --- src/headless_pkg/src/headless_node.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/headless_pkg/src/headless_node.py b/src/headless_pkg/src/headless_node.py index 309f896..e0e5d43 100755 --- a/src/headless_pkg/src/headless_node.py +++ b/src/headless_pkg/src/headless_node.py @@ -366,10 +366,14 @@ class Headless(Node): ) # Exponent for finer control (curve) # This kinda looks dumb being seperate from the following block, but this - # maintains the separation between modifying the control message and sending it + # maintains the separation between modifying the control message and sending it. if self.use_cmd_vel: - twist.linear.x *= 1.5 - twist.angular.z *= 0.5 + # These scaling factors convert raw stick inputs to absolute m/s and rad/s + # values that DiffDriveController will convert to motor RPM, rather than + # the plain Twist, which just sends the stick values as duty cycle and + # sends that scaled to the motors. + twist.linear.x *= 1.0 + twist.angular.z *= 1.5 # Publish if self.use_cmd_vel: