Conversation
| @@ -0,0 +1,27 @@ | |||
| 23:37:48: [INFO] [/Users/sahij/Desktop/autonomy/autonomy-bootcamp-2025-p2/modules/command/command_worker.py | command_worker | 46] Logger initialized | |||
There was a problem hiding this comment.
your average velocity should be here
| 23:45:27: [INFO] [/Users/sahij/Desktop/autonomy/autonomy-bootcamp-2025-p2/modules/common/modules/logger/logger_main_setup.py | setup_main_logger | 62] main logger initialized | ||
| 23:45:27: [INFO] [/Users/sahij/Desktop/autonomy/autonomy-bootcamp-2025-p2/tests/integration/test_telemetry.py | main | 108] Connected! | ||
| 23:45:27: [INFO] [/Users/sahij/Desktop/autonomy/autonomy-bootcamp-2025-p2/tests/integration/test_telemetry.py | read_queue | 65] Worker status: { | ||
| time_since_boot: 333, |
There was a problem hiding this comment.
something is up with your time_since_boot
| return | ||
|
|
||
| # Main loop: do work. | ||
| while not controller.is_exit_requested(): |
There was a problem hiding this comment.
it's good practice to include controller.check_pause() as this checks if the workers are requested to pause (it blocks/sleeps the worker until unpause). the same applies to all other workers
| position = self.connection.recv_match( | ||
| type="LOCAL_POSITION_NED", blocking=True, timeout=self.timeout | ||
| ) | ||
| time_taken = self.timeout - (time.time() - start_time) | ||
| if time_taken <= 0: | ||
| self.local_logger.error("Timeout before ATTITUDE reached") | ||
| return None | ||
|
|
||
| attitude = self.connection.recv_match(type="ATTITUDE", blocking=True, timeout=time_taken) | ||
| if position is None or attitude is None: | ||
| self.local_logger.error("Did not receieve both messages") | ||
| return None | ||
|
|
There was a problem hiding this comment.
the order of checking for position and attitude maye be causing your issue
| controller: worker_controller.WorkerController, | ||
| telemetry_queue: queue_proxy_wrapper.QueueProxyWrapper, |
There was a problem hiding this comment.
syntax comment - usually we place input/output queues before the controller to match how we use it in bootcamp_main.py with WorkerProperties
| try: | ||
| command_string = command_queue.queue.get(timeout=0.1) | ||
| main_logger.info(f"Command: {command_string}") | ||
| except queue.Empty: | ||
| pass |
There was a problem hiding this comment.
this can go in the same try and except block
| main_logger.info("Started") | ||
|
|
||
| # Main's work: read from all queues that output to main, and log any commands that we make | ||
| # Continue running for 100 seconds or until the drone disconnects |
There was a problem hiding this comment.
need to check for drone disconnecting
|
reviewed! |
No description provided.