diff --git a/mission/joystick_interface/scripts/joystick_interface.py b/mission/joystick_interface/scripts/joystick_interface.py index 74f5adfc..76ab8ff2 100755 --- a/mission/joystick_interface/scripts/joystick_interface.py +++ b/mission/joystick_interface/scripts/joystick_interface.py @@ -10,7 +10,7 @@ class JoystickInterface(Node): def __init__(self): rclpy.init() - + super().__init__('joystick_interface_node') #Mapping copy pasted from the original file self.joystick_buttons_map = [ "A", @@ -37,11 +37,12 @@ def __init__(self): "dpad_vertical", ] - super().__init__('joystick_interface_node') + #self.wrench_publisher = self.create_publisher(Wrench, 'wrench_topic', 1) + + #self.node = rclpy.create_node('joystick_interface') self.subscriber = self.create_subscription(Joy, 'joy', self.joystick_cb, 1) - - #self.wrench_publisher = self.create_publisher(Wrench, 'wrench_topic', 1) + rclpy.shutdown() def create_2d_wrench_message(self, x, y, yaw): wrench_msg = Wrench() @@ -62,13 +63,11 @@ def joystick_cb(self, msg): a = msg.buttons return a - def main(args=None): - #rclpy.init(args=args) + rclpy.init(args=args) print("hello from main") joystick_interface = JoystickInterface().subscriber rclpy.spin(joystick_interface) joystick_interface.destroy_node() - rclpy.shutdown() return