From 394ba305db108d18ff4ab138e71e234c8dbc8739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Tue, 9 May 2023 11:15:45 +0200 Subject: [PATCH] try reducing velocities by 1/10 --- rmp220_teleop/rmp220_teleop.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rmp220_teleop/rmp220_teleop.py b/rmp220_teleop/rmp220_teleop.py index e2e30f2..4279aa1 100644 --- a/rmp220_teleop/rmp220_teleop.py +++ b/rmp220_teleop/rmp220_teleop.py @@ -14,20 +14,20 @@ class TeleopTwistJoy(Node): self.timer = self.create_timer(0.1, self.timer_callback) self.twist = Twist() self.enable = False - self.limit = 0.5 - self.max_vel = 2 + self.limit = 1 * 0.1 + self.max_vel = 2 * 0.1 def joy_callback(self, joy_msg): if joy_msg.buttons[4]: #lb - self.limit -= 0.1 - if self.limit < 0.2: - self.limit = 0.2 + self.limit -= 0.1 * 0.1 + if self.limit < 0.2 * 0.1: + self.limit = 0.2 *0.1 if joy_msg.buttons[5]: #rb - self.limit += 0.1 + self.limit += 0.1 * 0.1 if self.limit > self.max_vel: self.limit = self.max_vel self.twist.linear.x = self.limit * joy_msg.axes[1] - self.twist.angular.z = -self.limit *2 * joy_msg.axes[0] + self.twist.angular.z = -self.limit *2 * joy_msg.axes[0] * 10 # if joy_msg.buttons[7]: #start # self.enable = True # enable_chassis(self)