forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D457 Segfault when calling get_motion_intrinsics
- Loading branch information
Showing
5 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# License: Apache 2.0. See LICENSE file in root directory. | ||
# Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
|
||
# test:device:jetson D457 | ||
# test:device:!jetson D455 | ||
# This test check existence motion intrinsic data in accel and gyro profiles. | ||
|
||
import pyrealsense2 as rs | ||
from rspy import test, log | ||
|
||
device = test.find_first_device_or_exit() | ||
motion_sensor = device.first_motion_sensor() | ||
|
||
test.start('Check intrinsics in motion sensor:') | ||
|
||
test.check(motion_sensor) | ||
|
||
if motion_sensor: | ||
|
||
motion_profile_accel = next(p for p in motion_sensor.profiles if p.stream_type() == rs.stream.accel) | ||
motion_profile_gyro = next(p for p in motion_sensor.profiles if p.stream_type() == rs.stream.gyro) | ||
|
||
test.check(motion_profile_accel and motion_profile_gyro) | ||
|
||
if motion_profile_accel: | ||
motion_profile_accel = motion_profile_accel.as_motion_stream_profile() | ||
intrinsics_accel = motion_profile_accel.get_motion_intrinsics() | ||
|
||
log.d(str(intrinsics_accel)) | ||
test.check(len(str(intrinsics_accel)) > 0) # Checking if intrinsics has data | ||
|
||
if motion_profile_gyro: | ||
motion_profile_gyro = motion_profile_gyro.as_motion_stream_profile() | ||
intrinsics_gyro = motion_profile_gyro.get_motion_intrinsics() | ||
|
||
log.d(intrinsics_gyro) | ||
test.check(len(str(intrinsics_gyro)) > 0) # Checking if intrinsics has data | ||
|
||
test.finish() | ||
test.print_results_and_exit() |