7 test.set_env_vars({
"RS2_AC_DISABLE_CONDITIONS":
"0",
8 "RS2_AC_LOG_TO_STDOUT":
"1" 11 import pyrealsense2
as rs
16 dev = test.find_first_device_or_exit()
17 depth_sensor = dev.first_depth_sensor()
18 color_sensor = dev.first_color_sensor()
20 d2r = rs.device_calibration(dev)
21 d2r.register_calibration_change_callback( ac.status_list_callback )
23 cp =
next(p
for p
in color_sensor.profiles
if p.fps() == 30
24 and p.stream_type() == rs.stream.color
25 and p.format() == rs.format.yuyv
26 and p.as_video_stream_profile().width() == 1280
27 and p.as_video_stream_profile().height() == 720)
30 depth_sensor.profiles
if p.fps() == 30
31 and p.stream_type() == rs.stream.depth
32 and p.format() == rs.format.z16
33 and p.as_video_stream_profile().width() == 1024
34 and p.as_video_stream_profile().height() == 768)
36 depth_sensor.open( dp )
37 depth_sensor.start(
lambda f:
None )
38 color_sensor.open( cp )
39 color_sensor.start(
lambda f:
None )
42 test.start(
"Failing check_conditions function")
45 old_receiver_gain = depth_sensor.get_option(rs.option.receiver_gain)
46 depth_sensor.set_option(rs.option.receiver_gain, 15)
48 d2r.trigger_device_calibration( rs.calibration_type.manual_depth_to_rgb )
50 ac.wait_for_calibration()
51 except Exception
as e:
52 test.check_exception(e, RuntimeError)
54 test.unexpected_exception()
55 test.check_equal_lists(ac.status_list, [rs.calibration_status.bad_conditions])
56 depth_sensor.set_option(rs.option.receiver_gain, old_receiver_gain)
65 test.print_results_and_exit()
virtual frame finish(frame f)
void next(auto_any_t cur, type2type< T, C > *)