Group 1 - Robot Coordination |
Team
Members: Adam Fulford, Paul Kawka, Jeff Strick, Yisheng Zhang
Objective:To create a robot following scheme that allows a trailing robot to closely follow the path of a lead robot.Introduction:Ordinary vision based robot following was possible from the techniques learned in lab. However, these methods alone result in robot following in a ‘shortest path’ configuration. For example, if a lead robot makes a left turn in a corner, the trailing robot will cut the corner to follow the light in the most direct path. This project investigated methods to more closely follow the lead robot’s actual path so corners are not cut when executing discrete turns. Statement of Goals:
Project Innovations:
Features:Lead Robot: The lead robot moves in some
desired trajectory, such as an n-sided polygon or wall-following in a
maze. At the onset of a turn, the
lead robot will transmit an initial turning signal and a final turn angle to
the trailing robot. The trailing robot
will use this information to plan its path in the upcoming turn. Whenever the distance between the lead
robot and the trailing robot is outside of a range determined by a rear
facing IR sensor, the lead robot will stop until the trailing robot catches
up. Some of the key challenges that
needed to be resolved included: 1. How to obtain accurate measurements of turn angle? As experienced in lab, using the compass for accurate, high resolution determination of robot orientation was not possible primarily due metal objects within the room that compromise the compass reading. The next method investigated was using an optical mouse as an additional encoder to measure the amount of relative change in the robot orientation every millisecond. The mouse was mounted a known distance forward of the robot’s center of rotation. Theoretically, the number encoder counts measured along the tangent circle should determine the orientation. This approach worked quite well when the robot simply turned slowly in place. However, when trying to measure the angle of the robot while simultaneously moving forward, the theoretical computations no longer held in application. The amount of measured rotation decreased as the forward robot velocity increased. In addition, the mouse functionality was severely speed limited. Therefore, we settled on using the encoder readings from each of the robot motors to calculate the turn angle. Despite some wheel slip, this method of calculation was able to produce accurate and repeatable measurements of relative turn angle. 2. How do we create some interesting paths to follow? The first trajectory configuration was simply a reapplication of wall following. For additional paths, a generalized algorithm was developed to execute closed n sided polygon shapes of a given length side. P control was used on the angle generated from the wheel encoder reading to get fairly repeatable and accurate geometric shapes. 3. How to decide when to make a turn? The front IR sensor and a side IR sensor are used to decide when to turn when performing wall following. The preplanned path was used to generate the turn command when following a geometric shape. 4. How to facilitate the trailing robot following? After making a turn, the lead robot will drive at a certain distance determined by a rear facing IR sensor to leave enough space for the trailing robot to make a turn. To avoid the trailing robot loses sight of the lead robot, the lead robot will stop and wait for the trailing robot if the distance between them is bigger than the predetermined limit. 1. What sort of communication is necessary? For the final technique implemented, relative little communication information is required. When the robots are active, a turning flag and turning angle are sent from the lead to the trailing robot every 100 ms. As part of the experimentation process, other uses of communication were also evaluated. For example, it is possible to send the vref and turn commands from the lead to trailing robot. Using a buffer it was possible to cache the commands and execute them after a delay. Although this method could have been used to more accurately perform the robot coordination, complexities in packet losses and garbled data steered the designers towards a vision based solution described below. Trailing Robot: Servo-mounted camera: This device was created to allow light tracking to be independent of the direction of travel. This ability allows the robot to track a light source through a 180 field of vision. Unfortunately this was not a simple as it sounds, the servos that we found in the lab have a commandable range of only approximately 130 degrees. The mechanical limit was overcome by tracking the light source to the extremes of the image using sophisticated software angle calculation algorithms. The servo angle was found to have a linear relationship with the servo command position. A linear map was created between pixel position and image angle.
The additional calibration of the angles outside the range of the camera servo is summarized in the following plots. Note that these plots are only valid when the camera is positioned at one of its 60 degree extremes.
Proportional control was implemented to maintain the trailing robot’s following distance from the lead robot. The size of the image of the light source was used as the feedback signal for calculation of the robot’s velocity. The camera used on the robot is a superior sensor when compared with the IR or ultrasonic distance sensors. In it’s current configuration, it provides a distance measurement every 80 ms. One requirement of such a system is that the light source must be uniform when viewed over a 180 degree range. This proved to be a somewhat difficult problem that was solved by evaluation a variety of different light sources. Another consideration when using this scheme is that the camera auto thresholds upon start up. This can result in vastly different camera performance depending on the exact light conditions at startup. It was determined that to have predictable camera performance the camera should be kept in complete darkness (covered) for the first 4 seconds. Precision following of the robot is possible using the angular position of the lead robot relative to the trailing robot as determined using the orientation of the camera when it is focused on the light source that is mounted on the lead robot, and the relative size of the light in the camera’s image. The only other needed information required is when and where the lead robot is making a turn and what the angular change will be. This information is transmitted from the lead robot to the following robot using the Microhopper. The robot software works with two basic modes: 1. Find the light, Center up the robot on the light, Point the camera straight ahead, and follow the robot based on the image size. 2. Turn algorithm: Drive straight, lock camera on the light source, Turn only when the camera angle reaches the specified angle for the turn, then continue turning until the camera is straight ahead, Return to mode 1 when the camera is straight ahead.
|
Pictures
of the Robots
Summary: This project uses extensive vision feedback combined with
wireless robot communication to execute more precise robot following. A following robot using only a camera for
sensing is able to nearly follow a lead robot’s same path when it executes
interior wall following or a drives in a preplanned geometric shape. Code composer codes: Sample
Movies (QT format) In the dark…(harder to see) Wall following 90 degree corners (mov) Hexgonal path – 60 corners (mov) Hexagonal path – floor level (mov) In the light… Wall following 90 degree corners (mpg) |