Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge DDS to development #12008

Merged
merged 940 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
940 commits
Select commit Hold shift + click to select a range
5e3d0a0
remove check for null after make_shared (will throw)
maloel Mar 13, 2023
f05d7c9
CR fixes
maloel Mar 13, 2023
8f3c463
PR #11560 from Eran: dds stream threading & participant send/receive …
maloel Mar 13, 2023
be1e405
add rsutils::deferred
maloel Mar 14, 2023
d0ce810
change archive to move additional_data
maloel Mar 14, 2023
bb279a3
restructure on_xxx_frame for overriding
maloel Mar 14, 2023
49e3c82
dds custom on_video_frame using frame.data
maloel Mar 14, 2023
b7156ce
add dds-topic-reader::stop()
maloel Mar 16, 2023
a76ac15
thread-based (rather than dispatcher-) dds-topic-reader-thread
maloel Mar 16, 2023
97d7dfb
replace device-watcher dispatcher with reader-thread
maloel Mar 16, 2023
b011d48
don't stop dds watcher when devices are removed
maloel Mar 16, 2023
f781e53
disable dds in run-unit-tests
maloel Mar 16, 2023
e296f75
misc
maloel Mar 16, 2023
094ff52
PR #11580 from Eran: Threading optimizations in DDS
maloel Mar 19, 2023
610e03a
PR #11561 from Eran: add dds custom on-video-frame to avoid data copy
maloel Mar 19, 2023
35ebe37
Merge remote-tracking branch 'origin/development' into dev2dds
maloel Mar 19, 2023
1773139
erase_metadata
maloel Mar 15, 2023
50d0b92
PR #11583 from Eran: merge dev -> dds
maloel Mar 19, 2023
2646a53
remove third-party/json.hpp & json_fwd.hpp
maloel Mar 20, 2023
8e66043
add json as external project
maloel Mar 20, 2023
265f6f2
rsutils/json.h includes nlohmann/json.hpp
maloel Mar 20, 2023
e1904d7
add pybind11_json
maloel Mar 20, 2023
366703f
replace all third-party/json with nlohmann/json
maloel Mar 20, 2023
dd37915
missing includes
maloel Mar 20, 2023
80240b1
PR #11587 from Eran: external json & pybind11_json
maloel Mar 20, 2023
3cd9601
Add support for post processing filters
OhadMeir Mar 13, 2023
63b2f10
Identify color_sensor to support OpenVino face detection filter
OhadMeir Mar 16, 2023
adc94d7
Handle PR#11566 comments
OhadMeir Mar 19, 2023
a4ea614
PR #11566 from OhadMeir:Add support for post processing filters
Nir-Az Mar 20, 2023
8d039ad
add rsutils::string::slice, ::ellipsis
maloel Mar 22, 2023
d1bb0e3
add rsutils::string::shorten_json_string
maloel Mar 22, 2023
dc8283e
add shorten_json_string to pyrsutils
maloel Mar 22, 2023
8e72ca9
add tests for shorten_json_string
maloel Mar 22, 2023
6f79b17
CR comments
maloel Mar 22, 2023
b305fb0
PR #11598 from Eran: add slice and shorten_json_string
maloel Mar 22, 2023
05c75c2
on_metadata_available on passes the json, not the message itself
maloel Mar 12, 2023
a2af006
metadata performance in librs
maloel Mar 12, 2023
d72af88
minor stuff in lrs-controller
maloel Mar 13, 2023
2cb6669
no clear_metadata
maloel Mar 20, 2023
d04e481
add py on_metadata_available to dds-device
maloel Mar 20, 2023
66f2bd6
change device-server::publish-metadata to accept json
maloel Mar 21, 2023
ecb54d3
fix a couple of minor issues in rspy test
maloel Mar 22, 2023
3abf0fc
doc change in rspy stopwatch
maloel Mar 22, 2023
1c4bc71
add py stream_profile::bytes_per_pixel()
maloel Mar 22, 2023
e756777
minor debug in dds-device
maloel Mar 22, 2023
77a75cf
more compact json debug messages in dds-device-server (for now)
maloel Mar 22, 2023
6ada603
add some missing pyrealdds fns; fix GIL on publish_metadata
maloel Mar 22, 2023
0092641
PR #11600 from Eran: MD performance and misc changes
maloel Mar 23, 2023
7fcc6da
Merge remote-tracking branch 'origin/development' into dev2dds
maloel Mar 23, 2023
35255b4
remove Depth Huffman Decoder as it was removed in #11566
maloel Mar 24, 2023
6dc1f11
PR #11603 from Eran: merge development -> dds
maloel Mar 26, 2023
3e3817c
add metadata_array, with frame_additional_data ctor for it
maloel Mar 24, 2023
87e6d0e
metadata_array usage in software-device
maloel Mar 24, 2023
4a22896
added move semantics in device-server, per last CR
maloel Mar 24, 2023
45467ac
refactor & optimize frame creation, invocation, metadata syncing
maloel Mar 24, 2023
c151d2d
add exception catching around on_metadata_available()
maloel Mar 26, 2023
7265ed0
same frame-ready handling for video and motion frames
maloel Mar 26, 2023
db0fa7e
frame_holder syncing for proper lifetime mgmt
maloel Mar 26, 2023
dbf409c
CR comments
maloel Mar 26, 2023
dafb8d1
PR #11615 from Eran: refactor & optimize frame creation, invocation, …
maloel Mar 26, 2023
e6952ad
Merge remote-tracking branch 'origin/development' into dev2dds
maloel Apr 2, 2023
c697dc0
PR #11635 from Eran: merge development to dds
maloel Apr 2, 2023
c28cb3d
fix rspy.test.context initialization to []
maloel Apr 2, 2023
cd895a6
add "gha" to rspy.test.context using GITHUB_ACTIONS env var
maloel Apr 2, 2023
aa38f2b
allow 3x timeout waiting for dds devices under GHA
maloel Apr 2, 2023
6064dfa
give dds test-librs-device-properties context a name
maloel Apr 3, 2023
3f903d1
improve debug messages in dds-device-broadcaster
maloel Apr 3, 2023
5f3513e
fix dds query_devices: discard non-running devices; now product-line …
maloel Apr 3, 2023
5bd6870
PR #11650 from Eran: fix dds query_devices: discard non-running devices
maloel Apr 3, 2023
ca3dd72
add topic-writer::publisher() and protected derivation
maloel Apr 8, 2023
e37328a
add participant::name()
maloel Apr 8, 2023
d109c3b
device-watcher will not create same device twice
maloel Apr 8, 2023
e3bfdc4
indent
maloel Apr 8, 2023
3932121
remove unnecessary reset in reader-thread
maloel Apr 8, 2023
e297b31
redo device-broadcaster
maloel Apr 8, 2023
ac2a6ea
pyrealdds: topics.device_info; device_info.to_/from_json; flexible_ms…
maloel Apr 8, 2023
631ee83
revised unit-tests/dds/test-watcher.py
maloel Apr 8, 2023
b08d32a
CR comments
maloel Apr 9, 2023
70d2907
PR #11661 from Eran: redo device-broadcaster
maloel Apr 9, 2023
7e8eab3
working using unique_ptr
maloel Mar 30, 2023
863edc6
add syncer reset on stream close
maloel Mar 30, 2023
64d1658
added pyrealdds.video_stream.on_data_available
maloel Mar 30, 2023
593ecfa
fix syncer logic
maloel Mar 30, 2023
4176c11
debug msg update when publishing metadata
maloel Mar 30, 2023
eb92015
move dds-trinsics out of dds-defines.h
maloel Apr 4, 2023
1e7a393
dds_time more compact; better pyrealdds repr
maloel Apr 4, 2023
532d6cd
add timestamp to topics::device::image
maloel Apr 4, 2023
1fede4e
revisions in syncer
maloel Apr 4, 2023
8cbd9e7
syncer exposed in pyrealdds
maloel Apr 4, 2023
3d29028
improve shorten_json_string and the way it breaks
maloel Apr 5, 2023
0c86aa5
remove annoying debug message in d400-private.cpp
maloel Apr 5, 2023
16044bd
fix bug in add_frame_metadata
maloel Apr 6, 2023
6786f75
add basic metadata tests (just the beginning)
maloel Apr 6, 2023
38d1cfc
rsutils::json:: string args (since json requires it)
maloel Apr 6, 2023
c133616
optimize librealsense::get_string for metadata
maloel Apr 6, 2023
b24670f
remove unnecessary debug message in device-watcher
maloel Apr 6, 2023
73fbc14
split participants to client/server
maloel Apr 7, 2023
ce2f25d
improve test.remote; default timeout=5
maloel Apr 9, 2023
5fc49a5
split test-metadata into metadata-server
maloel Apr 9, 2023
355aa5d
RSUSB for U20 dds testing
maloel Apr 9, 2023
2c3a7b7
wait_for_device notification-based rather than sleep
maloel Apr 9, 2023
1fc6b3b
log.f now in red, too
maloel Apr 10, 2023
fea0a6c
add test.closure; failed test cases now logged at end
maloel Apr 10, 2023
4e5c065
fix warnings
maloel Apr 10, 2023
374f616
revise test-librs-connections
maloel Apr 10, 2023
1d73c1c
fix flushing issues (linux) in rspy.log
maloel Apr 10, 2023
fe36ec5
disable test-metadata in Linux; indent remote
maloel Apr 10, 2023
a987ed0
CR comments
maloel Apr 11, 2023
397d4f7
switch test-metadata to use Timer
maloel Apr 11, 2023
c0fd66d
fix rspy.timer Stopwatch to be per instance!
maloel Apr 11, 2023
00c9aa5
CR comments in to-string.cpp
maloel Apr 11, 2023
e440de3
fix test.closure exception swallowing; on_fail constants
maloel Apr 11, 2023
64dc4a1
per CR, remove 'return *this' in syncer on_xxx()
maloel Apr 13, 2023
0a076ad
remove check in test-librs-connections, per CR
maloel Apr 17, 2023
4359306
PR #11665 from Eran: basic dds metadata tests
maloel Apr 17, 2023
2c86333
remove rspy.ac
maloel Apr 11, 2023
909cfec
add syncer statics to pyrealdds
maloel Apr 11, 2023
a0b1c31
add test-metadata-syncer; 2 last tests fail
maloel Apr 11, 2023
e66f92e
fix 'Enqueue 2 images then matching metadata for the second'
maloel Apr 11, 2023
8cf83e4
fix 'Enqueue during callback' and add 2 simulations
maloel Apr 14, 2023
7b057b2
align non-color log.out to improve line breaks
maloel Apr 18, 2023
c5f39b7
add frame-/metadata-first param and test
maloel Apr 18, 2023
6f8a003
attempt to improve rspy.test.remote abnormal start
maloel Apr 18, 2023
ee262b8
CR comments - introduce 'frame' type and 'received_frames'
maloel Apr 19, 2023
dc71ae3
PR #11695 from Eran: add metadata-syncer unit-tests
maloel Apr 19, 2023
6ac5aec
replace abort_on_fail:bool with on_fail:str (ABORT/RAISE/LOG)
maloel Apr 19, 2023
8839614
PR #11707 from Eran: replace rspy.test abort_on_fail:bool with on_fai…
maloel Apr 24, 2023
de0dfba
rename device::image -> device::image_msg
maloel Apr 23, 2023
89fe501
move image_msg out of device
maloel Apr 23, 2023
d7b251e
align all -msg headers under topics/
maloel Apr 23, 2023
c19b5b3
remove old topics/image IDL and code
maloel Apr 24, 2023
69e252e
video-stream-server::publish_image & motion-::publish_motion
maloel Apr 24, 2023
a47a456
improve rspy.test.remote.Error output
maloel Apr 24, 2023
db66721
fix dds-time-from-ns to handle negatives better
maloel Apr 26, 2023
956a313
test-dds-time and explain issues
maloel Apr 26, 2023
7a1b59e
remove image-msg::frame-id; use timestamp
maloel Apr 26, 2023
4074adb
PR #11751 from Eran: remove image-msg::frame-id; use timestamp
maloel May 1, 2023
af5f91e
minor performance in context.cpp
maloel May 1, 2023
a0d8e81
add operator==, != to rsutils::string::slice
maloel May 1, 2023
24f7ab0
separate DDS classes out of context.cpp
maloel May 1, 2023
7500601
PR #11752 from Eran: separate DDS classes out of context.cpp
maloel May 2, 2023
30c318e
optional device-info fields
maloel May 7, 2023
ef246f8
docs
maloel May 7, 2023
b8c48cb
Create participant listener as late as possible to avoid callbacks be…
OhadMeir May 7, 2023
75886b0
Trigger Build
OhadMeir May 7, 2023
a88a8ef
CR comments; started streaming.md
maloel May 8, 2023
b6de09e
Revert previous changes, verify owner name existence for debug prints
OhadMeir May 8, 2023
6c72b60
Fix Linux compilation
OhadMeir May 8, 2023
244d42e
dds-time INVALID repr to avoid exception
maloel May 8, 2023
5528334
Handle PR#11777 comments
OhadMeir May 8, 2023
4cfbabd
add sample-identity to pyrealdds
maloel May 8, 2023
87931c1
CR comments; add some control.md info
maloel May 8, 2023
d294f75
PR #11777 from Ohad: fix listener callback before participant initial…
maloel May 8, 2023
03beb82
PR #11776 from Eran: realdds docs
maloel May 8, 2023
31f2be6
put back use-cases
maloel May 8, 2023
8d0762a
Handle dds_metadata_syncer threading issues
OhadMeir May 9, 2023
befa7c5
Fix calling invoke_new_frame after syncer is cleared from map
OhadMeir May 11, 2023
00c0790
Handle PR#11793 comment
OhadMeir May 11, 2023
e630bd9
Trigger build
OhadMeir May 16, 2023
43bd933
Trigger build
OhadMeir May 16, 2023
e1c249c
PR #11793 from OhadMeir: Handle dds_metadata_syncer threading issues
Nir-Az May 17, 2023
ca59ffb
add 'friendly_name' argument to realdds::print
maloel May 25, 2023
f75afbd
flexible-msg::write-to now returns a sequence number
maloel May 25, 2023
5fc89c7
update control doc & implementation to be sample-based
maloel May 25, 2023
1660fd0
added query- and set-option docs
maloel May 28, 2023
3784814
add pyrealdds.device.set_option_value and .query_option_value
maloel May 28, 2023
e441016
device owner-name wasn't working for set/query
maloel May 28, 2023
a3b4ed2
add device.set_option_value() and .query_option_value() tests
maloel May 28, 2023
16c846a
CR comments
maloel May 29, 2023
3f0e3be
add dds_sequence_number to dds-defines; remove json.h from it
maloel May 29, 2023
f005952
add multi-part notifications; revised reply mechanism
maloel May 29, 2023
f7bd5ca
additional json includes
maloel May 29, 2023
eada62b
PR #11845 from Eran: revised dds notification/control docs and logic
maloel May 29, 2023
20e6e82
Merge branch 'development' of https://github.com/IntelRealSense/libre…
OhadMeir Jun 1, 2023
c3b71eb
PR #11863 from OhadMeir: Merge development branch into dds branch
Nir-Az Jun 1, 2023
f26e59c
trigger build
OhadMeir May 16, 2023
e04fc73
DDS formats conversion at host, first working version
OhadMeir May 21, 2023
d295f39
Activated conversion in start. Handling multiple streams per sensor a…
OhadMeir May 28, 2023
43395e6
CLEANer code (extracted to functions)
OhadMeir May 28, 2023
8387927
Fix test-dds-librs-device-properties
OhadMeir May 28, 2023
319740e
Fix test-dds-librs-extrinsics
OhadMeir May 28, 2023
4988217
Fix test-stream-sensor-bridge
OhadMeir May 29, 2023
8a6e6de
Add formats conversion unit test
OhadMeir May 29, 2023
246daed
Trigger build
OhadMeir May 30, 2023
61b98cc
Trigger build
OhadMeir May 30, 2023
8eb143c
Update formats conversion unit test to create a single device with mu…
OhadMeir Jun 1, 2023
29d7fbc
Trigger build
OhadMeir Jun 1, 2023
2e0c3f0
Trigger build
OhadMeir Jun 1, 2023
2daa179
Trigger build
OhadMeir Jun 1, 2023
e879e1f
Handle PR#11850 comments
OhadMeir Jun 5, 2023
645cf35
Handle devices other then D400 (use identity converters)
OhadMeir Jun 5, 2023
f823dab
handling some more PR#11850 comments
OhadMeir Jun 14, 2023
4372d4e
Trigger build
OhadMeir Jun 15, 2023
3395e70
Trigger build
OhadMeir Jun 15, 2023
0581414
PR #11850 from Ohad: DDS formats conversion
Nir-Az Jun 15, 2023
08163e4
Merge remote-tracking branch 'origin/development' into dev2dds
maloel Jun 18, 2023
5116b68
PR #11922 from Eran: Merge 'development' into 'dds'
maloel Jun 18, 2023
4a633be
Change rs-dds-server tool name to rs-dds-adapter
OhadMeir Jun 18, 2023
1701e1b
Update depth_ae_mode test, checked types don't match
OhadMeir Jun 18, 2023
a91d0de
PR #11923 from Eran: Change rs-dds-server tool name to rs-dds-adapter
maloel Jun 20, 2023
688bca9
add device init notifications as known
maloel May 31, 2023
d4410a4
add pyrealdds.device_server.publish_notification
maloel Jun 20, 2023
9904b59
minor stuff
maloel Jun 20, 2023
fe40aaf
test-dds-device-init using test.closure
maloel Jun 18, 2023
5e22105
improve exception handling in rspy.test.remote.wait()
maloel Jun 20, 2023
e796cee
add concurrent device init test in test-device-init
maloel Jun 20, 2023
6c598f8
add atomic initialization to docs
maloel Jun 20, 2023
deb50b7
break device init to parts; ignore out-of-order init messages
maloel Jun 20, 2023
59819ef
PR #11930 from Eran: Fix device init messages w/ multiple clients
maloel Jun 21, 2023
71bb34c
rs-dds-adapter sends only basic formats (no conversions)
OhadMeir Jun 20, 2023
f77c8dd
rs-dds-stream-proxy handles basic stream formats only. Not dependent …
OhadMeir Jun 22, 2023
e4c874b
Enable different frequencies to motion streams of same sensor
OhadMeir Jun 22, 2023
d8bc61c
Handle colored IR and confidence streams. Remove rs-dds-internal-data
OhadMeir Jun 22, 2023
95416c9
Disabling different frequencies to motion streams of same sensor (rev…
OhadMeir Jun 26, 2023
b1a6a16
Updating DDS unit tests for generic formats conversion (not product-i…
OhadMeir Jun 26, 2023
b761c1d
Save context json settings and use them instead of individual flags
OhadMeir Jun 26, 2023
77866e7
Handle DDS default profiles. Adapter sets defaults (might be differen…
OhadMeir Jun 28, 2023
3ed5f9e
Handle PR#11946 comments
OhadMeir Jul 6, 2023
edff921
Some more PR#11946 comments
OhadMeir Jul 6, 2023
ffb1375
PR #11946 from Ohad: DDS using generic format types
maloel Jul 11, 2023
b905151
add ROS2 Imu topics
maloel Jun 21, 2023
eaf77f8
added stream-configurations to device docs
maloel Jun 25, 2023
a7eaa4b
basic imu-msg impl
maloel Jun 25, 2023
2e2d78a
move start_streaming impl from dds-stream-server to video- and motion-
maloel Jun 25, 2023
6d55d77
IMU -> motion
maloel Jun 25, 2023
1f9d75d
remove fisheye, pose streams; gyro+accel -> motion
maloel Jun 25, 2023
78d60dd
send motion intrinsics in 2 parts; report gyro, auto activate accel
maloel Jun 27, 2023
d706bc2
move format to dds_video_stream_profile; remove MXYZ
maloel Jul 10, 2023
35f8d56
additional docs
maloel Jul 10, 2023
13076ae
add RS2_STREAM_MOTION and RS2_FORMAT_COMBINED_MOTION
maloel Jul 10, 2023
d894543
dds motion in librealsense side
maloel Jul 10, 2023
b9820a9
fixes
maloel Jul 11, 2023
5a0e10b
update pyrealdds
maloel Jul 11, 2023
3de25bf
adjust libCI outputs
maloel Jul 11, 2023
b4e6ca7
fix merge issues
maloel Jul 11, 2023
6135477
fix intrinsics & extrinsics tests
maloel Jul 11, 2023
7171e70
fix device-init test
maloel Jul 11, 2023
a6ea118
fix d455 libci server
maloel Jul 11, 2023
d4fbd63
fix librs-device-properties test
maloel Jul 11, 2023
54ee7a1
fix librs-formats-conversion test
maloel Jul 11, 2023
dc986b1
fix stream-sensor-bridge test
maloel Jul 11, 2023
bf0f805
reduce dds device init timeout to 5 (from 30)
maloel Jul 11, 2023
9fb84b7
add imu_msg to pyrealdds
maloel Jul 12, 2023
f0062fe
test.remote timeouts reduced 30 -> 10
maloel Jul 13, 2023
b522026
CR fixes
maloel Jul 16, 2023
816537a
CR fixes
maloel Jul 18, 2023
e730476
Merge branch 'dds' into dds2dev
maloel Jul 18, 2023
e04caa0
fix test-unit-transform float32 vs float64 comparison
maloel Jul 18, 2023
97f9b0e
PR #11990 from Eran: IMU with Motion topic
maloel Jul 18, 2023
d51f83e
Merge remote-tracking branch 'origin/dds' into dds2dev
maloel Jul 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 6 additions & 3 deletions .github/workflows/buildsCI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ jobs:


#--------------------------------------------------------------------------------
U20_ST_Py_DDS_CI: # Ubuntu 2020, Static, Python, DDS, LibCI without executables
U20_ST_Py_DDS_RSUSB_CI: # Ubuntu 2020, Static, Python, DDS, RSUSB, LibCI without executables
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -381,18 +381,21 @@ jobs:
mkdir build

- name: Build
# Note: we force RSUSB because, on Linux, the context creation will fail on GHA:
Nir-Az marked this conversation as resolved.
Show resolved Hide resolved
# (backend-v4l2.cpp:555) Cannot access /sys/class/video4linux)
# And, well, we don't need any specific platform for DDS!
shell: bash
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3)
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3) -DFORCE_RSUSB_BACKEND=true
cmake --build . -- -j4

- name: LibCI
# Note: we specifically disable BUILD_UNIT_TESTS so the executable C++ unit-tests won't run
# This is to save time as DDS already lengthens the build...
shell: bash
run: |
python3 unit-tests/run-unit-tests.py --no-color --debug --stdout --not-live --context "dds linux"
python3 unit-tests/run-unit-tests.py --no-color --debug --stdout --not-live --context "dds linux" --tag dds


#--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__( self, message, line=None ):
global line_number, logfile
if line is None:
line = line_number
super().__init__( f'{logile}+{line}: {message}' )
super().__init__( f'{logfile}+{line}: {message}' )
Nir-Az marked this conversation as resolved.
Show resolved Hide resolved


handle = open( logfile, "r" )
Expand Down
91 changes: 44 additions & 47 deletions .github/workflows/cppcheck_run.log

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions CMake/external_fastdds.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 3.5)
include(FetchContent)

