Skip to content

Commit a030fd1

Browse files
author
Aaron Roller
authored
Updated to 4.0.1 from DJI
2 parents e57e00e + f2a573a commit a030fd1

344 files changed

Lines changed: 7072 additions & 2053 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/package.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-18.04, [arm64,self-hosted,linux, build]]
11+
os: [[x64,self-hosted,linux, build], [arm64,self-hosted,linux, build]]
1212
fail-fast: false
1313
steps:
1414
- uses: AutoModality/action-clean@v1.1.0
1515
- uses: actions/checkout@v2
16-
- uses: rlespinasse/github-slug-action@2.0.0 # for GITHUB_REF_SLUG
16+
- uses: rlespinasse/github-slug-action@3.1.0 # for GITHUB_REF_SLUG
1717
- name: Package
1818
id: package
19-
uses: AutoModality/action-package-debian-ros@v3
19+
uses: AutoModality/action-package-debian-ros@v5-amros
2020
with:
2121
branch: ${{ env.GITHUB_REF_SLUG }}
2222
build-number: ${{ github.run_number }}
@@ -45,12 +45,3 @@ jobs:
4545
with:
4646
pr_draft: true
4747
github_token: ${{ secrets.GITHUB_TOKEN }}
48-
# code-format:
49-
# runs-on: ubuntu-18.04
50-
# needs: package
51-
# steps:
52-
# - uses: actions/checkout@v2
53-
# - name: Format Code
54-
# uses: AutoModality/action-ros-clang-format@master
55-
# env:
56-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-18.04, [arm64,self-hosted,linux, build]]
11+
os: [[x64,self-hosted,linux, build], [arm64,self-hosted,linux, build]]
1212
fail-fast: false
1313
name: Package
1414
steps:
1515
- uses: AutoModality/action-clean@v1.1.0
1616
- uses: actions/checkout@v2
1717
- name: Package
1818
id: package
19-
uses: AutoModality/action-package-debian-ros@v3
19+
uses: AutoModality/action-package-debian-ros@v5-amros
2020
with:
2121
version: 4.0.0-AM${{ github.run_number }}
2222
- name: Deploy

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,5 @@ cmake-build-debug
5959
.history
6060
am-onboard-sdk-build-deps_*_all.deb
6161
debian/am-onboard-sdk*
62-
debian/.debhelper/
62+
debian/.debhelper/
63+
debian/dji-onboard-sdk*

Doxyfile

Lines changed: 424 additions & 200 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DJI Onboard SDK (OSDK) 4.0.0
1+
# DJI Onboard SDK (OSDK) 4.0.1
22

