Assignment 0: Create Spotting (example write-up)

Francois Baldassari (fbaldass)

Group Members: Stu Black, Basia Korel

9 September, 2009

Introduction

The purpose of the Create Spotting assignment is to run and analyze the basic functionality of the iRobot Create bases; specifically to become familiar with the Create hardware as well as to test its limitations. One task from the built-in set of Create behaviors is examined, a hypothesis on its exact functioning is formulated and experiments are run to form a conclusion on the original hypothesis. By selecting the pre-defined "Spot Cover" Create mode, we propose that the iRobot Create will "spirals outward, then inward, to cover an area around the starting position", while staying central to its original location.


Approach and Method

Because the stated goal of this demo is to cover an area, potentially for effective floor vacuuming purposes, we have designed four experiments that will allow us to evaluate the parameters of this spot cover. More specifically, we have examined the procedure by which the Create covers a spot location, and how it reacts to obstacles located within its vicinity, namely other Create bases and the walls.

 

For each experiment, the position of the robot is tracked by placing an augmented reality tag (ARTag) on top of the robot that is observed by the overhead localization system in the 404 Roomba lab. The ARTag is essentially a binary ''2D bar code'' comprised of uniformly arranged black and white squares surrounded by a black border. Examples of these ARTags on the CS 148 soccer field is shown below. This tag observed by a calibrated 4-camera overhead system that has a view over the entire soccer field. The localization system has existing ''template images'' for each ARTag and search over its image in each frame in time to find the location and rotation of the tag in its view. If a tag is found, the pose of the robot on the field is given as the 2D location and orientation of the tag, assuming a fixed distance between the ground and the camera. The localization data is written in a text file for further processing. The obstacles in this experiment are other disabled iRobot Creates, labelled with "obstacle" ARTags, set on the field and left idle.



For the first experiment, the Create's "Spot Cover" demo is ran with no obstructions near the Create. The Create is set in the middle of the 404 Roomba lab and its position is continually tracked by the overhead localization system.

The second experiment is performed with one obstacle on the field, placed in a fixed position that is in close proximity to the starting position of our Create. Because the iRobot's provided demo description does not mention any reaction to an obstacle, without running the experiment we initially infer that the Create will continually drive forward, pushing against the obstacle, until the demo times out. If that is the case, we are to stop the experiment to prevent any damage to the Creates.

The third experiment involves two obstacles positioned on opposite sides of the Create's starting position; both obstacles are placed close enough to the starting position that they will be an obstruction to the Create's intended spiraling path.

 

In the fourth experiment, we have built an obtrusive wall using a row of Create bases placed next to each other. The starting position of our Create is in front of the wall such that the "Spot Cover" demo will cause our Create to run into the wall.


When testing the "Spot Cover" demo, specific metrics must be observed so we can gauge how the "Spot Cover" experiments either validate or invalidate our original hypothesis. The first control variable that varies for each experiment is the number of obstacles, being either 0, 1, 2 or "wall". Secondly we must measure the total time it takes for each demo to complete. Using a stopwatch, we record the start to finish time to determine whether the routine has a watchdog timer that aborts the demo after a set runtime. Since the overhead localization system also provides the YAW, (the direction the robot is facing defined in radians) of the robot, we measure the average of the derivative of the yaw's cosine. This particular metric is useful in assessing how constant the rate of change of the robot's yaw is throughout the experiments. When taking this derivative we must be careful because in one particular orientation, the yaw jumps from pi to -pi, as opposed to the yaw starting at 0 and increasing to 2*pi. Finally, we use the same motion tracking from the overhead localization to roughly calculate a metric for the area covered by the Create during its routine. All these metrics we observe will be used to compare the performance of the robot under different circumstances and will help us assess our proposed hypothesis.


Experiments and Results


Experiment 1:

 

http://www.youtube.com/watch?v=UguFFWc3WLg

 

 

The trial of the first experiment resulted in the robot spiraling outward, then inward, with an ending position a few inches away from the original position. The total time took about 1 min. 18 seconds for the routine to execute.

 

The following graph displays the path of the Create. The unit is the meter.

 

The area covered is roughly ~.785 m2 .

 

To get a better visualization of the progression of the spiral with respect to time, we examine the evolution of the cosine of the robot's angle with respect to time using the graph below.

 

 

It is evident that the cosine of the angle varies faster at the beginning and at the end of the routine, which means that the robot is turning at a greater rate. This is consistent with a spiral pattern.


Experiment 2:

 

The original inference we made regarding to the Create not reacting to obstacles (since this detail is not specified in the demo description), is realized to not be correct. After testing the second experiment, it is evident that the Create does react to obstacles. Each occurrence of the Create's bumper sensors being hit, the Create turns 180 degrees and resumes its spiral motion.

 

The robot's path is highlighted in the graph below. Once again, the measures are in meters.

 

 

