From 3d35010ec630906b43aaf736f127bb9d67738fee Mon Sep 17 00:00:00 2001 From: Karthik Arumugham Date: Thu, 1 Aug 2024 19:50:06 +0530 Subject: [PATCH 1/2] Update follow_me_example.py Fix Follow Me example by explicitly setting a non-zero value for absolute_altitude_m in target_location --- examples/follow_me_example.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/follow_me_example.py b/examples/follow_me_example.py index 604f8c01..9d60a059 100755 --- a/examples/follow_me_example.py +++ b/examples/follow_me_example.py @@ -59,8 +59,14 @@ async def run(): # This for loop provides fake coordinates from the fake_location list for # the follow me mode to work. # In a simulator it won't make much sense though + target = TargetLocation(0,0,0,0,0,0) for latitude, longitude in fake_location: - target = TargetLocation(latitude, longitude, 0, 0, 0, 0) + target.latitude_deg = latitude + target.longitude_deg = longitude + target.absolute_altitude_m = 480.0 + target.velocity_x_m_s = 0 + target.velocity_y_m_s = 0 + target.velocity_z_m_s = 0 print("-- Following Target") await drone.follow_me.set_target_location(target) await asyncio.sleep(2) From 4848998724c743a90be6c19a8e063d281f8ecf59 Mon Sep 17 00:00:00 2001 From: Karthik Arumugham Date: Fri, 2 Aug 2024 08:15:16 +0530 Subject: [PATCH 2/2] Update follow_me_example.py Fixing style --- examples/follow_me_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/follow_me_example.py b/examples/follow_me_example.py index 9d60a059..6615eeab 100755 --- a/examples/follow_me_example.py +++ b/examples/follow_me_example.py @@ -59,7 +59,7 @@ async def run(): # This for loop provides fake coordinates from the fake_location list for # the follow me mode to work. # In a simulator it won't make much sense though - target = TargetLocation(0,0,0,0,0,0) + target = TargetLocation(0, 0, 0, 0, 0, 0) for latitude, longitude in fake_location: target.latitude_deg = latitude target.longitude_deg = longitude