Skip to content

Commit f57f88d

Browse files
committed
added psdk config instructions and psdk project
1 parent 75b72c6 commit f57f88d

File tree

8 files changed

+100
-8
lines changed

8 files changed

+100
-8
lines changed

docs/_02_examples/dji/index.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
.. _examples_dji:
22

3-
========
4-
DJI OSDK
5-
========
3+
=======
4+
DJI SDK
5+
=======
66

77
These examples use the :ref:`DJI Platform <aerial_platform_dji_matrice>`.
8-
You can install it following the instructions in :ref:`installation section <aerial_platform_dji_matrice_installation>`.
8+
You can install it following the instructions in :ref:`psdk platform installation section <aerial_platform_dji_matrice_psdk_installation>` for the PSDK or
9+
:ref:`osdk platform installation section <aerial_platform_dji_matrice_osdk_installation>` for the OSDK (deprecated).
910

1011
.. figure:: resources/DJI_M300.jpg
1112
:scale: 15
1213
:class: with-shadow
1314

1415
.. raw:: html
1516

16-
<h2>List of examples based on DJI OSDK</h2>
17+
<h2>List of examples based on DJI SDK</h2>
1718

1819
---------------------
1920

2021
.. toctree::
2122
:maxdepth: 1
2223

2324
project_dji_osdk/index.rst
25+
project_dji_psdk/index.rst
2426

docs/_02_examples/dji/project_dji_osdk/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
DJI OSDK Example
55
================
66

7-
These examples use the :ref:`DJI Platform <aerial_platform_dji_matrice>`.
8-
You can install it following the instructions in :ref:`installation section <aerial_platform_dji_matrice_installation>`.
7+
These examples use the :ref:`OSDK DJI Platform <aerial_platform_dji_matrice_osdk_osdk>`.
8+
You can install it following the instructions in :ref:`installation section <aerial_platform_dji_matrice_osdk_installation>`.
99

1010
To install this project, please clone the repository:
1111

@@ -16,7 +16,6 @@ To install this project, please clone the repository:
1616
To start using this project, please go to the root folder of the project.
1717

1818

19-
2019
.. _project_dji_osdk_execution:
2120

2221
---------
Loading
Loading
Loading
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
.. _project_dji_psdk:
2+
3+
================
4+
DJI PSDK Example
5+
================
6+
7+
These examples use the :ref:`PSDK DJI Platform <aerial_platform_dji_matrice_psdk_psdk>`.
8+
You can install it following the instructions in :ref:`installation section <aerial_platform_dji_matrice_psdk_installation>`.
9+
10+
To install this project, please clone the repository:
11+
12+
.. code-block:: bash
13+
14+
git clone https://github.com/aerostack2/project_dji_psdk
15+
16+
To start using this project, please go to the root folder of the project.
17+
18+
19+
.. _project_dji_psdk_execution:
20+
21+
---------
22+
Execution
23+
---------
24+
25+
Available launch arguments are:
26+
27+
- ``-e``: estimator type. Allowed values [``gps_odometry``, ``raw_odometry``, ``mocap``]. Default: ``gps_odometry``.
28+
- ``-t``: launch keyboard teleoperation.
29+
- ``-r``: record rosbag.
30+
- ``-n``: use custom dron namespace.
31+
32+
In order to launch the components, do:
33+
34+
- For the **mocap** version, do:
35+
36+
.. code-block:: bash
37+
38+
./launch_as2.bash -e mocap -t
39+
40+
- For the **odometry** indoor version, do:
41+
42+
.. code-block:: bash
43+
44+
./launch_as2.bash -e raw_odometry -t
45+
46+
- For the **odometry** outdoor version, do:
47+
48+
.. code-block:: bash
49+
50+
./launch_as2.bash -e gps_odometry -t
51+
52+
.. note::
53+
54+
Before launching the components with **mocap**, it is also necessary to set the file ``real_config/mocap.yaml``. This file will be used by the state estimator mocap plugin to
55+
get the ground truth pose coming from our motion capture system into the Aerostack2 common interface localization :ref:`topics <ros2_common_interfaces_state_estimator_topics>`.
56+
57+
58+
To start the mission, execute:
59+
60+
.. code-block:: bash
61+
62+
python3 mission.py
63+
64+
To do a clean exit of tmux, execute the following command:
65+
66+
.. code-block:: bash
67+
68+
./stop.bash drone0
69+
70+

docs/_03_aerial_platforms/_dji_psdk/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,27 @@ Then verify with:
229229
230230
You should see an entry for `l4tbr0`. If not, repeat the above steps.
231231

232+
.. note::
233+
234+
This leaves both bulk and network mode enabled. You can switch between them by running the appropriate command. In
235+
order to connect to the drone, either in bulk or network mode, you need to run the platform with the following JSON parameter values:
236+
237+
.. code-block:: json
238+
239+
.
240+
.
241+
.
242+
"uart_config": {
243+
"uart1_device_name": "/dev/ttyUSB0",
244+
"uart2_device_enable": "true",
245+
"uart2_device_name": "/dev/ttyACM0"
246+
},
247+
"network_config": {
248+
"network_device_name": "l4tbr0",
249+
"network_usb_adapter_vid": "0x0B95",
250+
"network_usb_adapter_pid": "0x1790"
251+
}
252+
232253
233254
.. _aerial_platform_dji_matrice_psdk_installation_package:
234255

0 commit comments

Comments
 (0)