comp790 - Assignment 2
Overview
In this assignment, our goal was to direct the roomba robots about an enclosed area without collision. We used RVO to generate direction vectors for our robots to follow. I worked with Glenn and Qi on this assignment.
Our code modifications can be found here.
Details
We used RVO to control our robots. Our general approach was to read the camera positions, supply the data to RVO, then use the RVO update to direct the robots. We take RVO's new direction vectors as suggested motion and do not directly follow them.
Our update loop begins by reading the camera that is viewing the playing field. We retrieve the robot positions and orientation and feed them into RVO. We found that it was not necessary to update the RVO velocity with a velocity estimate derived from the camera positions. At this stage we also check if any of the robots have reached their desired goal. If so, we give them a different goal, and allow RVO to continue directing them.
After the camera has supplied new data to RVO, we run the RVO simulation to produce a new set of vectors for our robots to follow.
We then update the robots with new instructions. RVO supplies a new velocity vector for each robot. This vector supplies a desired orientation and speed. We do not follow this vector directly, but instead treat it as a suggestion. We do this by finding how different the robot's current orientation is from the new orientation provided by the new RVO vector. Based on the difference, we provide the robot with 3 possible arc values: tight, medium, and shallow. If the disired orientation is very far for the current, we begin a tight arc towards the new orientation. Similarly, if the desired orientation is close to the current orientation, we use a shallow arc to approach the desired orientation. The cut offs for the stages are |angle| > pi/4 = tight, |angle| < pi/8 = shallow, otherwise medium arc. This allows the robot to begin approaching the desired configuration with appropriate speed. We also include a correction if the robot is not found by the camera. If no camera data is supplied, we direct the robot to back up. This will eventually move the robot back into visual range.
Results
We are satisfied with our results. The robots generally reach their desired goals with no collisions. Our method also proved to be robust in that, after reaching their initial goals, our robots could continue navigating to new random goals on the map. They did this by selecting a new goal each time one was reached. They then returned to relying on the RVO navigation system to move about the map. They could proceed to these new, random goals without collision.
Case 1: No obstacles
The robots begin in the corners of the map and are given a desired goal in the opposite corner. This creates congestion in the middle of the map. The robots of stop in the middle for a brief time while the navigate around one another. They then proceed to the corner goals.
Case 2: Circle obstacle
A circular obstacle is placed in the center of the map with the robots in the corners. They must again travel to the opposite corner. The robots proceed to the obstacle in the middle, then navigate around it. As they encounter other robots, they pass along the obstacle or around the other robot towards their goal.
Case 3: Narrow passages (extra)
The map is split into 4 sections with narrow passages between each section. The robots begin in one section and must move to a goal in the section opposite. They do this by traversing a directly connected section, then moving into the goal section. Our robots could not solve this layout. While some would achieve their goals, others would get stuck in the inner corners in their current section.