Skip to content

Commit f31b5ba

Browse files
authored
Merge branch 'development' into ros2-native-reader
2 parents b1beb68 + c4bb712 commit f31b5ba

82 files changed

Lines changed: 2128 additions & 2376 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/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Detailed how-to guides for common tasks are maintained as skill files under `.gi
1212
| `.github/skills/build.md` | Building the project (CMake configure, compile, flags) |
1313
| `.github/skills/testing.md` | Running, filtering, and debugging unit tests |
1414
| `.github/skills/pytest-infra.md` | Migrating tests to pytest, modifying pytest/hub infrastructure, verifying Jenkins CI results |
15+
| `.github/skills/pr-review.md` | Opening a pull request, updating its description, replying to review comments |
1516

1617
If a skill file exists for the task at hand, follow its instructions precisely. New skills may be added to this folder over time — check its contents before assuming none applies.
1718

.github/skills/build.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ All flags are defined in `CMake/lrs_options.cmake`.
170170
| `BUILD_WITH_STATIC_CRT` | ON | Link against static CRT (Windows/MSVC) |
171171
| `CHECK_FOR_UPDATES` | ON (OFF on macOS) | Enable checking for SDK updates |
172172
| `ENABLE_CCACHE` | ON | Use ccache if available |
173-
| `IMPORT_DEPTH_CAM_FW` | ON | Download latest depth camera firmware |
174173
| `BUILD_GLSL_EXTENSIONS` | ON | Build GLSL extensions API |
175174
| `BUILD_RS2_ALL` | ON | Build `realsense2-all` static bundle (when `BUILD_SHARED_LIBS=OFF`) |
176175
| `BUILD_ASAN` | OFF | Enable AddressSanitizer |

.github/skills/pr-review.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Pull Request Workflow
2+
3+
## When to Use This Skill
4+
5+
Opening a PR, pushing new commits to one, or replying to review comments on `realsenseai/librealsense`.
6+
7+
## Description Format
8+
9+
Every PR description starts with a TL;DR (1–2 sentences stating the user-visible change), then the body:
10+
11+
```markdown
12+
**TL;DR:** <1-2 sentences>
13+
14+
## Summary
15+
- <what changed and why>
16+
17+
## Why
18+
<bug, regression, or capability gap>
19+
20+
## Test plan
21+
- [ ] <unit/pytest entries, marker/context/iteration counts>
22+
- [ ] <manual or CI verification>
23+
```
24+
25+
Keep the TL;DR jargon-free. Put tables (behavior change, latency, benchmarks) in the body, never in the TL;DR.
26+
27+
If you **know** which Jira ticket the PR is tracking (the user told you, or you opened the ticket yourself this session), append a `Tracked on [RSDEV-1234]` line right after the TL;DR — bare text, no link:
28+
29+
```markdown
30+
**TL;DR:** <1-2 sentences>
31+
32+
Tracked on [RSDEV-1234]
33+
```
34+
35+
Only add this line when you are sure. If you only suspect a ticket is related, ask the user before adding it — never guess.
36+
37+
## Before Every Push — Description Audit
38+
39+
Re-read the PR description before `git push`. If any concrete detail in the description (iteration counts, timeouts, file paths, marker lists, behavior tables, referenced PR numbers) no longer matches what's actually on the branch, update the description in the same push (`gh pr edit <num> --body ...`).
40+
41+
The description and the diff must stay in sync.
42+
43+
## Responding to Review Comments
44+
45+
- **One reply per thread.** Don't summarise multiple threads in one comment.
46+
- Cite the commit SHA that addresses the comment (`✅ Fixed in <sha>. <one-line summary>`).
47+
- For deferred items: `⏸ Deferred — <reason>`.
48+
- For disagreements: give a concrete reason (worked example, edge case) before declining.
49+
- Don't auto-resolve threads — let the reviewer decide when their concern is settled.
50+
51+
## Handling Automated Review Bots
52+
53+
| Bot | How to respond |
54+
|---|---|
55+
| **Aikido** (`aikido-pr-checks[bot]`) | Fix and reply with commit SHA, or reply `@AikidoSec ignore: <reason>` if the suggestion is wrong or the pattern is intentional. |
56+
| **rs-agentic-bot** (posts as a teammate) | Treat as a real reviewer: fix or defer; reply per thread. |
57+
| **Copilot suggestions** | Apply only if they preserve intent; reply with rationale if declined. |

.github/skills/pytest-infra.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,43 +139,48 @@ When migrating a legacy `test-*.py` to `pytest-*.py`:
139139

140140
## Handling `on_fail=test.ABORT`
141141

142-
The legacy framework supported `with test.closure('Name', on_fail=test.ABORT):`if that closure failed, all subsequent closures were skipped. In pytest, use the **`pytest-dependency`** plugin (already in `requirements.txt` and `plugins.py`).
142+
The legacy framework supported `with test.closure('Name', on_fail=test.ABORT):`if that closure failed, all subsequent closures were skipped. In pytest, use a **module-level state dict** with `pytest.skip()`.
143143

144-
**Pattern**: mark the prerequisite test with `@pytest.mark.dependency(scope='module')`, and each dependent test with `@pytest.mark.dependency(scope='module', depends=["prerequisite_name"])`. If the prerequisite fails or is skipped, all dependents are automatically skipped.
144+
> **Why not `pytest-dependency`?** The plugin requires exact test-name matching, but `pytest_generate_tests` (used by `device_each`) appends parametrized suffixes like `[D455-1234567890]`. The plugin cannot match `"test_foo"` against `"test_foo[D455-1234567890]"` — no regex, glob, or prefix support exists. The module-state pattern is zero-dependency and works regardless of parametrization.
145+
146+
**Pattern**: the prerequisite test sets a flag in a module-level dict on success. Dependent tests check the flag and `pytest.skip()` if missing.
145147

146148
```python
147-
# Prerequisite test — asserts (hard fail if condition not met), registers as a dependency
148-
@pytest.mark.dependency(scope='module')
149+
_module_state = {}
150+
149151
def test_advanced_mode_support(test_device_wrapped):
150152
"""Prerequisite: camera must be in advanced mode."""
151153
dev, ctx = test_device_wrapped
152154
assert rs.rs400_advanced_mode(dev).is_enabled()
155+
_module_state['am_ok'] = True
153156

