UAT 366 Indoor Autonomous and Multi-Unmanned Aircraft Systems
Worksheet 3 Avoidance in SITL and in the lab
Objective
Experiment with potential fields and VFH, find their limits, set up PX4 Collision Prevention and test it safely for real
Equipment and materials
- Computer with PX4 SITL, Python and the module 3 example code
- Training drone with range sensor or LiDAR
- Soft obstacles such as foam boxes or curtains
- Netted flight room
Safety
- Pass in SITL before any real flight
- Real tests with soft obstacles, low speed, netting and a pilot ready to take over
- No people in the flight area
Steps
- Run Example 1; vary start, k_rep and influence radius to find trap conditions
- Record LiDAR ranges in a mock corridor; choose headings with Example 2 and add a valley-width rule
- Enable Collision Prevention in PX4 SITL; try two CP_DIST values flying at a wall in Position mode
- Simulate range data loss; check behaviour at 0.5 s and 5 s
- Test for real in the lab with soft obstacles at low speed
Record of results
| Start (x, y) m | k_rep | Influence radius ρ0 (m) | Result (reached or stuck) | Stop position or number of steps |
|---|---|---|---|---|
| Range data case | Blocked headings (deg) | Heading without valley rule (deg) | Heading with valley rule (deg) | Angle from goal (deg) |
|---|---|---|---|---|
| Test | CP_DIST (m) | Approach speed (m/s) | Stop distance from wall or obstacle (m) | Behaviour observed |
|---|---|---|---|---|
Questions
From Table 1, why does starting exactly on the line get stuck every time, whatever k_rep or influence radius you choose, and how does a small offset help?
From Table 2, how much did the valley-width rule change the chosen heading, and what do you gain and lose?
In Table 3, what did PX4 do when range data stopped for 0.5 s and for 5 s, and why is switching to HOLD safer than carrying on?
Collision Prevention stops the drone in front of an obstacle but does not plan a detour. If a pallet not on the map blocks an aisle, what should the system do next? Refer to the A* planning layer in the lesson.
Check before you hand in
What to hand in
- Potential-field trap conditions table
- Heading results before and after the valley rule
- SITL results for CP_DIST and data loss
- Real test record