Wednesday, May 30, 2012

Week Nine Update

photo 5
With Thursday nearing, the group is prepared to complete all portions of the competition as well as be profitable.  The group has managed to address problems resulting from the use of dead reckoning in order to more accurately track the vehicle's position.  Previously, after every length of travel the robot will be slightly beyond or behind it's target corner.  This is problematic because the next length of travel will have to correct the difference by snaking along the line.  As it turns out, the snaking path is much longer than the direct path which causes the robot to fall short of its destination.

This problem was solved by finding the best average distance the robot needs to travel.  This approach will allow the robot to arrive at its destination with higher accuracy.  Another approach taken to solve this problem was to find a way to re-calibrate the robot to the exact center of a corner.  This solution was applied to the paths that travel along the diagonals.  The diagonals, being the longest length the robot would have to travel, provided the greatest risk of falling off the line.  The code re-calibrates when both light sensors detect the line.  In normal line tracking, it is impossible for both light sensors to detect the line at the same time so the robot assumes it is at an intersection and resets the robot's center on top of the intersection.  This solution has proven quite effective since the robot has fallen off only twice during a cumulative thirty minutes of testing.

During the real competition the robot will have to pick up passengers from card stands placed at each station.  The color sensor was re-positioned to account for this.  To test for these new elements on the field, the group built stands from cardboard and colored cards from construction paper.  One issue with the stands was that the ultrasonic sensor, designed to detect other robots, was detecting the stands.  This issue was solved by decreasing the already expanded range of the robot to the required six inch range.

Thursday, May 24, 2012

Week Eight Update

The group has managed to complete all goals set out at the starting of the project. They have managed to stay ahead of schedule, which will allow time for any fine-tuning to be taken care of. A color sensor has finally been added to the top of the robot.  The color sensor detects what passengers are loading and unloading. As of now the group has accomplished the following milestones: practice field construction, line tracking, passenger counting, robot construction, travel algorithm, and is currently working on integration.

Issues with integration result from the robot navigating the arena through dead reckoning which is based on the number of rotations the left wheel completes. After a certain number of rotations are completed the robot will turn at its current location. This is an issue because line tracking is relative to sides of the line and not the length of the line. 

As the group transitions from the practice field to the real field a number of problems have arisen.  Such problems arise from the fact that the practice field is not the same size as the real field. In face the sides of the practice field are 17 inches shorter than the real field.This proves to be an issue due to the preset rotations the robot must complete. However this issue was resolved during the week 8 lab. As the robot nears completion the group has started drafting a final report of the project. The following video is a demonstration of how the robot performs as of late:

Thursday, May 17, 2012

Week Seven Update

This week the group managed to put together the final code.  The final code integrates the travel algorithm, line tracking, passenger counter, and other elements described in the previous posts.  Such additions were made to the complete code such as the position counter.

This was added by creating a variable that corresponds to a particular location on the field.  This variable is then reassigned after each maneuver to keep track of the robot's position.  The value of the position variable is also key to the travel algorithm as it limits the robot's next course of action.  For the purposes of this program, a maneuver is defined as travelling from one station to an adjacent station.  This means that even though the robot's final destination may not be adjacent that the robot will be performing several smaller trips between two adjacent stations.  The travel algorithm compensates for this and creates the shortest possible trip to the final destination.  

As a whole, the travel algorithm works perfectly as designed.  However, the problem arises from accuracy when travelling between points.  This problem will be addressed in future versions as the project transfers from the practice field to the actual field.  The robot, with the exception of the color sensor, hasn't changed in regards to construction.  However, in the coming weeks efforts are being taken to remove parts that are not critical to function of the robot to decrease costs.  Removing unimportant parts is just part of a shift from making a working robot to a more efficient robot.  

 

A new addition to the code removes passengers from the robot if they are picked up from the station that is also the passenger's destination.  This means that if a red passenger is picked up at the red station that the robot will display that the robot picked up the passenger and then delivered them.  This eliminates the problem of having the robot travel in useless circles thus maximizing the amount of passengers that can be delivered within the four minute time limit.  

In the coming weeks the group aims to complete the rest of the remaining code and continue making the robot ready for competition through small additions to the code.  The group also aims to complete a rough draft and presentation by the end of week nine in preparation of the deliverables due in week ten.

Thursday, May 10, 2012

Week Six Update

The Group has successfully remained on-schedule this week. The Travel Algorithm has been completed. In the previous post, it was mentioned a light sensor was replaced with a color sensor, upon further review it was decided to remain with the original design and make alterations in later weeks.

The Passenger Counter coding is still being developed, the vehicle is now able to recognize its limit of passengers (maximum capacity being 3 passengers), an essential step forward in programming. A detailed explanation of the planned Passenger Counter coding is described below in the two figures.

Passenger Counter (Part A) Screen Shot
Figure 1: Passenger Counter Part A
Passenger Counter (Part B) Screen Shot
Figure 2: Passenger Counter Part B


In Figure 1, the code will first determine what station the vehicle is currently located and distribute the passengers to their respective stations until the vehicle is empty. Once the vehicle is empty, the code will execute the second loop (Figure 2). This loop will add passengers according to color until the vehicle is full. The loop will end when the vehicle is full.

Passenger Counter is nearly completed but it has yet to be integrated into the robot design. This will require the team to add a color sensor that will be orientated forward to face the LED light. In addition, the different components of coding must be integrated.
Travel Algorithm
Figure 3: Travel Algorithm
 The Travel Algorithm above describes the order in which the robot will disperse passengers and move about stations. The Algorithm will establish the robot's current position, unload/load passengers, then initiate a travel maneuver to its next destination. The Algorithm accounts for a constant flow of passengers as the robot's destination will be dependent on the passengers' it currently holds.

The Travel Algorithm functions in tandem with the Line Tracking code. The Line Tracking code is much simpler than the code detailed above. Line Tracking functions by the intake of light values given by the light sensors. There are two light sensors on the robot which receive readings indicating the presence of the white portion of the field; meaning the black center line is between the light sensors. Should the light sensors read the value indicating that the robot is on the black center line, the robot will decrease motor speed on the side detecting the line in order to re-align the robot. The Line Tracking will continuously loop this code as the robot navigates the field.

Up until recent weeks, Line Tracking, Passenger Counter, and the Travel Algorithm have been developed independently of each other. In the coming days, the team will begin integrating these components. The team proposes to have Line Tracking running synonymously with Avoidance Maneuvers. These two components will be a small portion of what forms the Travel Algorithm. The Travel Algorithm will then execute in conjunction with Passenger Counter.



Thursday, May 3, 2012

Week Five Update

As Week 5 comes to a close the group has successfully completed line tracking with the robot. The group resolved issues with navigating the corners of the arena by replacing one of the light sensors with an additional color sensor. The color sensor is placed on the bottom, using the color blocks placed on each corner the robot will be able to navigate all four corners easily. The other color sensor will remain stationary and be used for passenger counting. As of now the passenger counter is still only able to count upwards. The group will continue to work on the issue of displaying the passenger count as it moves down.

 

Additionally, the group has developed a travel algorithm based on the location of which color corner the robot is on, and the availability of passengers. The robot will make decisions based on these two factors, which will allow it to navigate around the arena. This algorithm will be perfected by the end of Week 6. As for changes in robot construction the ultrasonic sensor has been moved slightly higher to make room for the addition of the color sensor. By the start of Week 6 the group hopes to start the integration of all of the individual aspects of the project that have been completed thus far.

Above is a video featuring the vehicle interrupting the Line Tracking code in order to perform a stop. The vehicle will stop once the ultrasonic sensor detects the presence of an obstacle.