From ac7ec697a428ce4377f2b6d396b3ded0769fe755 Mon Sep 17 00:00:00 2001 From: Ishaan Datta Date: Fri, 8 Nov 2024 19:03:24 -0800 Subject: [PATCH] spelling mistake --- tools/utils/serial_test.py | 5 +---- .../python_workspace/python_workspace/extermination_node.py | 5 ++--- .../src/python_workspace/python_workspace/zed_camera_node.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/utils/serial_test.py b/tools/utils/serial_test.py index 561a669..5a3f59a 100644 --- a/tools/utils/serial_test.py +++ b/tools/utils/serial_test.py @@ -8,8 +8,7 @@ def display_ports(): for port in ports: print(port.device) -# /dev/ttyUSB0 for linux? - +# /dev/ttyACM0 for vertical port def connect(port): ser = serial.Serial(port, 115200, timeout=1) # Adjust USB port as needed while True: @@ -22,7 +21,5 @@ def connect(port): parser = argparse.ArgumentParser(description='Serial port communication') parser.add_argument('--port', type=str, required=True, help='Serial port to connect to') args = parser.parse_args() - display_ports() - connect(args.port) \ No newline at end of file diff --git a/workspace_python/ros2_ws/src/python_workspace/python_workspace/extermination_node.py b/workspace_python/ros2_ws/src/python_workspace/python_workspace/extermination_node.py index 7740891..125cb5b 100644 --- a/workspace_python/ros2_ws/src/python_workspace/python_workspace/extermination_node.py +++ b/workspace_python/ros2_ws/src/python_workspace/python_workspace/extermination_node.py @@ -1,6 +1,6 @@ import time, os import cv2 -import serial # pip3 install pyserial +import serial # import pycuda.driver as cuda # from tracker import * # depth point cloud here... @@ -55,7 +55,7 @@ def __init__(self): self.model = ModelInference() self.bridge = CvBridge() # Open serial port to Arduino - self.ser = serial.Serial('/dev/ttyUSB0', 115200, timeout=1) # Adjust USB port as needed + self.ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) self.subscription = self.create_subscription(InferenceOutput, 'inference_out', self.inference_callback, 10) # Create a timer that calls the listener_callback every second @@ -87,7 +87,6 @@ def timer_callback(self): self.ser.write(serialized_msg.encode()) self.get_logger().info(f'Sent to Arduino: {self.boxes_present}') - def main(args=None): rclpy.init(args=args) extermination_node = ExterminationNode() diff --git a/workspace_python/ros2_ws/src/python_workspace/python_workspace/zed_camera_node.py b/workspace_python/ros2_ws/src/python_workspace/python_workspace/zed_camera_node.py index 3c5f70a..9614309 100644 --- a/workspace_python/ros2_ws/src/python_workspace/python_workspace/zed_camera_node.py +++ b/workspace_python/ros2_ws/src/python_workspace/python_workspace/zed_camera_node.py @@ -27,7 +27,7 @@ def __init__(self): self.declare_parameter('camera_side', 'left') # left, right self.declare_parameter('shift_constant', 1) self.declare_parameter('roi_dimensions', [0, 0, 100, 100]) - self.declare_paramter('precision', 'fp32') + self.declare_parameter('precision', 'fp32') self.frame_rate = self.get_parameter('frame_rate').get_parameter_value().integer_value self.dimensions = tuple(self.get_parameter('model_dimensions').get_parameter_value().integer_array_value)