@@ -16,14 +16,13 @@ DJI Matrice Series PSDK
16
16
Introduction
17
17
------------
18
18
19
- DJI Matrice Series using `DJI Onboard PSDK <https://github.com/dji-sdk/Onboard-SDK >`_ has compatibility with DJI M300, DJI M350 and DJI M30 .
19
+ DJI Matrice Series using `DJI Onboard PSDK <https://github.com/dji-sdk/Onboard-SDK >`_ has compatibility with DJI M300, DJI M350 and DJI M30T .
20
20
21
21
.. figure :: resources/DJI_M300.jpg
22
22
:scale: 15
23
23
:class: with-shadow
24
24
25
25
26
-
27
26
.. _aerial_platform_dji_matrice_psdk_installation :
28
27
29
28
------------
@@ -32,10 +31,201 @@ Installation
32
31
33
32
.. _aerial_platform_matrice_psdk_installation_prerequisites :
34
33
35
- Prerequisites
36
- =============
34
+ Prerequisites to configure any Xavier/Orin NX/AGX board to connect to PSDK, These steps are only done **once **
35
+ ==============================================================================================================
36
+ .. _aerial_platform_dji_matrice_psdk_installation_prerequisites_software_once :
37
+
38
+
39
+ Clone configuration repository to grab the necessary files
40
+ ------------------------------------------------
41
+ .. code-block :: console
42
+
43
+ cd ~
44
+ git clone [email protected] :aerostack2/psdk_config_files.git
45
+ cd psdk_config_files
46
+
47
+ Disable l4t-device-mode auto start
48
+ ----------------------------------------------
49
+
50
+ .. code-block :: console
51
+
52
+ sudo systemctl disable nv-l4t-usb-device-mode.service
53
+
54
+ Replace system device-mode script
55
+ ---------------------------------
56
+
57
+ Copy your custom startup script into place and make it executable:
58
+
59
+ .. code-block :: console
60
+
61
+ sudo cp ./nv-l4t-usb-device-mode-start.sh /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh
62
+ chmod +x ./nv-l4t-usb-device-mode-start.sh
63
+
64
+ Customize the script program
65
+ --------------------------------
66
+ You need to modify the script to use the correct USB-UDC port.
67
+
68
+ For the AGX:
69
+ .. code-block :: console
70
+
71
+ sed -i 's/3550000\.xudc/3550000.usb/g' nv-l4t-usb-device-mode-start.sh
72
+
73
+ For the NX:
74
+ .. code-block :: console
75
+
76
+ sed -i 's/3550000\.usb/3550000.xudc/g' nv-l4t-usb-device-mode-start.sh
77
+
78
+
79
+ Grab bulk-mode program folder
80
+ ------------------------------
81
+
82
+ Download and unzip the reference package into `~/Desktop/startup_bulk `:
83
+
84
+ .. code-block :: console
85
+
86
+ wget https://terra-1-g.djicdn.com/71a7d383e71a4fb8887a310eb746b47f/psdk/e-port/usb-bulk-configuration-reference.zip \
87
+ && unzip usb-bulk-configuration-reference.zip -d startup_bulk \
88
+ && mv startup_bulk/ ~/Desktop/ \
89
+ && chmod +x ~/Desktop/startup_bulk/*
90
+
91
+
92
+ Reboot
93
+ ------
94
+
95
+ Load necessary kernel modules on boot
96
+ ------------------------------------
97
+
98
+ Append to `/etc/modules ` (ensure the file remains correctly formatted):
99
+
100
+ .. code-block :: console
101
+
102
+ echo -e "configfs\nlibcomposite\nusb_f_fs\ntegra-xudc" | sudo tee -a /etc/modules
103
+
104
+ Test the setup
105
+ --------------
106
+
107
+ .. code-block :: console
108
+
109
+ cd /opt/nvidia/l4t-usb-device-mode/
110
+ ./nv-l4t-usb-device-mode-start.sh
111
+
112
+ If it works, re-enable the service
113
+ -----------------------------------
114
+
115
+ .. code-block :: console
116
+
117
+ sudo systemctl enable /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode.service
118
+
119
+ Now both bulk mode and network mode are configured.
120
+
121
+ Prerequisites to configure any Xavier/Orin NX/AGX board to connect to PSDK, These steps are only done **every time the board boots up **
122
+ =======================================================================================================================================
123
+ .. _aerial_platform_dji_matrice_psdk_installation_prerequisites_software_every_time :
124
+
125
+ M300
126
+ ----
127
+
128
+ **Hardware **
129
+ Use the Type-C port supporting both bulk and usbnet mode
130
+
131
+ - Onboard computer = host
132
+ - E-Port = device.
133
+
134
+ .. image :: resources/device_mode.jpg
135
+ :alt: E-Port in device mode
136
+
137
+ - On the AGX, connections as shown:
138
+
139
+ .. image :: resources/agx_connections.jpg
140
+ :alt: AGX USB connections
141
+
142
+ **Software **
143
+
144
+ Enable host mode on the onboard computer:
145
+
146
+ .. code-block :: console
147
+
148
+ echo host | sudo tee /sys/class/usb_role/usb2-0-role-switch/role
149
+
150
+ You should now see `/dev/ttyACM0 ` when powering on the drone.
151
+
152
+ M350
153
+ ----
154
+
155
+ **Hardware **
156
+ Use the Type-C port supporting both bulk and usbnet mode
157
+
158
+ - Onboard computer = device
159
+ - E-Port = host.
160
+
161
+ .. image :: resources/host_mode.jpg
162
+ :alt: E-Port in host mode
163
+
164
+ - On the AGX, connections as shown:
165
+
166
+ .. image :: resources/agx_connections.jpg
167
+ :alt: AGX USB connections (host)
168
+
169
+ **Software **
170
+
171
+ Enable device mode on the onboard computer:
172
+
173
+ .. code-block :: console
174
+
175
+ echo device | sudo tee /sys/class/usb_role/usb2-0-role-switch/role
176
+
177
+ Bring up the `l4tbr0 ` interface:
178
+
179
+ .. code-block :: console
180
+
181
+ sudo ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up
182
+
183
+ Then verify with:
184
+
185
+ .. code-block :: console
186
+
187
+ ifconfig
188
+
189
+ You should see an entry for `l4tbr0 `. If not, repeat the above steps.
190
+
191
+ M30T
192
+ ----
193
+
194
+ **Hardware **
195
+ Use the Type-C port supporting both bulk and usbnet mode
196
+
197
+ - Onboard computer = device
198
+ - E-Port = host.
199
+
200
+ .. image :: resources/host_mode.jpg
201
+ :alt: E-Port in host mode
202
+
203
+ - On the NX, connections as shown:
204
+
205
+ .. image :: resources/nx_connections.jpg
206
+ :alt: NX USB connections
207
+
208
+ **Software **
209
+
210
+ Enable device mode on the onboard computer:
211
+
212
+ .. code-block :: console
213
+
214
+ echo device | sudo tee /sys/class/usb_role/usb2-0-role-switch/role
215
+
216
+ Bring up the `l4tbr0 ` interface:
217
+
218
+ .. code-block :: console
219
+
220
+ sudo ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up
221
+
222
+ Then verify with:
223
+
224
+ .. code-block :: console
225
+
226
+ ifconfig
37
227
38
- Refer to the ` DJI PSDK ROS2 < https://github.com/umdlife/psdk_ros2 >`_ for the harware and software requirements .
228
+ You should see an entry for ` l4tbr0 `. If not, repeat the above steps .
39
229
40
230
41
231
.. _aerial_platform_dji_matrice_psdk_installation_package :
0 commit comments