From 72871119faf829d97a031e775239637fee9666eb Mon Sep 17 00:00:00 2001 From: Jade <108688020+LeRatDuFA@users.noreply.github.com> Date: Sun, 1 Oct 2023 17:25:25 +0200 Subject: [PATCH] Some cleaning --- .../joystick_interface/scripts/joystick_interface.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/mission/joystick_interface/scripts/joystick_interface.py b/mission/joystick_interface/scripts/joystick_interface.py index eea5c3d2..4fe09057 100755 --- a/mission/joystick_interface/scripts/joystick_interface.py +++ b/mission/joystick_interface/scripts/joystick_interface.py @@ -4,8 +4,6 @@ from geometry_msgs.msg import Wrench from sensor_msgs.msg import Joy #git remote set-url origin git@github.com:vortexntnu/vortex-asv.git -import yaml - class JoystickInterface(Node): @@ -51,12 +49,12 @@ def __init__(self): self.declare_parameter('sway', 100.0) self.declare_parameter('yaw', 100.0) - self.joystick_surge_scaling = self.get_parameter( - 'surge' - ).value #is it getting the parameters from the YAML file ? No --> TO DO + self.joystick_surge_scaling = self.get_parameter('surge').value self.joystick_sway_scaling = self.get_parameter('sway').value self.joystick_yaw_scaling = self.get_parameter('yaw').value + + def create_2d_wrench_message(self, x, y, yaw): wrench_msg = Wrench() wrench_msg.force.x = x @@ -88,7 +86,6 @@ def joystick_cb(self, msg): self.publish_wrench_message(wrench_msg) - #a = msg.buttons #to remove return wrench_msg @@ -107,6 +104,3 @@ def main(): if __name__ == "__main__": main() -#we want to move yaml into joystick_interface foulder -#create launch file for joystick interface -#modify pc launch file by taking out