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 c8900bb..48320b9 100644 --- a/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py +++ b/go2_robot_sdk/go2_robot_sdk/go2_driver_node.py @@ -178,12 +178,12 @@ def timer_callback_lidar(self): self.publish_lidar_webrtc() def cmd_vel_cb(self, msg, robot_num): - x = msg.linear.x y = msg.linear.y z = msg.angular.z - if x > 0.0 or y > 0.0 or z != 0.0: + # Allow omni-directional movement + if x != 0.0 or y != 0.0 or z != 0.0: self.robot_cmd_vel[robot_num] = gen_mov_command( round(x, 2), round(y, 2), round(z, 2))