[SimpleFlight] move_to_position_async() times out without movement when lookahead=0.5
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in vehicle_apis/multirotor_api/src/multirotor_api_base.cpp: compare the lookahead validation around lines 751-770 with the MoveToPathPosition temporary-target check around lines 1326-1341, focusing on the equality with GetDistanceAccuracy(). Reproduce with the supplied Python snippet using lookahead=0.5, then compare lookahead=-1; done means the 0.5 m boundary either moves the drone or is rejected up front with a clear parameter error instead of timing out.
Written by the indexing model from the issue text.
Description
Bug report
What's the issue you encountered?
With lookahead=0.5, move_to_position_async() accepts a command to ascend 2 m, but the drone does not move. The command returns False when it times out. With the default lookahead=-1, the drone ascends and returns True.
Tested branch: LucasJSch/ProjectAirSim, IAMAI/fix-takeoff. Commit: 9da8e86417e7ea3bd4075bd45dddfac2258f38f4.
Found while testing the fix for #236. Default takeoff passed on this branch. Latest main was not runtime-tested.
Expected: move toward the destination, or reject an unsupported lookahead value immediately with a clear error.
Include full error message in text form
No parameter error was raised. The command returned False after the timeout.
| Lookahead | Timeout | Return | Elapsed simulation time | Ascent |
|---|---|---|---|---|
0.5 |
8 s | False |
8.001 s | 0.000 m |
-1 (automatic) |
20 s | True |
3.213 s | 1.507 m |
The automatic case finishes within the existing 0.5 m arrival tolerance.
Environment
- Project AirSim: control libraries and UE plugin built from the commit above.
- Autopilot: Simple Flight; quadrotor-x; Fast Physics; distance accuracy 0.5 m.
- Windows 11 x64; Unreal Engine 5.2.1.
- Python 3.11.17;
projectairsim==1.0.2.
Settings
Both cases used the same custom UE test map and the unmodified v1.0.1 scene_basic_drone.jsonc and robot_quadrotor_fastphysics.jsonc.
How can the issue be reproduced?
- Start the build above and load the configuration.
- Wait for
Drone1to settle on the ground (LANDED, speed <= 0.05 m/s). - Run the code below inside an async function, with
worldanddroneinitialized. It requests a 2 m ascent at 0.5 m/s. - Reload the scene and repeat with
lookahead=-1andtimeout_sec=20for comparison.
if not drone.enable_api_control() or not drone.arm():
raise RuntimeError("API control or arming failed")
start = drone.get_ground_truth_kinematics()["pose"]["position"]
sim_start = world.get_sim_time()
task = await drone.move_to_position_async(
start["x"], start["y"], start["z"] - 2.0, # NED: negative Z is up
velocity=0.5, timeout_sec=8, lookahead=0.5,
)
result = await task
end = drone.get_ground_truth_kinematics()["pose"]["position"]
print({
"result": result,
"elapsed_sim_seconds": (world.get_sim_time() - sim_start) / 1e9,
"ascent_m": start["z"] - end["z"],
})
await (await drone.land_async(timeout_sec=25))
drone.disarm()
drone.disable_api_control()
Possible cause
Two checks treat the 0.5 m boundary differently:
- Parameter validation accepts
lookahead == GetDistanceAccuracy(). - MoveToPathPosition commands zero velocity when the temporary target is within that distance, including equality.
The temporary target is 0.5 m away, so the drone is told to stop. The final destination is still 2 m away, so the task cannot finish. This appears to explain the timeout.
- Dominant language
- C++
- Stars
- 890
- Forks
- 170
- Avg merge
- 22h 57m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from iamaisim/ProjectAirSim
-
bug-report fast-physics
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
iamaisim/ProjectAirSim#239 ·
Maintainers usually reply within 1 day
-
bug-report px4
Difficulty 4/5 3-5 days Newbie friendliness 48/100
iamaisim/ProjectAirSim#240 ·
Maintainers usually reply within 1 day
-
bug-report SimpleFlight
Difficulty 4/5 3-5 days Newbie friendliness 50/100
iamaisim/ProjectAirSim#236 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
iamaisim/ProjectAirSim#169 ·
Maintainers usually reply within 1 day
-
Crash (SIGSEGV) in setParameter()/getParameter() retry for COM_OBL_ACT after HIL TCP send failuresOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
iamaisim/ProjectAirSim#168 · 4 comments ·
Maintainers usually reply within 1 day
All issues in iamaisim/ProjectAirSim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ROCm/AMDMIGraphX#5490 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
arvidn/libtorrent#9126 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Sunrisepeak/mcpp-language-server#80 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
xiaoyifang/goldendict-ng#3148 ·
Maintainers usually reply within 1 day