# We use a function to enforce a scoped variables creation only for FastDDS build (i.e turn off BUILD_SHARED_LIBS which is used on LRS build as well)
function(get_fastdds)

# Mark new options from FetchContent as advanced options
mark_as_advanced(FETCHCONTENT_QUIET)
mark_as_advanced(FETCHCONTENT_BASE_DIR)
mark_as_advanced(FETCHCONTENT_FULLY_DISCONNECTED)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED)

message(CHECK_START "Fetching fastdds...")
list(APPEND CMAKE_MESSAGE_INDENT " ") # Indent outputs

FetchContent_Declare(
fastdds
GIT_REPOSITORY https://github.com/eProsima/Fast-DDS.git
GIT_TAG v2.9.1
GIT_SUBMODULES "" # Submodules will be cloned as part of the FastDDS cmake configure stage
GIT_SHALLOW ON # No history needed
SOURCE_DIR ${CMAKE_BINARY_DIR}/third-party/fastdds
)

# Set FastDDS internal variables
# We use cached variables so the default parameter inside the sub directory will not override the required values
# We add "FORCE" so that is a previous cached value is set our assignment will override it.
set(THIRDPARTY_Asio FORCE CACHE INTERNAL "" FORCE)
set(THIRDPARTY_fastcdr FORCE CACHE INTERNAL "" FORCE)
set(THIRDPARTY_TinyXML2 FORCE CACHE INTERNAL "" FORCE)
set(COMPILE_TOOLS OFF CACHE INTERNAL "" FORCE)
set(BUILD_TESTING OFF CACHE INTERNAL "" FORCE)
set(SQLITE3_SUPPORT OFF CACHE INTERNAL "" FORCE)

