From 6d74605582406ecc508085078e40873b99077013 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Tue, 13 Jun 2023 22:02:30 +0200 Subject: [PATCH] clean up apilistener --- .../api_communication/api_listener.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/api_communication/api_communication/api_listener.py b/src/api_communication/api_communication/api_listener.py index 8747affb..8b90df49 100644 --- a/src/api_communication/api_communication/api_listener.py +++ b/src/api_communication/api_communication/api_listener.py @@ -17,21 +17,8 @@ import threading import json from enum import Enum from functools import partial -import base64 -import cv2 from functools import partial -# communication: client always sends commands that have a command id. -# server always sends messages back that have a message type - -# TODO send video https://github.com/Jatin1o1/Python-Javascript-Websocket-Video-Streaming-/tree/main - -RES_4K_H = 3496 -RES_4K_W = 4656 - -# TODO change video to be handled by camera controller through websocket with different port - - class RequestCommand(Enum): """ Enum for the commands that can be sent to the API @@ -51,7 +38,6 @@ class ResponseMessage(Enum): MOVE_DIRECTION_RESULT = 2 FAILSAFE = 3 - class ApiListener(Node): """ Node that listens to the client and sends the commands to the drone @@ -451,7 +437,6 @@ class ApiListener(Node): self.get_logger().error(str(e)) self.websocket = None - def main(args=None): """Main function""" rclpy.init(args=args) @@ -464,6 +449,5 @@ def main(args=None): api_listener.destroy_node() rclpy.shutdown() - if __name__ == '__main__': main()