The purpose of this competition was to be able to race around a set of pylons within a previously mapped area using ACML and dynamically setting way-points to able to adjust to the unknown placement of the pylons. While racing around the pylons twice we are trying to achieve the fastest time possible while avoiding hitting any of the pylons as touching a pylon disqualifies the robot from the current round of racing.
The GMapping ROS package provides laser-based SLAM (Simultaneous Locaalization and Mapping). With this package it is possible to create a 2-D occupancy grid map to use with the navigation stack. It does this by converting each laser scan into odometry transform frames, and uses these to estimate the robots pose within the map frame. There are many parameters that can be tuned to unique situations.
AMCL implements a KLD-sampling Monte Carlo localization approach to estimate the robots current pose within a laser-based map. Upon initilization, AMCL distributes a particle filter through the map according to the input parameters. An interesting note is that AMCL can't handle laser data that moves with respect to the base, because upon startup AMCL latches the transform between the lasers frame and base frame to use in localization.
Question: Using GMapping to create a map to use during the race, after localization, can we place waypoints approximately around the pylons and have the robot successfully navigate the course using the created map within the navigation stack.
Hypothesis: With tuning of waypoint placement, proper localization and efficient algorithms we will be able to reliably navigate around the set of pylons using the navigation stack within a timely and responsive manner.
Figure 1: Difference in localization methods between Odometry and AMCL. Image source: http://wiki.ros.org/amcl
We decided to implement the racing behavior by localizing the robot before the race started and manually choosing a set of waypoints for the robot to navigate through by sending each waypoint to the navigation stack one at a time, in order, and waiting for the robot to reach it's goal before sending the next waypoint. After localization the user presses 'x' on the Logitech controller and the robot attempts to reach all waypoints, and then repeats for a second lap.
An attempt to speed up the robots navigation was made by checking to see if the robot was near the current way-point and if so, proceed to continue on to the next way-point while still turning to orient itself to the correct pose which would have saved our robot time at each corner. This implementation, while successful, had the side effect of causing the path planning to be more unstable and resulted in the robot (hilariously) spinning around as it was trying to make it's way to the next waypoint. This negated any time saved on the corners and even created a longer lap time overall. As a result, this implementation was never used during the competition and the robot was expected to fully reach each waypoint before proceeding to the next.
The competition consisted of three rounds per team, with two laps per round. In order for the round to count as successful, the robot needed to navigate around all four pylons without touching them, and cross the finish line after the final lap. Overall our robot placed third in the competition. Our robot was able to successfully complete the track 1/3 of the rounds, but placed third due to the time it took. In the first and second run our robot ran into a issue where it ignored the pylons as they were not part of it's map it was using to navigate. The robot hit the same pylon each time as it was trying to avoid the large recycling bins near the wall. The third round was successful, the robot was able to properly go around the track twice without incurring any violation. This was accomplished by adding two extra way-points to guide the robot through the opening between the garbage bins and third pylon to avoid collision.
It is challenging to accurately gauge how the robot will try to navigate the map when given a set of waypoints. This resulted in the unforeseen circumstance where the robot avoided the recycling bins by a large margin challenging us to dynamically change our strategy during the competition. Through experimentation with path plan modification, it is noted that any alterations after the initial path has been planned can lead to unforeseen results in the robots movement.
The purpose of this competition was to demonstrate localization and navigation in a known map by setting waypoints and traversing around the dynamically set track. We were able to successfully implement this behavior in our robot and as a result we were able to have it navigate the race track and complete the competition. Unfortunately our attempts at increasing efficiency were counterproductive and led to a slower time overall. As a result, for the competition we defaulted on our basic implementation. This result matched what we thought we could accomplish within our hypothesis, even though it was not as fast and efficient as we had hoped. We could improve our overall time by resolving the spinning issues we were having when switching waypoints before completion. Incorporating vision into the algorithm to detect the pylons and dynamically adjust the cost map accordingly would also be an area worth experimenting in to improve results.