# Set special values for FastDDS sub directory
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/fastdds/fastdds_install)
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/fastdds/fastdds_install)

# Get fastdds
FetchContent_MakeAvailable(fastdds)

# Mark new options from FetchContent as advanced options
mark_as_advanced(FETCHCONTENT_SOURCE_DIR_FASTDDS)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FASTDDS)

# place FastDDS project with other 3rd-party projects
set_target_properties(fastcdr fastrtps PROPERTIES
FOLDER "ExternalProjectTargets/fastdds")

list(POP_BACK CMAKE_MESSAGE_INDENT) # Unindent outputs

add_library(dds INTERFACE)
target_link_libraries(dds INTERFACE fastcdr fastrtps)

add_definitions(-DBUILD_WITH_DDS)

install(TARGETS dds EXPORT realsense2Targets)
message(CHECK_PASS "Done")
endfunction()

# Trigger the FastDDS build
get_fastdds()


83 changes: 83 additions & 0 deletions CMake/external_foonathan_memory.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.11)
include(FetchContent)

# Mark new options from FetchContent as advanced options
mark_as_advanced(FETCHCONTENT_QUIET)
mark_as_advanced(FETCHCONTENT_BASE_DIR)
mark_as_advanced(FETCHCONTENT_FULLY_DISCONNECTED)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED)

