From 05531a92a1fd93f360ffa02a804fb9d303a2fdad Mon Sep 17 00:00:00 2001 From: "m.fritsche" Date: Thu, 27 Jun 2024 09:48:51 +0200 Subject: [PATCH] fix for joystick --- go2_robot_sdk/go2_robot_sdk/go2_driver_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py b/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py index 836774b..2287eac 100644 --- a/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py +++ b/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py @@ -148,7 +148,7 @@ def cmd_vel_cb(self, msg, robot_num): y = msg.linear.y z = msg.linear.z - if x > 0.0 or y > 0.0 or z != 0.0: + if abs(x) > 0.1 or abs(y) > 0.1 or abs(z) > 0.1: self.robot_cmd_vel[robot_num] = gen_mov_command(round(x, 2), round(y, 2), round(z, 2)) def joy_cb(self, msg):