Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/feature/joystick_in…
Browse files Browse the repository at this point in the history
…terface_in_ros2' into feature/joystick_interface_in_ros2
  • Loading branch information
Aldokan committed Feb 7, 2024
2 parents f2aab5f + 895598d commit 1c3a029
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions mission/joystick_interface_auv/scripts/joystick_interface_auv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def __init__(self):
)

self.last_button_press_time_ = 0
self.debounce_duration_ = 0.25
self.state_ = States.NO_GO
self.debounce_duration_ = 0.25
self.state_ = States.NO_GO

self.joystick_buttons_map_ = [
"A",
Expand Down Expand Up @@ -170,11 +170,10 @@ def joystick_cb(self, msg: Joy) -> Wrench:
left_shoulder = buttons["LB"]
right_shoulder = buttons["RB"]

surge = axes[
"vertical_axis_left_stick"] * self.joystick_surge_scaling_
sway = axes[
"horizontal_axis_left_stick"] * self.joystick_sway_scaling_
heave = -(left_trigger - right_trigger)/2 * self.joystick_heave_scaling_
surge = axes["vertical_axis_left_stick"] * self.joystick_surge_scaling_
sway = axes["horizontal_axis_left_stick"] * self.joystick_sway_scaling_
heave = -(left_trigger -
right_trigger) / 2 * self.joystick_heave_scaling_
roll = (right_shoulder - left_shoulder) * self.joystick_roll_scaling_
pitch = -axes[
"vertical_axis_right_stick"] * self.joystick_pitch_scaling_
Expand Down

0 comments on commit 1c3a029

Please sign in to comment.