From d149aedf4fea8f0f719372b78b394ea8533805f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Tue, 18 Apr 2023 14:05:06 +0200 Subject: [PATCH] update: trying to solve bug with limit attribute --- rmp220_teleop/rmp220_teleop.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rmp220_teleop/rmp220_teleop.py b/rmp220_teleop/rmp220_teleop.py index 50f36f4..1908569 100644 --- a/rmp220_teleop/rmp220_teleop.py +++ b/rmp220_teleop/rmp220_teleop.py @@ -14,7 +14,6 @@ class TeleopTwistJoy(Node): self.timer = self.create_timer(0.01, self.timer_callback) self.twist = Twist() self.enable = False - self.limit = 0.5 def joy_callback(self, joy_msg): # if joy_msg.buttons[4]: #lb @@ -25,8 +24,8 @@ class TeleopTwistJoy(Node): # self.limit += 0.5 # if self.limit > 3: # self.limit = 3 - self.twist.linear.x = self.limit * joy_msg.axes[1] - self.twist.angular.z = self.limit * joy_msg.axes[0] + self.twist.linear.x = 0.5 * joy_msg.axes[1] + self.twist.angular.z = 1 * joy_msg.axes[0] if joy_msg.buttons[7]: #start self.enable = True enable_chassis(self)