message(CHECK_START "Fetching & Installing foonathan_memory...")
list(APPEND CMAKE_MESSAGE_INDENT " ")

FetchContent_Declare(
foonathan_memory
GIT_REPOSITORY https://github.com/foonathan/memory.git
GIT_TAG "v0.7-2"
GIT_SHALLOW ON # No history needed
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/foonathan_memory
)

# Remove unrequired targets
set(FOONATHAN_MEMORY_BUILD_VARS -DBUILD_SHARED_LIBS=OFF # explicit set static lib
-DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF
-DFOONATHAN_MEMORY_BUILD_TESTS=OFF
-DFOONATHAN_MEMORY_BUILD_TOOLS=ON) # this tool is needed during configure time only, FastDDS recommend turning it ON.

# Align STATIC CRT definitions with LRS
if(BUILD_WITH_STATIC_CRT)
set(FOONATHAN_MEMORY_BUILD_VARS ${FOONATHAN_MEMORY_BUILD_VARS}
-DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW
-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug>)
endif()


# Since `FastDDS` require foonathan_memory package installed during configure time,
# We download it build it and install it both in Release & Debug configuration since we need both available.
# We use `FetchContent_Populate` and not `FetchContent_MakeAvailable` for that reason, we want to manually configure and build it.
FetchContent_GetProperties(foonathan_memory)
if(NOT foonathan_memory_POPULATED)
FetchContent_Populate(foonathan_memory)
endif()

