暂时还没解决
今天安装完Intel D435i的libRealsense后,在终端运行roslaunch realsense2_camera rs_camera.launch时
roslaunch realsense2_camera rs_camera.launch
返回报错:
12/11 22:13:14,505 WARNING [140508912400128] (types.cpp:78) hwmon command 0x7d( 0 0 0 0 ) failed (response -21= No data to return)
terminate called after throwing an instance of 'rs2::invalid_value_error'
what(): hwmon command 0x7d( 0 0 0 0 ) failed (response -21= No data to return)
[camera/realsense2_camera_manager-2] process has died [pid 14638, exit code -6, cmd /opt/ros/melodic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/chen/.ros/log/abbbb13e-43c2-11ec-838f-5d8e3cdba66e/camera-realsense2_camera_manager-2.log].
log file: /home/chen/.ros/log/abbbb13e-43c2-11ec-838f-5d8e3cdba66e/camera-realsense2_camera_manager-2*.log
[camera/realsense2_camera-3] process has finished cleanly
log file: /home/chen/.ros/log/abbbb13e-43c2-11ec-838f-5d8e3cdba66e/camera-realsense2_camera-3*.log
然后在网上查了一下,在github上有看到一个老哥和我一样的情况,原贴是这个https://github.com/IntelRealSense/realsense-ros/issues/1633
Author自己debug出了解决方法,
After more debugging, it seems that the issue happens when calling
sensor.get_option(option)
, whereoption
is such thatnh1.resolveName(option_name)=="/camera/stereo_module/emitter_on_off"
A quick workaround was to add
if(nh1.resolveName(option_name)=="/camera/stereo_module/emitter_on_off"){ continue; }
before the
if (is_checkbox(sensor, option))
ofbase_realsense_node.cpp
.The camera is working now after that fix, but is there a better way to solve this?
那么就先尝试下Author给的方法,加如这段代码,但是要加入哪个文件着实让我困惑,Author也没说是哪个文件,我找了很久,还是没有找到;