ROS2 Serial Communication with Arduino
I've got a project in which I'm using a Raspberry Pi 4B running ROS2 Dashing with an Arduino Due. I want to have the two boards communicate over a serial connection and I've been looking for solutions, of which I've found a couple: microROS and OSRF's ros2_serial_example repository.
On the ROS side, I want serial communication to happen on a Python node. I've been running into issues setting up microROS and its not clear from the docs if ros2_serial_example can be used by a Python node. What I'm looking for ultimately are recommendations for a simple way to access the Pi's serial port from within a ROS Python node. If I could use something like PySerial within the node, that would be excellent. Alternatively, if someone could help me understand how to use microROS with a python node, that would also be excellent.
Thanks for any and all help.
Update:
So I tried just importing/using pyserial after a pip install and it seems to work fine. I feel though that there should be a better way of handling serial communications, so I'm still open to ideas/suggestions.