# Mark new options from FetchContent as advanced options
mark_as_advanced(FETCHCONTENT_SOURCE_DIR_FOONATHAN_MEMORY)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FOONATHAN_MEMORY)


# Configure stage
execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/fastdds/fastdds_install
${FOONATHAN_MEMORY_BUILD_VARS}
.
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/third-party/foonathan_memory"
OUTPUT_QUIET
RESULT_VARIABLE configure_ret
)

# Build and install Debug version
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --config Debug --target install
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/third-party/foonathan_memory"
OUTPUT_QUIET
RESULT_VARIABLE debug_build_ret
)

# Build and install RelWithDeb version
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --config RelWithDebInfo --target install
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/third-party/foonathan_memory"
OUTPUT_QUIET
RESULT_VARIABLE rel_with_deb_info_build_ret
)

# Build and install Release version
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --config Release --target install
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/third-party/foonathan_memory"
OUTPUT_QUIET
RESULT_VARIABLE release_build_ret
)

if(configure_ret OR debug_build_ret OR release_build_ret OR rel_with_deb_info_build_ret)
message( FATAL_ERROR "Failed to build foonathan_memory")
endif()

list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "Done")
41 changes: 41 additions & 0 deletions CMake/external_json.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 3.6)
include(ExternalProject)