154-
# Dependent test — skipped automatically if test_advanced_mode_support failed/was skipped
155-
@pytest.mark.dependency(scope='module', depends=["test_advanced_mode_support"])
156157
def test_set_depth_control(test_device_wrapped):
158+
if not _module_state.get('am_ok'):
159+
pytest.skip("prerequisite test_advanced_mode_support failed")
157160
dev, ctx = test_device_wrapped
158161
...
159162
```
160163

161-
**`scope='module'`**: limits dependency resolution to the current test file, so identically-named tests in other files do not interfere.
162-
163-
**Parametrized tests**: when both the prerequisite and dependent tests share the same parametrization (e.g., `device_each`), `pytest-dependency` automatically matches per-parameter — `test_set_depth_control[D455-SN]` is only skipped if `test_advanced_mode_support[D455-SN]` specifically failed, not if a different device's run failed.
164-
165-
**Chain of ABORTs**: if a file has multiple `on_fail=test.ABORT` closures in sequence, list all prerequisite names in `depends=`:
164+
**Chain of ABORTs**: if a file has multiple prerequisite tests in sequence, each sets its own flag. Dependents check the deepest prerequisite (which implicitly requires all prior ones to have passed):
166165

167166
```python
168-
@pytest.mark.dependency(scope='module')
167+
_module_state = {}
168+
169169
def test_advanced_mode_support(...): # first ABORT
170170
assert ...
171+
_module_state['am_ok'] = True
171172

