From 605dcb09bb084ac54880979f560a15c2bc681f25 Mon Sep 17 00:00:00 2001 From: becker Date: Mon, 22 Jan 2024 12:27:36 +0100 Subject: [PATCH] update system call now integrated in the port finder --- serial/marker_x_serial.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serial/marker_x_serial.py b/serial/marker_x_serial.py index 4f587d0..2420093 100644 --- a/serial/marker_x_serial.py +++ b/serial/marker_x_serial.py @@ -11,6 +11,7 @@ import sys import serial import numpy as np from cv_bridge import CvBridge, CvBridgeError +import subprocess def init(): arucoDict = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_ARUCO_ORIGINAL) @@ -27,6 +28,7 @@ def init(): def init_serial(): for com in range(0,4): + subprocess.run(["fuser", "/dev/ttyACM"+str(com), "-k"]) try: PORT = '/dev/ttyACM' + str(com) BAUD = 9600