# We use a function to enforce a scoped variables creation only for the build
# (i.e turn off BUILD_SHARED_LIBS which is used on LRS build as well)
function(get_nlohmann_json)

message( STATUS #CHECK_START
"Fetching nlohmann/json..." )
#list( APPEND CMAKE_MESSAGE_INDENT " " ) # Indent outputs

# We want to clone the pybind repo and build it here, during configuration, so we can use it.
# But ExternalProject_add is limited in that it only does its magic during build.
# This is possible in CMake 3.12+ with FetchContent and FetchContent_MakeAvailable in 3.14+ (meaning Ubuntu 20)
# but we need to adhere to CMake 3.10 (Ubuntu 18).
# So instead, we invoke a new CMake project just to download pybind:
configure_file( CMake/json-download.cmake.in
${CMAKE_BINARY_DIR}/external-projects/json-download/CMakeLists.txt )
execute_process( COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/json-download"
OUTPUT_QUIET
RESULT_VARIABLE configure_ret )
execute_process( COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/json-download"
OUTPUT_QUIET
RESULT_VARIABLE build_ret )

if( configure_ret OR build_ret )
message( FATAL_ERROR "Failed to download nlohmann/json" )
endif()

message( STATUS #CHECK_PASS
"Fetching nlohmann/json - Done" )
#list( POP_BACK CMAKE_MESSAGE_INDENT ) # Unindent outputs (requires cmake 3.15)

