I created an obstacle detector (bottle detector in my case) using the TI RSLK for the 2020 Texas Instruments Summer Project. This project ultimately presented two challenges. The first was programming the robot to recognize when it left a predefined boundary, and the other challenge was developing the obstacle searching algorithm.
I used the onboard line detector to dictate whether the robot was within the boundary. To do this, I laid out a large sheet of paper and surrounded the boundary with duct tape. Using the "simpleCalibrate" function for the TI robotics library, I initially calibrated the robot's line detectors to the white paper. If the robot crossed the duct tape, the average line detector value increased to above 100 (I used and external light for better readings and a grey boundary floor). When the robot detects that it has left the boundary, it reverses back into the boundary and turns 180 degrees. The robot then continues to search for the bottle.
For the searching algorithm, I implemented simple scanning logic. The robot would move forward about 20 cm and take distance readings in the front, to the right, and to the left (in that order). If the robot detected an object within 70 cm at any of these readings, it moved 20 cm in the direction of the object. In turn, the robot repeated the process until the bottle was detected. The conditions for bottle detection are a bumper button being pressed or an object detected within 20 cm.
Comments