It is evident that the obstacle is placed in the top right corner of the graph, close to the start location of the Create. The area covered is ~589 m2. From the graph it is visible that the Create covers the spherical area surrounding its starting position excluding the area where the obstacle is set. However once again, the Create ended in a location close to its start location, marked by the red and green points on the graph.

 

A second trial is tested for experiment 2 with an alternate starting orientation of the Create; in this trial the Create is placed facing the obstacle instead of initially facing away from the obstacle. The resulting path follows a much different pattern that is visualized below.

 

 

In this trial, even though the starting position of the Create and the position of the obstacle remain the same, the obstacle has forced the Create to take an altered path. The only variable in this trial that has varied is the starting orientation of the Create. Our Create still maintains a path that results in a similar area size covered (obstacle included), however this area is not centered on the starting point of the robot since the end position is on the opposite side of the obstacle than the start position. Thus the center of the area covered by "Spot Cover" is rather the obstacle itself and not the starting position.


Experiment 3:

 

In experiment 3 the Create is pinned between two obstacles, which leads to a very different path from the previous trials. Because it could never reach a complete spiral without bumping into an obstacle, this run took about 20 seconds longer than the previous ones. The path taken by the robot is displayed below.

 

 

The area covered by the robot is still a distinguishable "spot", however the shape of the Create's path is very much altered by the addition of a second obstacle to the experiment. The two obstacles are located respectively north east and south west of the Create's starting position. By following the robot's path on the graph below, it is apparent that the robot first gets "stuck" between the two obstacles, continues back and forth between them, and eventually escapes to continue to spiral around the lower left obstacle until the demo finally terminates. In this trial, we observe that regardless of the obstacles' presence, the "spot" area is still roughly centered around the starting point of the robot.

 

Experiment 4:

 

The last experiment tests the "Spot Cover" demo by observing the Create spiral into a wall formed by other Create bases. The trial ran 1 min 28 sec; the path output is displayed below.

 

 

The area covered by the Create takes on a more oval shape as opposed to being spherical. This may by caused by the Create not turning exactly 180 degrees when it bumps into an obstacle. In this demo the ending position is a bit further than the starting position however remains within the total area covered by the "Spot Cover".


Below is a summary of our experiments and results.

 

Trial

# Obstacles

Area Covered

Time

Average Change in Cosine

1

0

.785 m2

1 min 18 s

.143

2

1

.589 m2

1 min 21 sec

.683

3

1

.407 m2

1 min 34 sec

.648

4

2

.392 m2

1 min 30 sec

.648

5

WALL

.600 m2

1 min 20 sec

.670


Discussion

The algorithm used by the robot is as described, a spiral outward and then inward back to the original spot. However, this built-in Create routine does react to obstacles when the Create's bump sensor is triggered, which is not mentioned in the description of the demo provided on the iRobot website. When bumping into an obstacle, the robot rotates in place 180 degrees and continues to spiral in a new direction.

Overall, the parameters we controlled and varied in each experiment caused the robot to take a different and unique path in each trial; however the end result of staying central to the original location was consistent in most of the trials. An overview of the results follows. The total runtime was between 1 min 18 sec and 1 min 34 sec, which is a 60% change. The area covered varied more significantly, however the area covered by the obstacles themselves (and hence inaccessible space to the robots) makes up for much of the difference. The change in the cosine of the robot's yaw was more consistent. A difference could be observed between the 0 obstacles trial and every other trial due to the fact that the robot turned around when an obstacle was hit, which introduced a higher change in YAW than when no obstacles where hit. The trials having at least one obstacle had very similar averages of cosine derivatives; thus we can conclude that the manner in which the robot controls spiralling is completely time dependent and not reliant on obstacles or other disturbances. Finally, we remark that obstacles would sometimes modify the exact location of the area covered by the robot relative to the spot the robot was placed on.

If our Create with the built-in "Spot Cover" behavior were to serve as a vacuum cleaner robot, this routine would clean a spot quite efficiently, even though an ability to select the size of the spot would probably make this much more useful. However one should be aware of the shift in the "cleaning area" center point due to obstacles, as detailed above. The platform we expect this algorithm to originally be intended for is otherwise known as the "Roomba".


Conclusion

The "Spot Cover" behavior of the iRobot Create performs as expected based on the routines' pre-described functionality: to "cover an area around the starting position". Using the Create base's bumper sensors to react to said obstacles, the Create always manages to draw out a similar "spot" area that remains fairly consistent in size if not in position relative to the original location of the Create. Thus, by testing the Create's behavior in a controlled environment and changing various parameters, we support our original hypothesis and can conclude that the Create will stay central to its original location, given a small margin of error. For purposes of using the pre-set demo for vacuuming purposes, it is worthy to note that the Create manages to cover areas of respectable sizes in a timely manner (under 1 min 30 sec) regardless of how many obstacles or walls are present in the environment.