Skip to content

Commit b8f8df4

Browse files
authored
Merge pull request #80 from orbbec/main
release1.10.2
2 parents 1b732de + af3559c commit b8f8df4

File tree

15 files changed

+151
-102
lines changed

15 files changed

+151
-102
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
## Change Log
22

3+
# release v1.10.1
4+
1.adjust imu queue default size;
5+
2.adapt to image related Interface;
6+
3.remove excess compilation items;
7+
4.palyback pre-init ob_context;
8+
5.adjust the order of IMU starting;
9+
6.adapt to mega-i device;
10+
7.update orbbecsdk version to last.
11+
312
# release v1.10.1
413
1. update orbbecsdk version to v1.10.5.
514

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ endif()
190190

191191
add_subdirectory(examples)
192192
add_subdirectory(src)
193-
add_subdirectory(tests)
193+
# add_subdirectory(tests)
194194
add_subdirectory(tools)
195195

196196
if (K4A_BUILD_DOCS)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ git submodule update --init --recursive
152152
153153
## Versioning
154154
155-
| **products list** | **firmware version** |**platform**|
156-
| --- | --- | --- |
157-
| Orbbec Femto Bolt | 1.0.6/1.0.9/1.1.1 |Windows10+, Ubuntu18.04+ |
158-
| Orbbec Femto Mega | 1.1.5/1.1.7/1.2.8 |Windows10+, Ubuntu20.04+ |
155+
| **products list** | **firmware version** |**windows platform**|**linux platform**|
156+
| --- | --- | --- | --- |
157+
| Orbbec Femto Bolt | 1.0.6/1.0.9/1.1.1 |Windows10, Windows11 | Ubuntu18.04, Ubuntu20.04, Ubuntu22.04|
158+
| Orbbec Femto Mega | 1.1.5/1.1.7/1.2.8 |Windows10, Windows11 | Ubuntu20.04, Ubuntu22.04|
159159
160160
161161
## Testing

README_PUBLIC.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# release v1.10.1
2-
## Change List
3-
1. update orbbecsdk version to v1.10.5.
2+
1.adjust imu queue default size;
3+
2.adapt to image related Interface;
4+
3.remove excess compilation items;
5+
4.palyback pre-init ob_context;
6+
5.adjust the order of IMU starting;
7+
6.adapt to mega-i device;
8+
7.update orbbecsdk version to last.
49

510
## Product support
611
| **products list** | **firmware version** |**platform**|

examples/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ if (OpenCV_FOUND)
2525
file(COPY ${OpenCV_DIR}/../bin/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} FILES_MATCHING PATTERN "*.dll")
2626
endif ()
2727
endif ()
28+
29+
install(TARGETS streaming_samples transformation_example viewer_opengl calibration_info fastpointcloud
30+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
31+
COMPONENT samples
32+
)

