This project focuses on building an obstacle-avoidance robot using Arduino UNO, Ultrasonic Sensor, and rosserial_python for ROS integration. The robot is designed to navigate autonomously in its environment while avoiding obstacles.
- Arduino UNO
- HC-SR04 Ultrasonic Sensor
- SG90 Micro Servo Motor
- L289N Motor Driver
- 12V DC Motors
- Li-ion Cells
- Breadboard
-
Install the necessary libraries for Arduino:
- Servo.h
- ros.h
- std_msgs/Int8.h
-
Connect the hardware components as per the provided circuit diagram.
-
Upload the provided Arduino code to the Arduino UNO board.
-
Install rosserial_python for ROS integration.
-
Power on the Arduino-powered robot.
-
Ensure that the ROS environment is set up and running.
-
Run the rosserial_python node to establish communication between Arduino and ROS.
-
Monitor the published data using
rostopic echo chatter
to observe the distance readings. -
Test the robot in an environment with obstacles to observe its obstacle-avoidance behavior.