ISSUE DESCRIPTION:
How can I get device temperature via Python code for RealSense D435, D415 or L515 cameras?
ENVIRONMENT:
CAUSE:
RESOLUTION:
Below is the python pseudo-code you can use to find different component temperatures. To get temperature data for the RealSense L515 camera you must use librealsense 2.35.2 or above. You must be actively streaming depth to get temperature readings.
You can use the following temperature options:
D400 series:
- rs.option.projector_temperature
- rs.option.asic_temperature
L500 series:
- rs.option.lld_temperature
- rs.option.ma_temperature
- rs.option.mc_temperature
import pyrealsense2 as rs
try:
pipeline = rs.pipeline()pipeline_profile = pipeline.start()
sensor = pipeline_profile.get_device().first_depth_sensor()
while True:
# This call waits until a new coherent set of frames is available on a device
# Calls to get_frame_data(...) and get_frame_timestamp(...) on a device will return stable values until wait_for_frames(...) is called
frames = pipeline.wait_for_frames()
depth = frames.get_depth_frame()
if not depth: continue
if sensor.supports(rs.option.projector_temperature):projector = sensor.get_option(rs.option.projector_temperature)
print("projector = ", projector)
Comments
0 comments
Article is closed for comments.