Skip to content

Instantly share code, notes, and snippets.

@chrismatthieu
Created November 14, 2025 20:39
Show Gist options
  • Select an option

  • Save chrismatthieu/b5e0890c44d8fbe9ea5edc31a6c0ff7c to your computer and use it in GitHub Desktop.

Select an option

Save chrismatthieu/b5e0890c44d8fbe9ea5edc31a6c0ff7c to your computer and use it in GitHub Desktop.
You cannot set a temperature threshold on a RealSense camera via the SDK; instead, you can read the internal temperature and use the information to determine if the camera is operating within safe limits. The laser will automatically adjust power or shut off if the projector temperature exceeds a threshold (around \(60^{\circ }C\)) to protect the camera. You can access the temperature values like rs.option.asic_temperature or rs.option.projector_temperature through the SDK, for example, by using sensor.get_option() in Python. How to get the temperature Start streaming: Begin streaming from the camera using rs.pipeline() and pipeline.start().Get the sensor: Obtain the sensor object for the depth sensor using pipeline_profile.get_device().first_depth_sensor().Access the temperature option: Call sensor.get_option() with the appropriate option. For example, to get the ASIC temperature, use rs.option.asic_temperature.For D400 series: Use rs.option.projector_temperature or rs.option.asic_temperature.For L500 series: Use rs.option.lld_temperature, rs.option.ma_temperature, or rs.option.mc_temperature.Use the value: The function will return a floating-point value representing the temperature in degrees Celsius. Important considerations No user-settable threshold: The SDK does not allow you to set a threshold for the camera's internal temperature. Instead, it uses built-in safety mechanisms.Laser safety: The laser will automatically reduce its power and eventually shut off if the projector temperature exceeds the safe limit (e.g., \(>60^{\circ }C\)).Operating range: The recommended operating temperature is about \(35^{\circ }C\), though the camera can often operate up to \(42^{\circ }C\) without issues. The official laser safety mechanism is based on a threshold of around \(60^{\circ }C\).Viewer option: You can view these temperature readings in real-time in the RealSense Viewer's "Controls" section. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment