Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/joy_conv/joy_conv/joy_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
from numpy import float32
from utilities.tools import Tools

# Speed multiplier to drive faster
speed_multiplier = 1.5

# XBOX Axis
XBOX_LEFT_TRIGGER = 5
XBOX_RIGHT_TRIGGER = 4
Expand Down Expand Up @@ -69,7 +72,7 @@ def in_deadband(self):

def calculate_speed(self, joy_msg:Joy) -> Twist:
msg = Twist()
msg.linear.x = joy_msg.axes[XBOX_RIGHT_Y] * abs(joy_msg.axes[XBOX_RIGHT_Y])
msg.linear.x = joy_msg.axes[XBOX_RIGHT_Y] * abs(joy_msg.axes[XBOX_RIGHT_Y]) * speed_multiplier
return msg

def calculate_plow(self, joy_msg:Joy) -> Twist:
Expand Down