Robotics Module: Design Proposal ENGR 102 – Winter 2013 Engineering Design Lab II Group Members: Sida Liu Ryan Koshy Nicholas Maffei Design Constraints To create the robot, an NXT kit was was used to create a basic body. Additional tools that were allowed were additional lego pieces, hot glue, tape, rubber bands, copper wire, paper, cardboard, foam core, ping pong balls, and straws. However, extra Lego sensors or motors were not allowed. Also, the robot must fit in a box with the dimensions 1’x1’x1.5’ before the competition begins. Total of 3 Lego motors and 4 Lego NXT sensors including a touch sensor, a light sensor, an ultrasonic sensor, a sound sensor, a magnetic sensor, and a RGB color sensor are allowed to be equipped on the finished robot. In the competition arena, there are two types of canisters.One type of canisters are regular canisters with color blue and they are not magnetic. Regular canisters are supposed to be dropped at the corner with a light source. The other one type of the canisters are nuclear canisters with color yellow and they are magnetic. Nuclear canisters are supposed to be dropped at the corner that is at the opposite direction to the light source. The starting location of each group is randomly determined. When the competition starts, each group will gain 5 points if they drop regular canisters to the regular canister drop-off location and gain 15 points for dropping nuclear canisters to the nuclear drop-off location. If a robot drop a regular canister to the nuclear drop-off location , then the group will lose 5 points and if a robot drop a nuclear canister to the regular drop-off location, then the group will lose 15 points (Engr102, 1). When a robot is stuck, a reset can be performed with the permission from the judge and the total score of the group will be reset to 0 as well. When both robots are stuck somehow, both robots can be reset with the permission from the judge and the total scores of both groups will not be reset to 0. The total time of the competition is 5 minutes and during the competition, robots shall not be modified. Design Proposal Mechanical Design The robot was a tripod design consisting of 3 motors, a touch sensor, a magnetic sensor, an ultrasonic sensor, and a light sensor. It was approximately 1’ long and had a gripper on its back end for grabbing the waste material. Embedded in the gripper was the touch sensor to detect when the robot has caught waste, and a magnetic sensor to determine which type of waste it has. The robot primarily used ultrasonic for navigation and waste location and used the light sensor to determine the drop off point for each waste type, as seen in Figure 2. Two motors controlled the left and right wheel, while the third wheel sat in front of the robot and rotated as required. The third motor controlled the gripper. The gripper on the robot used a gearing system to wrap its ‘fingers’ around the waste container when it hit the touch sensor. The gripper was attached to the back of the robot, which turns 180°once it has located and approached a waste container. It then backed up into the container, grabbed it, identified the container using the magnetic sensor, and proceeded to the proper location by using the light sensor to determine the location of the nuclear or waste dump locations. The magnetic and touch sensors can be seen in Figure 1. Figure 1 - The back of the robot. Figure 2 - The side of the robot. Algorithm Design The algorithm of the robot contained four parts: searching arena and locating canister, differentiating canisters, navigation to drop off zones, and collision avoidance. Those four parts were organized in the following way: ● Begin ● Searching arena and locating canister ● Differentiating canisters ● Navigation to drop off zones with collision avoidance enabled ● Go back to begin until manually shut down A. Searching Arena and Locating Canister In order to search the whole arena effectively, the searching algorithm needs to be able to cover every location in the arena in a certain pattern. Since the robot only has limited detection ability in a straight line, the optimum searching pattern should only consist of moving forward in straight lines and 90 degree turning. To cover the arena as fast as possible, the robot would move forward until it gets a ultrasonic distance reading of less than 15 cm. To differentiate walls and canisters, the robot would swing in 30 degrees and get ultrasonic distance readings. If all the readings are less than 18 (15/cosd(30)), then it’s a wall, otherwise, it would be a canister. With the above assumptions, the pseudocode version of the searching algorithm is the following: Initiate wall_status=0 // wall_status=1 means there is a wall in front of the robot Initiate canister_status=0 // canister_status=1 means there is canister in front of the robot Initiate next_turn=0 // 0 means turn left, 1 means turn right Initiate canister_grab=0 While canister_grab=0 If the wall_status=1 if next_turn=0 Turn right for 90 degrees Move forward for 10 inches Turn right for 90 degrees set next_turn=1 if next_turn=1 Turn left for 90 degrees Move forward for 10 inches Turn left for 90 degrees set next_turn=0 Set wall_status=0 else if canister_status=1 Set canister_grab=1 else move forward until distance reading is less than or equal to 15 Perform a -15 degrees zero-point turn Record 10 distance readings while perform a +30 degrees zero-point turn if 9 of the 10 readings are less than 20 Set wall_status=1 else Set canister_status=1 B. Differentiating Canisters Since a magnetic sensor was mounted at the front of the robot, the magnetic sensor would be used to detect the type of the canister before grabbing it. Following was the pseudocode of this process: Initiate type_canister // 1 means nuclear waste and 0 means regular waste Move forward until the distance reading equals 8 if the reading from the magnetic sensor is positive type_canister=1 else type_canister=0 C. Navigation to Drop off Zones Since the drop off zone for the nuclear waste has a light source over it and the drop off zone for the regular waste is dark, a light sensor would be used to navigate to drop off zones. According to the result of week 3 lab, the maximum reading of the light sensor was achieved when it was pointed to the light source and the minimum reading was achieved when it was pointed to 180 degrees away from the light source. Therefore, by get panoramic light readings, the directions of the drop off zones can be determined. The robot will reach the drop off zones when the distance reading is very close. Following is the pseudocode for this process: //assuming the type_canister has been determined from part B. // and for type_canister, 1 means nuclear waste and 0 means regular waste Initiate index=0 initiate light_readings [36]=0 while index is less than 37 Set light_readings[index] as the reading from the light sensor Perform a clockwise zero-point turn for 10 degrees Set index= index+1 Wait for 10 ms if type_canister=0 Set index equals to the index of the (maximum of light_readings-18) else Set index equals to the index of the maximum of light_readings Perform a clockwise zero-point turn for index*10 degrees Move forward (with collision avoidance)until distance reading is less than or equal to 8 Perform an 180 degree zero-point turn Release the canister grabbed D. Collision Avoidance Inside the arena, there are three types of obstacles: canisters, walls and the other robot. As for walls, it should be avoided by turning to a different direction. For canisters, the robot will avoid it by going around it. At this moment, the other robot was treated as a canister. Following is the pseudocode for this process: Move forward until distance reading is less than 20 cm Perform a -15 degrees zero-point turn Record 10 distance readings while perform a +30 degrees zero-point turn if 9 of the 10 readings are less than 20 cm Perform a 180 degree zero-point turn else turn left 45 degrees move forward for 15 cm turn right 45 degrees move forward for 20 cm turn right 45 degrees move forward for 15 cm turn left 45 degrees References 1. Engr102. "Competition Procedure." Drexel University , College of Engineering (2013)
© Copyright 2024