When dealing with rosserial on Arduino, you are able to publish and subscribe to ROS subjects, letting sensor facts to flow through the Arduino in to the ROS ecosystem and instructions from ROS to get to the actuators controlled because of the Arduino. Applying facts out there, combined with expertise https://felixxglrw.onesmablog.com/the-best-side-of-ros-compatible-robot-66638291