endfunction()

# Trigger the build
get_nlohmann_json()
51 changes: 48 additions & 3 deletions CMake/external_pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ function(get_pybind11)
${CMAKE_BINARY_DIR}/external-projects/pybind11-download/CMakeLists.txt )
execute_process( COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/pybind11-download"
OUTPUT_QUIET )
OUTPUT_QUIET
RESULT_VARIABLE configure_ret )
execute_process( COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/pybind11-download"
OUTPUT_QUIET )
OUTPUT_QUIET
RESULT_VARIABLE build_ret )

if( configure_ret OR build_ret )
message( FATAL_ERROR "Failed to download pybind11" )
endif()

# Now that it's available, we can refer to it with an actual ExternalProject_add (but notice we're not
# downloading anything)
Expand Down Expand Up @@ -75,8 +81,45 @@ function(get_pybind11)

endfunction()


# We also want a json-compatible pybind interface:
function(get_pybind11_json)

message( STATUS #CHECK_START
"Fetching pybind11_json..." )
#list( APPEND CMAKE_MESSAGE_INDENT " " ) # Indent outputs

# We want to clone the pybind repo and build it here, during configuration, so we can use it.
# But ExternalProject_add is limited in that it only does its magic during build.
# This is possible in CMake 3.12+ with FetchContent and FetchContent_MakeAvailable in 3.14+ (meaning Ubuntu 20)
# but we need to adhere to CMake 3.10 (Ubuntu 18).
# So instead, we invoke a new CMake project just to download pybind:
configure_file( CMake/pybind11-json-download.cmake.in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please integrate this fix:
https://github.com/IntelRealSense/librealsense/pull/11959/files
We need to build in linux and see we didn't ruin something here
Fix was already approved by the user

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nir, this is the pybind11-json download, not pybind11... the changes you pointed to are in the file. Everything is as it should be.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Mistake, :)

