|
Explore TEAMS!
|
Student /
Lab3Write-upAfter much tinkering with my code, changing things such as my “while” command and inclusion of an “update” command. Also, I learned that the “cliff_frontright/left” and “cliff_frontright/left_range” commands are not the same. The “cliff_frontright/left” command uses only a 0-1 range, telling whether or not there is a cliff. On the other hand, the “cliff_frontright/left_range” command uses a 0-4095 range. This not only tells whether or not there is a cliff, but it also tells how strong the return signal from the infrared beam, which is particularly affected by color. This is what makes it possible for a robot to follow a line. Once one of its cliff sensors (left or right front) senses a reading for a black line (<700), it turns the other way. Another important thing that I learned from this lab was that a “while(1)” command will loop everything inside the brackets until the power button is pressed. Also, my robot is not completely effective in its line following. It does not follow the entire track. Part of this is due to the placement of the cliff sensors. The robot is moving too quickly when it sees the right angle. All of a sudden the left (for a left turn) cliff sensor reads black and it cannot react quick enough to make the turn. If I could add two more cliff sensors, I would put them in the very center of the robot, along the axis of the wheels, the distance between them exactly the width of the line it is following. Even so, this would only work as long as there is not a right angle, where the width of the line would increase at one point. However, this configuration would still be much more effective than the current configuration with the two cliff sensors being used at the front of the robot. This is one of the inherent limitations of the robot caused by the course we have layed out. If both sensors read black, then you must have a default action take over, rather than actually following the line. |