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.

Thursday, April 26, 2012

Week Four Update


 

 The group is currently constructing the robot and programming to line track and count passengers. The group has found small issues with line tracking such as turning smoothly. In the video above, the robot displays a slow but successful turn. The current design of the robot has proven to satisfy all the necessary constraints and the group has decided to continue with it until the color sensor is integrated into the final robot. The color sensor will be integrated when the final dimensions of the passenger pick up platform is finalized. Despite this setback the passenger counter programming now allows for the taxi to display that the taxi is full after collecting four passengers.

As week 5 nears the group has started brainstorming potential travel algorithms. One potential travel algorithm would be to use the corners as reference points from which to navigate around the arena. This would be beneficial because it allows the robot to travel the shortest distance between stations. 

The following tasks are projected to be completed by the end of Week 5: line tracking (fix any bugs), successfully have the passenger counter count down, design possible attachment points for color sensor, and begin programming the travel algorithm.

Saturday, April 21, 2012

Week Three Update

By Week Three the group aimed to start Line Tracking, Passenger Counting and Robot Construction. The group repositioned the light sensors on the robot so that the robot could consistently track and follow a straight black line. There were still issues when it came to following the corner edges of the arena. The team’s goal for next week is to successfully navigate around the perimeter of the arena.

During lab, the team was able to program the color sensor to recognize and display certain colors. The team was able to program the robot to display the number of passengers on its screen, however the robot is only able to display one color passenger at a time, and can only count upwards, not downwards. For next week the team hopes to resolve these issues and successfully display the entire passenger count on the display screen.  

For the following weeks the team hopes to adjust the light sensors more so that the sweep of the light sensors can be greater. This will hopefully result in the light sensors being more sensitive, making the line tracking abilities of the robot more accurate. 


Passenger Counter Progress




Line Tracking Progress

 

Tuesday, April 10, 2012

Week Two Update

This week the group accomplished all the deliverables from Week 1, constructing an initial vehicle design, and the constructing portion of the team began experimental programming with line tracking.

Some design flaws arose where the two light sensors were too close together and the data produced conflicting results causing the robot to veer off-course. Modifications were made. As of now, the robot is capable of following the straight lines along the highway. The team is currently programming to allow the robot to make turns. In addition, the team is brainstorming as to how to create a maneuver to realign the robot to the field should it stray away from the designated path.

photo 3
The testing field created is a scaled model of the competition field. The team has yet to include the colored portions of the field as this would cause many issues with the current line tracker programming. As the program becomes more efficient the colored areas will be added. The team will then shift its focus to passenger collection/drop-off and collision avoidance maneuvers.

Pictures of the initial design, the modifications, and the testing field are located in the Picture Album tab at the top of the page.

Saturday, April 7, 2012

Welcome Message

Welcome to our Engineering Freshmen Design Project!


     Over the course of the next ten weeks, the team will be working to create a simulation autonomous vehicle capable of transporting passengers in a network of vehicles. This vehicle must also be cost efficient and it must be able to obey the given traffic rules. The model vehicle will be constructed using the NXT Lego kits which the group is familiar with because of Engineering 102 last term. Further details of the project are located in the Project Overview tab at the top of this page.



Week 1 Overview

     This week the group finalized its members and distributed the work. In addition, preliminary goals were set so that the group remains on track throughout the quarter.


              Preliminary Goals:   
                    
                   1.   Begin researching and designing line tracking and passenger counters
                   2.   Construct a scaled model of the Practice Field
                   3.   Coordinate schedule with all members