diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 51860f7f..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 9b1087d0..8ce47ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -145,4 +145,6 @@ misc/*.h5 misc/logs/* *.ipynb_checkpoints misc/depth_nvidia_model_logs -credential.json \ No newline at end of file +credential.json + +.DS_Store \ No newline at end of file diff --git a/ROAR_iOS/agent_config.json b/ROAR_iOS/agent_config.json deleted file mode 100644 index 7a54ab39..00000000 --- a/ROAR_iOS/agent_config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "max_speed": 5, - "waypoint_file_path": "ROAR_iOS/data/RFS_Track.txt" -} \ No newline at end of file diff --git a/ROAR_iOS/exchange_ip_qr_code_server.py b/ROAR_iOS/exchange_ip_qr_code_server.py deleted file mode 100644 index 435b719c..00000000 --- a/ROAR_iOS/exchange_ip_qr_code_server.py +++ /dev/null @@ -1,29 +0,0 @@ -import time -import socket -import qrcode, numpy -import cv2 -import sys -import os -from pathlib import Path -curr_path = Path(os.getcwd()) -sys.path.append(curr_path.parent.as_posix()) -from ROAR.utilities_module.utilities import get_ip - - -HOST = get_ip() -PORT = 8006 -cv2.imshow("qr code", numpy.array(qrcode.make(f"{get_ip()}").convert('RGB'))) -cv2.waitKey(1) -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - -s.bind((HOST, PORT)) -s.listen() -conn, addr = s.accept() -cv2.destroyWindow("qr code") -conn.close() -s.close() -with open("./data/iphone_ip.txt", 'w') as f: - f.write(addr[0] + "\n") -print(f"Iphone IP = ", addr[0]) - diff --git a/ROAR_iOS/ios_config.json b/ROAR_iOS/ios_config.json deleted file mode 100644 index cfb52899..00000000 --- a/ROAR_iOS/ios_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ios_ip_addr": "192.168.1.2", - "ios_port": 8005, - "pygame_display_width": 2560, - "pygame_display_height": 1080, - "max_throttle": 0.3, - "max_steering": 0.8, - "ar_mode": true -} \ No newline at end of file diff --git a/ROAR_iOS/transform_streamer.py b/ROAR_iOS/transform_streamer.py deleted file mode 100644 index 6b536f0b..00000000 --- a/ROAR_iOS/transform_streamer.py +++ /dev/null @@ -1,49 +0,0 @@ -import logging -from ROAR.utilities_module.module import Module -from ROAR.utilities_module.data_structures_models import Transform -from typing import Optional, List -from pathlib import Path -from websocket import create_connection - - -class TransformStreamer(Module): - def save(self, **kwargs): - self.file.write(self.transform.record()) - - def __init__(self, host: str, port: int, name: str = "transform", - threaded: bool = True, - should_record: bool = True, file_path: Path = Path("./data/transforms.txt")): - super().__init__(threaded=threaded, name=name) - self.logger = logging.getLogger(f"{self.name} server [{host}:{port}]") - self.host = host - self.port = port - self.transform: Transform = Transform() - self.ws = None - self.should_record = should_record - self.file_path: Path = file_path - self.file = open(self.file_path.as_posix(), "a") - self.transform_history: List[str] = [] - self.logger.info(f"{name} initialized") - - def receive(self): - try: - self.ws = create_connection(f"ws://{self.host}:{self.port}/{self.name}", timeout=0.1) - result: bytes = self.ws.recv() - try: - self.transform = Transform.fromBytes(result) - if self.should_record: - self.transform_history.append(self.transform) - except Exception as e: - pass - # self.logger.error(f"Failed to parse data {e}. {result}") - - except Exception as e: - pass - # self.logger.error(f"Failed to get data: {e}") - - def run_in_series(self, **kwargs): - self.receive() - - def shutdown(self): - super(TransformStreamer, self).shutdown() - self.file.close()