172-
@pytest.mark.dependency(scope='module', depends=["test_advanced_mode_support"])
173173
def test_visual_preset_support(...): # second ABORT
174+
if not _module_state.get('am_ok'):
175+
pytest.skip("prerequisite test_advanced_mode_support failed")
174176
assert ...
177+
_module_state['preset_ok'] = True
175178

176-
# Everything after the second ABORT depends on both
177-
@pytest.mark.dependency(scope='module', depends=["test_advanced_mode_support", "test_visual_preset_support"])
179+
# Everything after the second ABORT checks only 'preset_ok'
180+
# (preset_ok being set implies am_ok was set too)
178181
def test_set_depth_control(...):
182+
if not _module_state.get('preset_ok'):
183+
pytest.skip("prerequisite test_visual_preset_support failed")
179184
...
180185
```
181186

.github/skills/testing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ python3 run-unit-tests.py --test-dir /path/to/custom/tests
196196

197197
## Custom Firmware for Testing
198198

199+
The SDK no longer ships a bundled firmware blob, so `test-fw-update` **requires** a custom firmware path for the device under test. Without one it logs a warning and skips. Download a signed `.bin` from <https://dev.realsenseai.com/docs/firmware-updates>, then:
200+
199201
```bash
200202
python3 run-unit-tests.py --custom-fw-d400 /path/to/firmware.bin
201203
python3 run-unit-tests.py --custom-fw-d555 /path/to/firmware.bin

.github/workflows/buildsCI.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
cd ${{env.WIN_BUILD_DIR}}
6969
pwd
7070
ls
71-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=true -DBUILD_TOOLS=true -DCHECK_FOR_UPDATES=true
71+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=true -DBUILD_TOOLS=true -DCHECK_FOR_UPDATES=true
7272
7373
- name: Build
7474
# Build your program with the given configuration
@@ -110,7 +110,7 @@ jobs:
110110
cd ${{env.WIN_BUILD_DIR}}
111111
pwd
112112
ls
113-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=true -DBUILD_TOOLS=true -DCHECK_FOR_UPDATES=false -DBUILD_EASYLOGGINGPP=false
113+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=true -DBUILD_TOOLS=true -DCHECK_FOR_UPDATES=false -DBUILD_EASYLOGGINGPP=false
114114
115115
- name: Build
116116
# Build your program with the given configuration
@@ -154,7 +154,7 @@ jobs:
154154
run: |
155155
LRS_SRC_DIR=$(pwd)
156156
cd ${{env.WIN_BUILD_DIR}}
157-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DUNIT_TESTS_ARGS="--not-live --context=windows" -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_PYTHON_BINDINGS=true
157+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DUNIT_TESTS_ARGS="--not-live --context=windows" -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_PYTHON_BINDINGS=true
158158
159159
- name: Build
160160
# Build your program with the given configuration
@@ -180,7 +180,7 @@ jobs:
180180
run: |
181181
mkdir ${{env.WIN_BUILD_DIR}}/rs-all-client
182182
cd ${{env.WIN_BUILD_DIR}}/rs-all-client
183-
cmake $GITHUB_WORKSPACE/.github/workflows/rs-all-client -G "Visual Studio 17 2022"
183+
cmake $GITHUB_WORKSPACE/.github/workflows/rs-all-client -A x64
184184
cmake --build . --config Release -- -m
185185
./Release/rs-all-client
186186
@@ -218,7 +218,7 @@ jobs:
218218
run: |
219219
LRS_SRC_DIR=$(pwd)
220220
cd ${{env.WIN_BUILD_DIR}}
221-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true
221+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true
222222
223223
- name: Build
224224
# Build your program with the given configuration
@@ -271,7 +271,7 @@ jobs:
271271
run: |
272272
LRS_SRC_DIR=$(pwd)
273273
cd ${{env.WIN_BUILD_DIR}}
274-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DENABLE_SECURITY_FLAGS=true
274+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DENABLE_SECURITY_FLAGS=true
275275
276276
- name: Build
277277
# Build your program with the given configuration
@@ -314,7 +314,7 @@ jobs:
314314
run: |
315315
LRS_SRC_DIR=$(pwd)
316316
cd ${{env.WIN_BUILD_DIR}}
317-
cmake ${LRS_SRC_DIR} -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DCHECK_FOR_UPDATES=false -DBUILD_PYTHON_BINDINGS=true -DFORCE_RSUSB_BACKEND=true -DBUILD_CSHARP_BINDINGS=true -DDOTNET_VERSION_LIBRARY="4.6" -DDOTNET_VERSION_EXAMPLES="4.6"
317+
cmake ${LRS_SRC_DIR} -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DCHECK_FOR_UPDATES=false -DBUILD_PYTHON_BINDINGS=true -DFORCE_RSUSB_BACKEND=true -DBUILD_CSHARP_BINDINGS=true -DDOTNET_VERSION_LIBRARY="4.8" -DDOTNET_VERSION_EXAMPLES="4.8"
318318
319319
- name: Build
320320
# Build your program with the given configuration
@@ -719,6 +719,6 @@ jobs:
719719
run: |
720720
mkdir build
721721
cd build
722-
cmake .. -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_ROSBAG2=OFF
722+
cmake .. -A x64 -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_ROSBAG2=OFF
723723
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -m
724724

