Skip to content

Commit 8311ab1

Browse files
author
Aaron Roller
authored
Merge pull request #6 from AutoModality/AM-682/camera-stream
Added camera capabilities
2 parents a030fd1 + 8cf0111 commit 8311ab1

127 files changed

Lines changed: 3851 additions & 3186 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/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id: package
1919
uses: AutoModality/action-package-debian-ros@v5-amros
2020
with:
21-
version: 4.0.0-AM${{ github.run_number }}
21+
version: 4.1.0-AM${{ github.run_number }}
2222
- name: Deploy
2323
id: deploy
2424
uses: AutoModality/action-cloudsmith@0.2.0

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ set(DJIOSDK_PATCH_VERSION 0)
3131
set(DJIOSDK_VERSION
3232
${DJIOSDK_MAJOR_VERSION}.${DJIOSDK_MINOR_VERSION}.${DJIOSDK_PATCH_VERSION})
3333
add_definitions(-DDJIOSDK_MAJOR_VERSION=4)
34-
add_definitions(-DDJIOSDK_MINOR_VERSION=0)
34+
add_definitions(-DDJIOSDK_MINOR_VERSION=1)
3535
add_definitions(-DDJIOSDK_PATCH_VERSION=0)
3636

37-
add_definitions(-DDJIOSDK_IS_DEBUG=2)
37+
add_definitions(-DDJIOSDK_IS_DEBUG=1)
3838

3939
if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|x86|AMD64|x86_64")
4040
set(ARCH x86)

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "DJI Onboard SDK"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 4.0.1
41+
PROJECT_NUMBER = 4.1.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DJI Onboard SDK (OSDK) 4.0.1
1+
# DJI Onboard SDK (OSDK) 4.1.0
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,14 +7,14 @@
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.
10+
OSDK 4.1.0 was released on 2 February 2021.This version adds the USB reconnection function, provides some basic interface of flightcontroller and camera, and verifies that the battery module partially support the M300. Fixed some problems in waypoint V2, camera image decoding, camera file download and MOP functions. At the same time, optimized some implementations in flightcontroller and activation. For ROS, most of the interfaces included in OSDK lib but not included in ROS are added.
1111

1212
## Last Major Release
13-
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.
13+
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.
1414

1515
## Firmware Compatibility
1616

17-
This chart shows the latest firmware that were available and are supported at the time of 4.0.0 release.
17+
This chart shows the latest firmware that were available and are supported at the time of 4.1.0 release.
1818

1919
<table>
2020
<thead>
@@ -25,8 +25,8 @@ This chart shows the latest firmware that were available and are supported at th
2525
<tbody>
2626
<tr>
2727
<td>M300 RTK </td>
28-
<td>01.00.02.11</td>
29-
<td>3.4.8.56</td>
28+
<td>02.02.0102</td>
29+
<td>3.4.8.69</td>
3030
</tr>
3131
<tr>
3232
<td>M210 RTK V2</td>

osdk-core/CMakeLists.txt

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug")
4646
endif ()
4747

4848
if (COVERAGE)
49+
message(---- djiosdk-core COVERAGE MODE)
4950
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage -fPIC")
5051
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
5152
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${GCC_COVERAGE_COMPILE_FLAGS}")
@@ -88,8 +89,7 @@ include_directories(
8889
modules/inc/mop
8990
platform/inc
9091
logger/inc
91-
utility/inc
92-
linker/${ARCH}/inc)
92+
utility/inc)
9393

