Skip to content

Commit

Permalink
follow_me_example: also check home position
Browse files Browse the repository at this point in the history
Some versions of PX4 fail with this example because GPS checks are passed before a home position is set. The example code tries to arm without home position then, which is rejected.
  • Loading branch information
potaito authored Jun 18, 2021
1 parent 50604c1 commit cf7b5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/follow_me_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def fly_drone():

#Checking if Global Position Estimate is ok
async for global_lock in drone.telemetry.health():
if global_lock.is_global_position_ok:
if global_lock.is_global_position_ok and global_lock.is_home_position_ok:
print("-- Global position state is good enough for flying.")
break

Expand Down

0 comments on commit cf7b5cf

Please sign in to comment.