CMake/android_config.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ macro(os_set_flags)
1919

2020
if(FORCE_RSUSB_BACKEND)
2121
set(BACKEND RS2_USE_ANDROID_BACKEND)
22-
set(IMPORT_DEPTH_CAM_FW OFF)
2322
else()
2423
set(BACKEND RS2_USE_V4L2_BACKEND)
2524
endif()

CMake/lrs_options.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ option(BUILD_UNITY_BINDINGS "Copy the unity project to the build folder with the
3131
option(BUILD_OPENVINO_EXAMPLES "Build Intel OpenVINO Toolkit examples - requires INTEL_OPENVINO_DIR" OFF)
3232
option(BUILD_OPEN3D_EXAMPLES "Build Open3D examples" OFF)
3333
option(BUILD_OPENNI2_BINDINGS "Build OpenNI bindings" OFF)
34-
option(IMPORT_DEPTH_CAM_FW "Download the latest firmware for the depth cameras" ON)
3534
option(BUILD_CV_KINFU_EXAMPLE "Build OpenCV KinectFusion example" OFF)
3635
option(FORCE_RSUSB_BACKEND "Use RS USB backend, mandatory for Win7/MacOS/Android, optional for Linux" OFF)
3736
option(FORCE_LIBUVC "Explicitly turn-on libuvc backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ if(${FORCE_LIBUVC} OR ${FORCE_WINUSB_UVC} OR ${ANDROID_USB_HOST_UVC})
1515
set(FORCE_RSUSB_BACKEND ON)
1616
endif()
1717

18-
# Checking Internet connection, as DEPTH CAM needs to download the FW from amazon cloud
19-
if(IMPORT_DEPTH_CAM_FW AND NOT INTERNET_CONNECTION)
20-
message(WARNING "No internet connection, disabling IMPORT_DEPTH_CAM_FW")
21-
set(IMPORT_DEPTH_CAM_FW OFF)
22-
endif()
23-
2418
if (BUILD_PC_STITCHING AND NOT BUILD_GLSL_EXTENSIONS)
2519
MESSAGE(STATUS "BUILD_PC_STITCHING explicitely depends on BUILD_GLSL_EXTENSIONS, set it ON")
2620
SET(BUILD_GLSL_EXTENSIONS ON)
@@ -117,10 +111,6 @@ if(BUILD_UNIT_TESTS)
117111
add_subdirectory(unit-tests)
118112
endif()
119113

120-
if(IMPORT_DEPTH_CAM_FW)
121-
add_subdirectory(common/fw)
122-
endif()
123-
124114
include(CMake/embedd_udev_rules.cmake)
125115

126116
if( BUILD_RS2_ALL )

0 commit comments

Comments
 (0)