9494
## Source code for OSDK CORE
9595
FILE(GLOB OSDK_LIB_SRCS
@@ -104,7 +104,26 @@ FILE(GLOB OSDK_LIB_SRCS
104104
logger/src/*.cpp
105105
utility/src/*.cpp)
106106

107-
link_libraries(${CMAKE_CURRENT_SOURCE_DIR}/linker/${ARCH}/lib/libdji-linker.a)
107+
if(LINKER_DEBUG)
108+
message("-- Internal linker source debug")
109+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker)
110+
include_directories(
111+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker
112+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core
113+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/channel
114+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/command
115+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/logger
116+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/mop
117+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/mop/mop_core/inc
118+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/platform
119+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/protocol
120+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/root_task
121+
${CMAKE_CURRENT_SOURCE_DIR}/sdk-linker/core/utils/inc)
122+
link_libraries(dji-linker)
123+
else()
124+
include_directories(linker/${ARCH}/inc)
125+
link_libraries(${CMAKE_CURRENT_SOURCE_DIR}/linker/${ARCH}/lib/libdji-linker.a)
126+
endif()
108127

109128
add_library(${PROJECT_NAME}
110129
STATIC
@@ -128,6 +147,10 @@ set(ADVANCED_SENSING_HEADERS_DIR
128147
## Append to this variable when you want a dependency to get propagated
129148
SET(OSDK_INTERFACE_LIBS pthread) # pthread is assumed available on linux
130149

150+
if (COVERAGE)
151+
set(OSDK_INTERFACE_LIBS ${OSDK_INTERFACE_LIBS} gcov)
152+
endif()
153+
131154
## Modules to link/build against
132155
## Append to these variables with build/install locations when adding new OSDK modules
133156
SET(MODULE_BUILD_INTERFACE "")

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,22 @@ class AdvancedSensing {
126126
* @param userData user data (void ptr)
127127
*/
128128
void subscribeFrontStereoVGA(const uint8_t freq, VehicleCallBack callback = 0, UserData userData = 0);
129+
130+
/*! @brief subscribe to VGA (480x640) front stereo images at 10 or 20 fps AutoModality's Version
131+
*
132+
* @platforms M210V2, M300
133+
* @param frequency of images using enum from AdvancedSensingProtocol::FREQ
134+
* @param callback callback function
135+
* @param userData user data (void ptr)
136+
* @param camera_select
137+
* 1 ---------------------> front
138+
* 2 ---------------------> left
139+
* 3 ---------------------> right
140+
* 4 ---------------------> rear
141+
* 5 ---------------------> down
142+
* 6 ---------------------> up
143+
*/
144+
void subscribeFrontStereoVGA(const uint8_t freq, int camera_select, VehicleCallBack callback = 0, UserData userData = 0);
129145
/*! @brief subscribe to QVGA (240x320) stereo depth map at 10 fps
130146
*
131147
* @platforms M210V2
@@ -145,6 +161,19 @@ class AdvancedSensing {
145161
* @platforms M210V2, M300
146162
*/
147163
void unsubscribeVGAImages();
164+
165+
/*!
166+
* @brief unsubscribe to VGA (480x640) stereo images AutoModality's Version
167+
*
168+
* @platforms M210V2, M300
169+
* 1 ---------------------> front
170+
* 2 ---------------------> left
171+
* 3 ---------------------> right
172+
* 4 ---------------------> rear
173+
* 5 ---------------------> down
174+
* 6 ---------------------> up
175+
*/
176+
void unsubscribeVGAImages(int camera_select);
148177
/*! @brief
149178
*
150179
* A default callback function for QVGA stereo images

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

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,10 @@ class LiveViewImpl {
6060
private:
6161

6262
typedef enum E_OSDKCameraType {
63-
OSDK_CAMERA_TYPE_FC350 = 0,
64-
OSDK_CAMERA_TYPE_FC550 = 1,
65-
OSDK_CAMERA_TYPE_FC260 = 2,
66-
OSDK_CAMERA_TYPE_FC300S = 3,
67-
OSDK_CAMERA_TYPE_FC300X = 4,
68-
OSDK_CAMERA_TYPE_FC550RAW = 5,
69-
OSDK_CAMERA_TYPE_FC330 = 6,
70-
OSDK_CAMERA_TYPE_TAU640 = 7, //XT_640
71-
OSDK_CAMERA_TYPE_TAU336 = 8, //XT_336
72-
OSDK_CAMERA_TYPE_FC220 = 9,
73-
OSDK_CAMERA_TYPE_FC300XW = 10,
74-
OSDK_CAMERA_TYPE_CV600 = 11, //3.5X
75-
OSDK_CAMERA_TYPE_FC65XX = 12,
76-
OSDK_CAMERA_TYPE_FC6310 = 13,
77-
OSDK_CAMERA_TYPE_FC6510 = 14,
78-
OSDK_CAMERA_TYPE_FC6520 = 15,
79-
OSDK_CAMERA_TYPE_FC6532 = 16,
80-
OSDK_CAMERA_TYPE_FC6540 = 17,
81-
OSDK_CAMERA_TYPE_FC220L = 18,
82-
OSDK_CAMERA_TYPE_FC1102 = 19,
83-
OSDK_CAMERA_TYPE_GD600 = 20, //30X, Z30
84-
OSDK_CAMERA_TYPE_FC6310A = 21,
85-
OSDK_CAMERA_TYPE_FC300SE = 22,
86-
OSDK_CAMERA_TYPE_WM230 = 23,
87-
OSDK_CAMERA_TYPE_FC1705 = 26, //XT2
8863
OSDK_CAMERA_TYPE_PSDK = 31,
8964
OSDK_CAMERA_TYPE_FPV = 39, //Matrice FPV
90-
OSDK_CAMERA_TYPE_TP1810 = 41, //XTS
91-
OSDK_CAMERA_TYPE_GD610_DOUBLE_CAM = 42,
92-
OSDK_CAMERA_TYPE_GD610_TIRPLE_CAM = 43, //IR
65+
OSDK_CAMERA_TYPE_H20_DOUBLE_CAM = 42,
66+
OSDK_CAMERA_TYPE_H20_TIRPLE_CAM = 43, //IR
9367
OSDK_CAMERA_TYPE_UNKNOWN = 0xFF
9468
} E_OSDKCameraType;
9569

0 commit comments

Comments
 (0)