Unable to get ASIC and Project temperature for D435i cameras
Hi.
I am using 3 D435i cameras. Their firmware revisions are listed below:
onnected devices:
1) Name: Intel RealSense D435I, serial number: 040322073588, update serial number: 041323050330, firmware version: 05.12.15.50, USB type: 3.2
2) Name: Intel RealSense D435I, serial number: 919122071161, update serial number: 925223050766, firmware version: 05.12.15.50, USB type: 3.2
3) Name: Intel RealSense D435I, serial number: 047422071831, update serial number: 047423051635, firmware version: 05.12.15.50, USB type: 3.2
The librealsense SDK version used is: 2.49.0
I have used all sensors in the rs2::device to check for ASIC and projector rs2::options, if it is supported, I get the values using `get_option` ... See code below:
// Get temperature of the camera, once every minute.
auto sensors = rs_device.query_sensors();
for (auto sensor : sensors) {
if(frame_index % 1800 == 0) { // At 30 frames per second, 1 minute is equal to 1800 frames.
if (sensor.supports(RS2_OPTION_ASIC_TEMPERATURE)) {
try
{
double asic_temperature = sensor.get_option(RS2_OPTION_ASIC_TEMPERATURE);
INFO << rs_serial_nbr << ": ASIC temperature " << asic_temperature;
// D435i's official operating temperature is 0-35 degrees C
if(asic_temperature > 35) {
WARNING << rs_serial_nbr << ": High ASIC temperature " << asic_temperature;
}
}
catch(const std::exception& e)
{
WARNING << rs_serial_nbr << ": Failed checking for ASIC temperature." << e.what();
}
} else {
WARNING << rs_serial_nbr << ": sensor does not support ASIC temperature option";
}
if (sensor.supports(RS2_OPTION_PROJECTOR_TEMPERATURE)) {
try
{
double projector_temperature = sensor.get_option(RS2_OPTION_PROJECTOR_TEMPERATURE);
INFO << rs_serial_nbr << ": Projector temperature " << projector_temperature;
if(projector_temperature > 35) {
WARNING << rs_serial_nbr << ": High Projector temperature " << projector_temperature;
}
}
catch(const std::exception& e)
{
WARNING << rs_serial_nbr << ": Failed checking for Projector temperature." << e.what();
}
} else {
WARNING << rs_serial_nbr << ": sensor does not support Projector temperature option";
}
}
}
Unfortunately, I just get warnings that say that none of the sensors support the ASIC and projector options.
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 919122071161: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 047422071831: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 040322073588: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 040322073588: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 040322073588: sensor does not support ASIC temperature option
2021-09-30 16:22:04 [warning]: 040322073588: sensor does not support Projector temperature option
2021-09-30 16:22:04 [warning]: 040322073588: sensor does not support ASIC temperature option
Is this option supported? How can I get its value using C++ and librealsense?
Thanks!
-
I examined your code carefully. I would recommend moving your Else statement to the line directly above the Catch code, so that the Else activates if sensor.supports is found to be false.
if (sensor.supports(RS2_OPTION_ASIC_TEMPERATURE)) {
try
{
double asic_temperature = sensor.get_option(RS2_OPTION_ASIC_TEMPERATURE);
INFO << rs_serial_nbr << ": ASIC temperature " << asic_temperature;
// D435i's official operating temperature is 0-35 degrees C
if(asic_temperature > 35) {
WARNING << rs_serial_nbr << ": High ASIC temperature " << asic_temperature;
}
}}else {
WARNING << rs_serial_nbr << ": sensor does not support ASIC temperature option";
}catch(const std::exception& e)
{
WARNING << rs_serial_nbr << ": Failed checking for ASIC temperature." << e.what();
}You may also have one too many closing brackets at your Else statement, so I suggest trying else { for that line instead of } else {
Please sign in to leave a comment.
Comments
1 comment