mirror of
https://github.com/bjoernellens1/rmp220_teleop.git
synced 2024-11-21 23:43:47 +00:00
update
This commit is contained in:
parent
6a6ba2953a
commit
9d7df31961
@ -18,11 +18,11 @@ class TeleopTwistJoy(Node):
|
|||||||
|
|
||||||
def joy_callback(self, joy_msg):
|
def joy_callback(self, joy_msg):
|
||||||
if joy_msg.buttons[4]: #lb
|
if joy_msg.buttons[4]: #lb
|
||||||
self.limit -= 0.5
|
self.limit -= 0.1
|
||||||
if self.limit < 0.2:
|
if self.limit < 0.2:
|
||||||
self.limit = 0.2
|
self.limit = 0.2
|
||||||
if joy_msg.buttons[5]: #rb
|
if joy_msg.buttons[5]: #rb
|
||||||
self.limit += 0.5
|
self.limit += 0.1
|
||||||
if self.limit > 3:
|
if self.limit > 3:
|
||||||
self.limit = 3
|
self.limit = 3
|
||||||
self.twist.linear.x = self.limit * joy_msg.axes[1]
|
self.twist.linear.x = self.limit * joy_msg.axes[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user