${CMAKE_BINARY_DIR}/external-projects/pybind11-json-download/CMakeLists.txt )
execute_process( COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/pybind11-json-download"
OUTPUT_QUIET
RESULT_VARIABLE configure_ret )
execute_process( COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external-projects/pybind11-json-download"
OUTPUT_QUIET
RESULT_VARIABLE build_ret )

if( configure_ret OR build_ret )
message( FATAL_ERROR "Failed to download pybind11_json" )
endif()

# pybind11_add_module will add the directory automatically (see below)

message( STATUS #CHECK_PASS
"Fetching pybind11_json - Done" )
#list( POP_BACK CMAKE_MESSAGE_INDENT ) # Unindent outputs (requires cmake 3.15)

endfunction()

# Trigger the build
get_pybind11()
get_pybind11_json()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this package purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a small header lib that enables Python conversions to/from json objects.


# This function overrides "pybind11_add_module" function, arguments is same as "pybind11_add_module" arguments
# pybind11_add_module(<name> SHARED [file, file2, ...] )
Expand All @@ -93,5 +136,7 @@ function( pybind11_add_module project_name library_type ...)
# (workaround for RS5-10582; see also https://github.com/pybind/pybind11/issues/2898)
# NOTE: this workaround seems to be needed for debug compilations only
target_compile_definitions( ${project_name} PRIVATE -DPYBIND11_COMPILER_TYPE=\"_${project_name}_abi\" )


target_include_directories( ${project_name} PRIVATE "${CMAKE_BINARY_DIR}/third-party/pybind11-json/include" )

endfunction()
3 changes: 1 addition & 2 deletions CMake/global_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ macro(global_set_flags)
add_definitions(-DCHECK_FOR_UPDATES)
endif()
endif()

add_definitions(-D${BACKEND} -DUNICODE)
endmacro()

Expand All @@ -103,6 +103,5 @@ macro(global_target_config)
)



endmacro()

19 changes: 19 additions & 0 deletions CMake/json-download.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.6)
project(nlohmann-json-download NONE)

include(ExternalProject)
ExternalProject_Add(
nlohmann_json
PREFIX .
GIT_REPOSITORY "https://github.com/nlohmann/json.git"
#GIT_TAG v3.11.2
GIT_CONFIG advice.detachedHead=false # otherwise we'll get "You are in 'detached HEAD' state..."
SOURCE_DIR "${CMAKE_BINARY_DIR}/third-party/json"
GIT_SHALLOW 1 # No history needed (requires cmake 3.6)
# Override default steps with no action, we just want the clone step.
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)


1 change: 1 addition & 0 deletions CMake/lrs_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ else()
option(ENABLE_EASYLOGGINGPP_ASYNC "Switch Logger to Asynchronous Mode (set OFF for Synchronous Mode)" OFF)
endif()
option(BUILD_PC_STITCHING "Build pointcloud-stitching example" OFF)
option(BUILD_WITH_DDS "Use FastDDS to access camera devices through DDS topics" OFF)

19 changes: 19 additions & 0 deletions CMake/pybind11-json-download.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.6)
project(pybind11-json-download NONE)

include(ExternalProject)
ExternalProject_Add(
pybind11_json
PREFIX .
GIT_REPOSITORY "https://github.com/pybind/pybind11_json.git"
GIT_TAG 0.2.13
GIT_CONFIG advice.detachedHead=false # otherwise we'll get "You are in 'detached HEAD' state..."
SOURCE_DIR "${CMAKE_BINARY_DIR}/third-party/pybind11-json"
GIT_SHALLOW ON # No history needed (requires cmake 3.6)
# Override default steps with no action, we just want the clone step.
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)


Loading