include/k4a/k4a.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern "C" {
2222

2323
#define WRAPPER_VERSION_MAJOR 1
2424
#define WRAPPER_VERSION_MINOR 10
25-
#define WRAPPER_VERSION_PATCH 1
25+
#define WRAPPER_VERSION_PATCH 2
2626

2727
/**
2828
* \defgroup Functions Functions

src/CMakeLists.txt

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,57 @@ if(${BUILD_OB_K4A_WRAPPER})
55
# Consumers of this include directory need to #include "k4ainternal/header.h"
66
set(K4A_PRIV_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../include ${CMAKE_CURRENT_BINARY_DIR}/orbbec/include)
77
add_subdirectory(orbbec)
8+
9+
# Add folders in Alphabetical order to help reduce merge issues
10+
add_subdirectory(allocator)
11+
add_subdirectory(calibration)
12+
# add_subdirectory(capturesync)
13+
# add_subdirectory(color)
14+
# add_subdirectory(color_mcu)
15+
# add_subdirectory(depth)
16+
# add_subdirectory(depth_mcu)
17+
add_subdirectory(deloader)
18+
# add_subdirectory(dewrapper)
19+
add_subdirectory(dynlib)
20+
add_subdirectory(global)
21+
# add_subdirectory(image)
22+
# add_subdirectory(imu)
23+
add_subdirectory(logging)
24+
add_subdirectory(math)
25+
add_subdirectory(queue)
26+
add_subdirectory(rwlock)
27+
add_subdirectory(tewrapper)
28+
# add_subdirectory(transformation)
29+
# add_subdirectory(usbcommand)
830
else()
931
# Consumers of this include directory need to #include "k4ainternal/header.h"
1032
set(K4A_PRIV_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../include ${CMAKE_CURRENT_BINARY_DIR}/sdk/include)
1133
add_subdirectory(sdk)
1234
add_subdirectory(firmware)
35+
36+
# Add folders in Alphabetical order to help reduce merge issues
37+
add_subdirectory(allocator)
38+
add_subdirectory(calibration)
39+
add_subdirectory(capturesync)
40+
add_subdirectory(color)
41+
add_subdirectory(color_mcu)
42+
add_subdirectory(depth)
43+
add_subdirectory(depth_mcu)
44+
add_subdirectory(deloader)
45+
add_subdirectory(dewrapper)
46+
add_subdirectory(dynlib)
47+
add_subdirectory(global)
48+
add_subdirectory(image)
49+
add_subdirectory(imu)
50+
add_subdirectory(logging)
51+
add_subdirectory(math)
52+
add_subdirectory(queue)
53+
add_subdirectory(rwlock)
54+
add_subdirectory(tewrapper)
55+
add_subdirectory(transformation)
56+
add_subdirectory(usbcommand)
1357
endif()
1458

15-
# Add folders in Alphabetical order to help reduce merge issues
16-
add_subdirectory(allocator)
17-
add_subdirectory(calibration)
18-
add_subdirectory(capturesync)
19-
add_subdirectory(color)
20-
add_subdirectory(color_mcu)
21-
add_subdirectory(depth)
22-
add_subdirectory(depth_mcu)
23-
add_subdirectory(deloader)
24-
add_subdirectory(dewrapper)
25-
add_subdirectory(dynlib)
26-
add_subdirectory(global)
27-
add_subdirectory(image)
28-
add_subdirectory(imu)
29-
add_subdirectory(logging)
30-
add_subdirectory(math)
31-
add_subdirectory(queue)
32-
add_subdirectory(rwlock)
33-
add_subdirectory(tewrapper)
34-
add_subdirectory(transformation)
35-
add_subdirectory(usbcommand)
59+
60+
3661

src/allocator/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
add_library(k4a_allocator STATIC
4+
add_library(k4a_allocator STATIC
55
allocator.c
66
)
77

88
# Consumers should #include <k4ainternal/allocator.h>
9-
target_include_directories(k4a_allocator PUBLIC
9+
target_include_directories(k4a_allocator PUBLIC
1010
${K4A_PRIV_INCLUDE_DIR})
1111

1212
# Dependencies of this library
13-
target_link_libraries(k4a_allocator PUBLIC
13+
target_link_libraries(k4a_allocator PUBLIC
1414
azure::aziotsharedutil
15-
k4ainternal::image
1615
k4ainternal::logging)
1716

1817
# Define alias for other targets to link against

src/orbbec/CMakeLists.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ add_subdirectory(record)
66
add_subdirectory(frame_queue)
77
add_subdirectory(imu_sync)
88

9+
set(TRANSFORMATION_PATH ${CMAKE_SOURCE_DIR}/src/transformation)
10+
set(TRANSFORMATION_SOURCES
11+
${TRANSFORMATION_PATH}/extrinsic_transformation.c
12+
${TRANSFORMATION_PATH}/intrinsic_transformation.c
13+
${TRANSFORMATION_PATH}/mode_specific_calibration.c
14+
${TRANSFORMATION_PATH}/rgbz.c
15+
${TRANSFORMATION_PATH}/transformation.c
16+
)
17+
918
# Create K4A library
1019
add_library(k4a SHARED
1120
ob_k4a_impl.cpp
1221
dll_main.c
1322
ob_type_helper.cpp
14-
${CMAKE_CURRENT_BINARY_DIR}/version.rc)
23+
${CMAKE_CURRENT_BINARY_DIR}/version.rc
24+
${TRANSFORMATION_SOURCES})
1525

1626
if(CACHE_OB_CONTEXT)
1727
target_compile_definitions(k4a PRIVATE -DCACHE_OB_CONTEXT)
@@ -62,12 +72,15 @@ find_package(OrbbecSDK REQUIRED)
6272
# Link in libraries
6373
target_link_libraries(k4a PRIVATE
6474
k4ainternal::calibration
65-
k4ainternal::transformation
75+
# k4ainternal::transformation
6676
k4ainternal::logging
6777
k4ainternal::queue
6878
k4ainternal::frame_queue
6979
k4ainternal::imusync
7080
OrbbecSDK::OrbbecSDK
81+
k4ainternal::math
82+
k4ainternal::deloader
83+
k4ainternal::tewrapper
7184
)
7285

7386
# Define alias for k4a
@@ -168,20 +181,8 @@ file(COPY ${OrbbecSDK_RUNTIME_RESOURCE_FILES} DESTINATION ${K4A_OUTPUT_DIR}/)
168181

169182
if(WIN32)
170183
install(FILES ${OrbbecSDK_DLL_FILES} DESTINATION ${CMAKE_INSTALL_BINDIR})
171-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/transformation_example.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
172-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/streaming_samples.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
173-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/viewer_opengl.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
174-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/calibration_info.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
175-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/fastpointcloud.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
176-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/viewer_opengl.exe DESTINATION ${CMAKE_INSTALL_BINDIR})
177184
else()
178185
install(FILES ${OrbbecSDK_DLL_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR})
179-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/transformation_example DESTINATION ${CMAKE_INSTALL_BINDIR})
180-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/streaming_samples DESTINATION ${CMAKE_INSTALL_BINDIR})
181-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/viewer_opengl DESTINATION ${CMAKE_INSTALL_BINDIR})
182-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/calibration_info DESTINATION ${CMAKE_INSTALL_BINDIR})
183-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/fastpointcloud DESTINATION ${CMAKE_INSTALL_BINDIR})
184-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/viewer_opengl DESTINATION ${CMAKE_INSTALL_BINDIR})
185186
endif()
186187

187188
install(FILES ${OrbbecSDK_RUNTIME_RESOURCE_FILES} DESTINATION ${CMAKE_INSTALL_BINDIR})

src/orbbec/OrbbecSDK

Submodule OrbbecSDK updated 862 files

src/orbbec/imu_sync/imusync.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

44
// This library
@@ -17,7 +17,7 @@
1717
#include <stdlib.h>
1818
#include <stdbool.h>
1919

20-
#define IMU_QUEUE_DEFAULT_SIZE 10
20+
#define IMU_QUEUE_DEFAULT_SIZE 26
2121

2222
#define IMU_GRAVITATIONAL_CONSTANT 9.81f
2323

@@ -27,8 +27,8 @@
2727
typedef struct _imusync_context_t
2828
{
2929
frame_queue_t sync_queue; // Queue for storing synchronized captures in
30-
frame_queue_t accel_queue;
31-
frame_queue_t gyro_queue;
30+
frame_queue_t accel_queue;
31+
frame_queue_t gyro_queue;
3232

3333
volatile bool running; // We have received start and should be processing data when true.
3434
LOCK_HANDLE lock;
@@ -61,21 +61,21 @@ void imusync_push_frame(imusync_t imusync_handle, imu_frame_data imu_data, imu_d
6161
sync = imusync_t_get_context(imusync_handle);
6262
result = K4A_RESULT_FROM_BOOL(sync != NULL);
6363
}
64-
64+
6565
if (K4A_SUCCEEDED(result))
6666
{
6767
Lock(sync->lock);
6868
locked = true;
6969
result = sync->running == true ? K4A_RESULT_SUCCEEDED : K4A_RESULT_FAILED;
7070
}
71-
71+
7272
if (K4A_SUCCEEDED(result))
7373
{
74-
// TODO: 使用内存池管理
74+
// TODO: using memory pool management
7575
imu_sync_frame_data *p_imu_frame_data = (imu_sync_frame_data *)malloc(sizeof(imu_sync_frame_data));
7676
p_imu_frame_data->temp = imu_data.temp;
7777
p_imu_frame_data->timestamp = imu_data.timestamp;
78-
78+
7979
if (imu_type == ACCEL_FRAME_TYPE)
8080
{
8181
memcpy(p_imu_frame_data->accel_data, imu_data.data, sizeof(imu_data.data));
@@ -87,7 +87,7 @@ void imusync_push_frame(imusync_t imusync_handle, imu_frame_data imu_data, imu_d
8787
frame_queue_push(sync->gyro_queue, (k4a_capture_t)p_imu_frame_data);
8888
}
8989

90-
//2.取队列头节点
90+
//2. retrieve queue header nodes
9191
k4a_capture_t accel_data = get_frame_queue_front(sync->accel_queue);
9292
k4a_capture_t gyro_data = get_frame_queue_front(sync->gyro_queue);
9393
if (accel_data != NULL && gyro_data != NULL)
@@ -96,7 +96,7 @@ void imusync_push_frame(imusync_t imusync_handle, imu_frame_data imu_data, imu_d
9696
imu_sync_frame_data *p_gyro_data = (imu_sync_frame_data *)gyro_data;
9797
if (p_accel_data->timestamp == p_gyro_data->timestamp)
9898
{
99-
//合成一个Imu,push到同步队列
99+
// Synthesize an Imu and push it to the synchronization queue
100100
imu_sync_frame_data *p_imu_sync_frame_data = (imu_sync_frame_data *) malloc(sizeof(imu_sync_frame_data));
101101

102102
p_imu_sync_frame_data->timestamp = p_accel_data->timestamp;
@@ -284,16 +284,15 @@ k4a_wait_result_t imusync_get_frame(imusync_t imusync_handle, k4a_imu_sample_t *
284284
capture->acc_timestamp_usec = p_imu_sync_frame_data->timestamp;
285285
capture->gyro_timestamp_usec = p_imu_sync_frame_data->timestamp;
286286
capture->temperature = p_imu_sync_frame_data->temp;
287-
//单位转换 g to m/s/s
287+
// Unit conversion g to m/s/s
288288
capture->acc_sample.xyz.x = (float)(p_imu_sync_frame_data->accel_data[0] );
289289
capture->acc_sample.xyz.y = (float)(p_imu_sync_frame_data->accel_data[1] );
290290
capture->acc_sample.xyz.z = (float)(p_imu_sync_frame_data->accel_data[2] );
291291

292-
293292
capture->gyro_sample.xyz.x = (float)(p_imu_sync_frame_data->gyro_data[0] );
294293
capture->gyro_sample.xyz.y = (float)(p_imu_sync_frame_data->gyro_data[1] );
295294
capture->gyro_sample.xyz.z = (float)(p_imu_sync_frame_data->gyro_data[2] );
296-
295+
297296
}
298297

299298
free_imu_buff(capture_handle);

0 commit comments

Comments
 (0)