Week 1: Robot

Overview

Using a SparkFun RedBot kit and a Tracked Vehicle Chassis Kit, we designed two robots that can navigate a building when a disaster occurs. Our main robot can go around obstacles, deploy a second robot that locates survivors, and guide people to safety.


Robotics and Computer Science:

Robotics is the process of designing, building, coding, and using robots. Over the past few decades, intelligent robots have made the lives human beings significantly easier. However, compared to 60 years ago, todays robots are extremely capable and complex. Using modern computers, the process of programming robots has become much easier and more efficient. Robots have also become increasingly useful as they have became more advanced, especially in disaster relief. Using various sensors, robots have helped to locate survivors and save countless lives.

More on Robotics From Our Research Paper: History of Robotics in Disaster Recovery

Design Process:

To start the design process, our group thought about the task at hand. We brainstormed about how we could design, build, and program our robots to navigate a course and find survivors using the given sensors. We realized that using bumper sensors and ultrasound sensors would allow our main robot to recognize when an object blocks its path. We also thought about our second robot and knew that an infrared thermometer would allow the robot to detect human body temperature and find survivors. With this information, we programmed our main robot to traverse a course in which obstacles, such as walls, cones, and poles, blocked its path. To test our ideas, we built a model course using RobotC in which the robot was able to successfully travel through. We built our two robots using a SparkFun RedBot kit (main robot) and a Tamiya Tracked Vehicle Chassis Kit (second robot). We started by putting together the base and wheels, then adding the motors and connecting them to a battery pack. Using an Arduino, we were able to connect everything together and add our program. However, at first, the sensors on both our RedBot and Tamiya weren't functioning properly. With further troubleshooting, we discovered that the Arduino on our RedBot was disfunctional, and replaced it. Once our RedBot worked, we tested with the Tamiya and realized our motors were using up all of the power, leaving none for the sensors. Using a motor driver, we were able to reduce the voltage being sent to the motors, giving power to our sensors. We had to rewire and rebuild parts our robots multiple times, which left us very little time to test our code in the end. If we had more time, we would have tested more with the code and sensors to get everything to work.

Redbot

To the right is an image of our robot. The sensor in the front allows the robot recognize its surroundings and go around walls, cones, and other objects.


Tamiya Bot

To the right is an image of our second robot. The infrared thermometer detects temperature to locate survivors and help them evacuate the building safely.

RedBot Code

On the left is our code for the Sparkfun RedBot. Our RedBot only uses the mechanical bumpers and motors so there is only code for those two. In the beginning, each motor and bumper is declared and its value set to an integer. The first function allows serial monitoring so we can view the values the mechanical bumper is giving. The loop following setup is setting the two motors to constantly drive forward. Following that are two if statements for if the bumper value changes to LOW when they are touched the robot either reverses, then turns left or right depending on which bumper was hit.

Video of Our RedBot:

IMG_4499.MOV

Tamiya Bot Code

This is the code we used to test if the sensors are working. We made the values print onto the console to be able to check whether the sensors were working. However, the bumper sensors took too much power, and so we had to take them off the robot. Without taking them off, the motors wouldn't be able to function, so we decided to try using just one of the sensors at each time. After checking that the sensors were working, it was too late to be able to write more code to make it work fully. If we had more time, our group would've written code that could've checked for walls using the ultrasonic and turn around when getting close, but also to find heat signatures and move towards them. The bumper sensors could always be implemented later, as the ultrasonics could also fulfill the same task.

Virtual Course Code

Our code tells the robot to immediately power the motor and continue to travel forward until it senses an object within 125 mm (12.5 cm). Then, it turns to the left and once again senses if there is another object. If there is nothing blocking its path, it continues moving forward. If there is something blocking its path, it turns 180 degrees and continues moving forward. This process continues until the robot eventually reaches the endpoint. There are bumper switches on the back on the robot, which when activated will continue moving forward to prevent it from getting stuck. There are also light sensors that detect an abundance of light, allowing the robot to stop when it has escaped the building.

Our Course

Below is an image of our course. The course is a realistic depiction of a building. Cones, poles, tubes, and walls block the path of the robot.

Video of Our Virtual Bot:

Virtual Bot.mp4
My Movie 8.mp4

ANSWERS TO DISCUSSION BOARD