multiple requests to the same device usb-rs232 motor controller cause error in ros2 foxy
hello everyone, currently I have a recurring problem with the communication of a motor controller more exactly the controller: KYDBL4875-2E which I am trying to control through the rs232 port and with a converter to usb to send serial commands in python. This controller gives me data from the encoders, batteries, etc., and also allows me to control the speed through commands. The problem is that sometimes when I'm sending speed commands and reading the encoders, calls are made to the port at the same time. , and this causes both control and odometry data to fail as the messages object or block. Do you know any solution to avoid this problem? I understand that this happens because ros subscribers or publishers access the device at the same time.
I am currently using Ros2 foxy and my code is in python3, using the pyserial library for serial communication.
thanks for you help