UAT 458 Indoor Autonomous UAS and Navigation Technology
Worksheet 9 Occupancy grid, loop closure and path planning
Objective
Build an occupancy grid of the room, close a loop with a tag, and plan with A* and Dijkstra on the inflated map
Equipment and materials
- 2D LiDAR
- AprilTag and a calibrated camera
- Measuring tape to survey scan positions
- Computer with Python, NumPy and matplotlib
Safety
- Check the laser class before use; never look into the LiDAR head at close range
- Hand-carried sensors; no flying
- Lift tables with two people; mind fingers and backs
Steps
- Scan the room from 5 known positions and build a 0.1 m map with log-odds as in Example 1, showing unknown cells in a different colour from free cells
- Carry the sensor once around the room with a tag at the start and log odometry
- Close the loop with the code in Example 2 and report the error before and after
- Inflate obstacles by the drone radius plus margin and plan with A* and Dijkstra between three pairs of points
- Move one table, rescan, and check how many scans the map and path take to adapt
Record of results
| Cell (position) | Hits | Pass-throughs | Log-odds | p(occupied) | State (free, occupied, unknown) |
|---|---|---|---|---|---|
| Pose | Odometry x, y (m) | After closure x, y (m) | Shift (m) |
|---|---|---|---|
| Pair of points | Algorithm | Path length (m) | Cells | Nodes expanded |
|---|---|---|---|---|
Questions
In your map, are never-observed cells shown differently from free cells? If the planner treated unknown cells as free, what would happen in the real room?
What was the error on return to the start before loop closure, as a percentage of distance? After closure, where did the error go, and what would happen if the tag used for closure shared its ID with another tag?
Did A* and Dijkstra give paths of the same length? How many more nodes did one expand, and why does A* still find the shortest path?
After moving the table, how many scans did the map need to turn the table's cells free, compared with what the log-odds clamp predicts, and did the path change?
How many cells does your drone radius plus margin become when inflating obstacles, and why must it be rounded up?
Check before you hand in
What to hand in
- Image of the three-state occupancy grid
- Table of error before and after loop closure
- Table of path length and nodes expanded for A* and Dijkstra
- Notes on how the map adapted after moving the table