This commit is contained in:
Björn Ellensohn 2023-04-18 14:25:15 +02:00
parent 6a6ba2953a
commit 9d7df31961

View File

@ -18,11 +18,11 @@ class TeleopTwistJoy(Node):
def joy_callback(self, joy_msg):
if joy_msg.buttons[4]: #lb
self.limit -= 0.5
self.limit -= 0.1
if self.limit < 0.2:
self.limit = 0.2
if joy_msg.buttons[5]: #rb
self.limit += 0.5
self.limit += 0.1
if self.limit > 3:
self.limit = 3
self.twist.linear.x = self.limit * joy_msg.axes[1]