You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/follow_me.rst
+42-38Lines changed: 42 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,54 +51,58 @@ Once you've done that:
51
51
cd dronekit-python/examples/follow_me/
52
52
53
53
54
-
#. Start the example, passing the :ref:`connection string <get_started_connect_string>` you wish to use in the ``--connect`` parameter:
54
+
#. You can run the example against a simulator (DroneKit-SITL) by specifying the Python script without any arguments.
55
+
The example will download SITL binaries (if needed), start the simulator, and then connect to it:
55
56
56
57
.. code-block:: bash
57
58
58
-
python follow_me.py --connect 127.0.0.1:14550
59
-
59
+
python follow_me.py
60
60
61
-
.. note::
61
+
On the command prompt you should see (something like):
62
62
63
-
The examples uses the ``--connect`` parameter to pass the :ref:`connection string <get_started_connect_string>` into the script.
64
-
The command above is used to connect to :ref:`SITL <sitl_setup>` running on the local Linux machine via UDP port 14550.
63
+
.. code:: bash
64
+
65
+
Starting copter simulator (SITL)
66
+
SITL already Downloaded.
67
+
Connecting to vehicle on: tcp:127.0.0.1:5760
68
+
>>> APM:Copter V3.4-dev (e0810c2e)
69
+
>>> Frame: QUAD
70
+
Link timeout, no heartbeat in last 5 seconds
71
+
Basic pre-arm checks
72
+
Waiting for GPS...: None
73
+
...
74
+
Waiting for GPS...: None
75
+
Taking off!
76
+
Altitude: 0.019999999553
77
+
...
78
+
Altitude: 4.76000022888
79
+
Reached target altitude
80
+
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
81
+
...
82
+
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
83
+
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
84
+
User has changed flight modes - aborting follow-me
85
+
Close vehicle object
86
+
Completed
87
+
88
+
.. note::
65
89
90
+
The terminal output above was created using simulated GPS data
91
+
(which is why the same target location is returned every time).
92
+
93
+
To stop follow-me you can change the vehicle mode or do Ctrl+C
94
+
(on a real flight you can just change the mode switch on your
95
+
RC transmitter).
96
+
66
97
67
-
On the terminal you should see (something like):
98
+
#. You can run the example against a specific connection (simulated or otherwise) by passing the :ref:`connection string <get_started_connect_string>` for your vehicle in the ``--connect`` parameter.
68
99
100
+
For example, to connect to SITL running on UDP port 14550 on your local computer:
69
101
70
-
.. code-block:: bash
71
-
72
-
Connecting to vehicle on: 127.0.0.1:14550
73
-
>>> APM:Copter V3.4-dev (e0810c2e)
74
-
>>> Frame: QUAD
75
-
Link timeout, no heartbeat in last 5 seconds
76
-
Basic pre-arm checks
77
-
Waiting for GPS...: None
78
-
...
79
-
Waiting for GPS...: None
80
-
Taking off!
81
-
Altitude: 0.019999999553
82
-
...
83
-
Altitude: 4.76000022888
84
-
Reached target altitude
85
-
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
86
-
...
87
-
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
88
-
Going to: Location:lat=50.616468333,lon=7.131903333,alt=30,is_relative=True
89
-
User has changed flight modes - aborting follow-me
90
-
Close vehicle object
91
-
Completed
92
-
93
-
94
-
To stop follow-me you can change the vehicle mode (on a real flight you can just change the mode switch on your RC transmitter).
95
-
96
-
.. note::
102
+
.. code-block:: bash
97
103
98
-
The terminal output above was created using simulated GPS data
99
-
(which is why the same target location is returned every time). It was exited by changing
0 commit comments