33
[![Join the chat at https://gitter.im/dji-sdk/Onboard-SDK](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dji-sdk/Onboard-SDK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

@@ -7,6 +7,9 @@
77
The DJI Onboard SDK allows you to connect your own Onboard Computer to a [supported](https://developer.dji.com/onboard-sdk/documentation/purchaseguide/hardware.html) DJI vehicle or flight controller using a serial port (TTL UART). For full documentation, please visit the [DJI Developer Documentation](https://developer.dji.com/onboard-sdk/documentation/). Documentation regarding the code can be found in the [OSDK API Reference](https://developer.dji.com/onboard-api-reference/index.html) section of the developer's website.
88

99
## Latest Release
10+
OSDK 4.0.1 was released on 21 August 2020. This version mainly fixes OSDK 4.0.0 issues, such as camera stream related problems, download function optimization, MOP optimization, waypoint 2.0 problems repair, etc. At the same time, we also add an automatic code porting script to assist the porting of FreeRTOS.
11+
12+
## Last Major Release
1013
OSDK 4.0.0 was released on 8 May 2019. New APIs about flight controller such as home point setting, confirm landing, some function switches are supported in the version. For the payload device, more APIs about camera functions and parameters are added in the version. Please see the [release notes](https://developer.dji.com/onboard-sdk/downloads/) for more information.
1114

1215
## Firmware Compatibility
@@ -22,18 +25,18 @@ This chart shows the latest firmware that were available and are supported at th
2225
<tbody>
2326
<tr>
2427
<td>M300 RTK </td>
25-
<td>01.00.01.07</td>
26-
<td>3.4.8.16</td>
28+
<td>01.00.02.11</td>
29+
<td>3.4.8.56</td>
2730
</tr>
2831
<tr>
2932
<td>M210 RTK V2</td>
30-
<td>01.00.0670</td>
31-
<td>3.4.3.37</td>
33+
<td>01.00.0710</td>
34+
<td>3.4.3.44</td>
3235
</tr>
3336
<tr>
3437
<td>M210 V2</td>
35-
<td>01.00.0670</td>
36-
<td>3.4.3.37</td>
38+
<td>01.00.0710</td>
39+
<td>3.4.3.44</td>
3740
</tr>
3841

3942
</tbody>

debian/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
3# Packaging Onboard-SDK-4.0
1+
# Packaging Onboard-SDK-4.0
22

33
* The goal is to make as few custom changes to this repository as possible.
44
* Consider making custom changes to one of our repos that extends this library.
55
* We forked this repository so we could provide debian binary packages for easy and consistent distributions.
66

7+
Updating from DJI's origin is encouraged. Branch from our master, then pull from their tag that you wish to merge.
8+
79
Changes are currently found under two directories introduced by AM:
810

911
* debian/
@@ -25,13 +27,16 @@ Let's keep it that way.
2527

2628
### ARM 64 Builder
2729

28-
We provide self hosted runners to build our ARM binaries, however, this can cause a [security threat](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories).
30+
We provide self hosted runners to build our AMD and ARM binaries, however, this can cause a [security threat](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories).
2931
For this reason, we only bring up the self hosted runner manually when builds need to happen, which should be rare.
3032
Organization action runners will not satisfy requirements since Github restricts such from the Org level, but allows at the repo level where we can apply granualar control.
3133

32-
1. `ssh nvidia@192.168.4.135`
33-
1. `/media/nvidia/build/actions-runners/Onboard-SDK-4.0/run.sh`
34+
1. `ssh resource@flops2` (password in Rpass)
35+
1. `/usr/lib/github/actions-runners/flops2-onboard-sdk-4.0/run.sh`
3436
1. You should see `√ Connected to GitHub` and `Listening for Jobs`
35-
1. You should see `arm-builder` available in the [repo's actions](https://github.com/AutoModality/Onboard-SDK-4.0/settings/actions)
37+
1. You should see `flops2` available in the [repo's actions](https://github.com/AutoModality/Onboard-SDK-4.0/settings/actions)
3638
1. Any queues actions should be processed.
3739

40+
Repeat the steps above with `arm-builder-2`.
41+
42+
See [Github Actions Wiki](https://automodality.atlassian.net/wiki/spaces/AMROS/pages/758382915/Continuous+Integration+with+Github+Actions#FLOPS-AMD-Builders) for more information about builders.

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dji-onboard-sdk (123) unstable; urgency=medium
1+
dji-onboard-sdk (0.0.0) unstable; urgency=medium

debian/rules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
1414

1515
override_dh_auto_configure:
1616
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DADVANCED_SENSING:BOOL=ON
17+
18+
override_dh_builddeb:
19+
dh_builddeb --destdir=.
20+
21+
override_dh_auto_clean:
22+
dh_auto_clean
23+
rm -f *.*deb
24+
rm -rf obj-*

osdk-core/advanced-sensing/api/inc/dji_advanced_sensing.hpp

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*! @file dji_advanced_sensing.hpp
2-
* @version 3.4.0
2+
* @version 4.0.0
33
* @date Dec 2017
44
*
55
*
@@ -109,27 +109,40 @@ class AdvancedSensing {
109109
void init();
110110

111111
void deinit();
112-
112+
/*! @brief subscribe to 240p stereo images at 20 fps
113+
*
114+
* @platforms M210V2
115+
* @param select the choice of the image direction, ref to
116+
* AdvancedSensing::ImageSelection
117+
* @param callback callback function
118+
* @param userData user data (void ptr)
119+
*/
113120
void subscribeStereoImages(const ImageSelection *select, VehicleCallBack callback = 0, UserData userData = 0);
114121
/*! @brief subscribe to VGA (480x640) front stereo images at 10 or 20 fps
115122
*
123+
* @platforms M210V2, M300
116124
* @param frequency of images using enum from AdvancedSensingProtocol::FREQ
117125
* @param callback callback function
118126
* @param userData user data (void ptr)
119127
*/
120128
void subscribeFrontStereoVGA(const uint8_t freq, VehicleCallBack callback = 0, UserData userData = 0);
121129
/*! @brief subscribe to QVGA (240x320) stereo depth map at 10 fps
122130
*
131+
* @platforms M210V2
123132
* @param callback callback function
124133
* @param userData user data (void ptr)
125134
*/
126135
void subscribeFrontStereoDisparity(VehicleCallBack callback = 0, UserData userData = 0);
127136
/*!
128-
* @brief unsubscribe to QVGA (240x320) stereo depth map or images
137+
* @brief unsubscribe to QVGA (240x320) stereo depth map or images
138+
*
139+
* @platforms M210V2, M300
129140
*/
130141
void unsubscribeStereoImages();
131142
/*!
132-
* @brief unsubscribe to VGA (480x640) stereo images
143+
* @brief unsubscribe to VGA (480x640) stereo images
144+
*
145+
* @platforms M210V2, M300
133146
*/
134147
void unsubscribeVGAImages();
135148
/*! @brief
@@ -154,6 +167,7 @@ class AdvancedSensing {
154167
*
155168
* Start the FPV Camera Stream
156169
*
170+
* @platforms M210V2, M300
157171
* @param cb callback function that is called in a callback thread when a new
158172
* image is received and decoded
159173
* @param cbParam a void pointer that users can manipulate inside the callback
@@ -164,6 +178,7 @@ class AdvancedSensing {
164178
*
165179
* Start the Main Camera Stream
166180
*
181+
* @platforms M210V2, M300
167182
* @param cb callback function that is called in a callback thread when a new
168183
* image is received and decoded
169184
* @param cbParam a void pointer that users can manipulate inside the callback
@@ -172,35 +187,45 @@ class AdvancedSensing {
172187
bool startMainCameraStream(CameraImageCallback cb = NULL, void * cbParam = NULL);
173188
/*! @brief
174189
*
175-
* Stop the FPV Camera Stream
190+
* Set the ACM device path, mainly for M210V2
191+
*
192+
* @platforms M210V2
176193
*/
177-
178194
void setAcmDevicePath(const char *acm_path);
179195

180196
/*! @brief
181197
*
182198
* Stop the FPV RGB Stream
199+
*
200+
* @platforms M210V2, M300
183201
*/
184202
void stopFPVCameraStream();
185203

186204
/*! @brief
187205
*
188206
* Stop the Main Camera RGB Stream
207+
*
208+
* @platforms M210V2, M300
189209
*/
190210
void stopMainCameraStream();
191211
/*! @brief Check if a new image from the FPV camera is received
212+
*
213+
* @platforms M210V2, M300
192214
*
193215
* @return true if a new image frame is ready, false otherwise
194216
*/
195217
bool newFPVCameraImageIsReady();
196218
/*! @brief Check if a new image from the main camera is received
219+
*
220+
* @platforms M210V2, M300
197221
*
198222
* @return true if a new image frame is ready, false otherwise
199223
*/
200224
bool newMainCameraImageReady();
201225
/*! @brief Get a copy of the new image from the FPV camera
202226
*
203-
* @param A copy of the new available image will be put here.
227+
* @platforms M210V2, M300
228+
* @param copyOfImage A copy of the new available image will be put here.
204229
* It is safe for user to manipulate this image.
205230
* @note If a new image is not ready upon calling this function,
206231
* it will wait for 30ms till timeout.
@@ -210,6 +235,7 @@ class AdvancedSensing {
210235
bool getFPVCameraImage(CameraRGBImage& copyOfImage);
211236
/*! @brief Get a copy of the new image from the main camera
212237
*
238+
* @platforms M210V2, M300
213239
* @param A copy of the new available image will be put here.
214240
* It is safe for user to manipulate this image.
215241
* @note If a new image is not ready upon calling this function,
@@ -219,11 +245,25 @@ class AdvancedSensing {
219245
*/
220246
bool getMainCameraImage(CameraRGBImage& copyOfImage);
221247

248+
/*! @brief
249+
* Change the camera stream source from one payload device. (Beta API)
250+
*
251+
* @platforms M300
252+
* @note Only support for payload device : H20/H20T
253+
* @param pos point out which camera to output the H264 stream
254+
* @param source change to be the target camera of the payload, ref to
255+
* LiveView::LiveViewCameraSource
256+
* @return Errorcode of liveivew, ref to DJI::OSDK::LiveView::LiveViewErrCode
257+
*/
258+
LiveView::LiveViewErrCode changeH264Source(LiveView::LiveViewCameraPosition pos,
259+
LiveView::LiveViewCameraSource source);
260+
222261
/*! @brief
223262
*
224263
* Start the FPV or Camera H264 Stream
225264
*
226-
* @note For M210 V2 series, only OSDK_CAMERA_POSITION_NO_1 and
265+
* @platforms M210V2, M300
266+
* @note For M210 V2 series, only OSDK_CAMERA_POSITION_NO_1 and
227267
* OSDK_CAMERA_POSITION_FPV are supported.
228268
* @note For M300, all the poss are supported.
229269
* @param pos point out which camera to output the H264 stream
@@ -237,6 +277,8 @@ class AdvancedSensing {
237277
/*! @brief
238278
*
239279
* Stop the FPV or Camera H264 Stream
280+
*
281+
* @platforms M210V2, M300
240282
* @note For M210 V2 series, only OSDK_CAMERA_POSITION_NO_1 and
241283
* OSDK_CAMERA_POSITION_FPV are supported.
242284
* @note For M300, all the poss are supported.
@@ -249,6 +291,7 @@ class AdvancedSensing {
249291
*
250292
* Subscribe the perception camera image stream (Only for M300 series)
251293
*
294+
* @platforms M300
252295
* @param direction point out which direction's stream need to be subscribed
253296
* @param cb callback function that is called in a callback thread when a
254297
* perception image frame is received
@@ -261,6 +304,7 @@ class AdvancedSensing {
261304
*
262305
* Unsubscribe the perception camera image stream (Only for M300 series)
263306
*
307+
* @platforms M300
264308
* @param direction point out which direction's stream need to be unsubscribed
265309
* @return Errorcode of liveivew, ref to DJI::OSDK::LiveView::LiveViewErrCode
266310
*/
@@ -271,6 +315,7 @@ class AdvancedSensing {
271315
* Trigger the perception parameters to be passed to the callback which is
272316
* registered by DJI::OSDK::Perception::setStereoCamParamsObserver. (Only for M300 series)
273317
*
318+
* @platforms M300
274319
* @return Errorcode of liveivew, ref to DJI::OSDK::LiveView::LiveViewErrCode
275320
*/
276321
Perception::PerceptionErrCode triggerStereoCamParamsPushing();
@@ -279,6 +324,7 @@ class AdvancedSensing {
279324
*
280325
* Set the callback to catch the perception camera parameters. (Only for M300 series)
281326
*
327+
* @platforms M300
282328
* @note The callback will be triggered by calling
283329
* DJI::OSDK::Perception::triggerStereoCamParamsPushing() or when the parameters of
284330
* perception cameras are refreshed.

0 commit comments

Comments
 (0)