This repository is a comprehensive solution for the teleoperation of a Zumo Shield bot integrated with Arduino and three ultrasonic sensors. The project harnesses the capabilities of the Robot Operating System (ROS2 Foxy) for data communication, processing, and visualization, along with a web-based GUI for real-time bot control and sensor data monitoring.
Key Components:
- Arduino Code (arduino.ino): An Arduino sketch that interfaces with the ultrasonic sensors (left, right, and center) attached to the Zumo Shield bot. It reads the sensor data and transmits it via serial communication.
- Bridge Node: A ROS node that reads the serial data from Arduino and publishes it to a ROS String Topic named
/ulstrasonic/all, which is read by the Controller node. It also publishes/ultrasonic/left,/ultrasonic/right,/ultrasonic/centerin a ROS Range Topic. This is read by rviz to visualize the robot's obstacle range data. The choice to separate the/alldata for the controller node was done to maintain synchronous processing of all sensor data for a given time period. - Controller Node: A ROS node that interfaces with a PS4 controller (through the ROS Joy Node) and the ultrasonic sensor data published on
/ultrasonic/all. It uses this data to control the Zumo bot, sending commands back via Serial. The controller node also instructs the robot to obstruct any obstacles within a 12cm range. If it detects an obstacle within range, it will disregard user input and pivot left or right, depending on sensor data on available space. The user may choose to override this pivot by turning back, which precedes all obstacle avoidance measures. The controller node also only processes the most recent input on the gamepad, and inputs don't get pooled. This is done to avoid input delay caused by pausing user inputs during obstacle avoidance measures. - Transform Nodes and URDF: Includes three transformation nodes and a
robot_description.urdffile to assist with data visualization in Rviz in the form of Range data. - Frontend Folder (Web-based GUI): A web application built using ROSLib that communicates with the Bridge node. The GUI allows for Zumo robot control via graphical arrow keys, speed adjustment, and live display of sensor readings in a bar graph format.
The project provides a holistic teleoperation system from the physical robot with sensor integration, data processing in ROS, visualization in Rviz, to intuitive web-based user control interface.