- Reactive methods for obstacle avoidance
In this lab, you will implement a reactive algorithm for obstacle avoidance. While the base starter code defines an implementation of the F1TENTH Follow the Gap Algorithm, you are allowed to submit in C++, and encouraged to try different reactive algorithms or a combination of several. In total, the python code for the algorithm is only about 120 lines.
The lecture slides on F1TENTH Follow the gap is the best visual resource for understanding every step of the algorithm. However, the steps are outlined over here:
- Obtain laser scans and preprocess them.
- Find the closest point in the LiDAR ranges array.
- Draw a safety bubble around this closest point and set all points inside this bubble to 0. All other non-zero points are now considered “gaps” or “free space”.
- Find the max length “gap”, in other words, the largest number of consecutive non-zero elements in your ranges array.
- Find the best goal point in this gap. Naively, this could be the furthest point away in your gap, but you can probably go faster if you follow the “Better Idea” method as described in lecture.
- Actuate the car to move towards this goal point by publishing an
AckermannDriveStamped
to the /drive topic.
Implement a gap follow algorithm to make the car drive autonomously around the Levine Hall map. You can implement this node in either C++ or Python. There are two extra test maps levine_blocked.png
, which is empty, and levine_obs.png
, which has obstacles that are relatively hard to navigate through for you to evaluate your code on.
To change the map in the simulation, add the included .png
and .yaml
map files to f1tenth_gym_ros/maps
directory. Then, change f1tenth_gym_ros/config/sim.yaml
to use your desired map.
Deliverable 1: After you're finished, update the entire skeleton package directory with your gap_follow
package and directly commit and push to the repo Github classroom created for you. Your commited code should start and run in simulation smoothly.
Deliverable 2: Make a screen cast of running your reactive node in the simulation. Include a link to the video on YouTube in SUBMISSION.md
. The basic requirement is that your car should be able to navigate entire loops in levine_blocked
map, and through at least most of the obstacles in levine_obs
map. Make screen casts on both maps.
- Compilation: 10 Points
- Implemented Find-Max Gap: 40 Points
- Implemented Find best point: 30 Points
- Levine blocked Video: 10 Points
- Levine obstacles Video: 10 Points
UNC Follow the Gap Video: https://youtu.be/ctTJHueaTcY