sick官方驱动包,使用tim571报错。
解决方法:
进入驱动文件夹,打开sick_tim551_2050001_parser.cpp
第291~297行
msg.header.stamp = start_time - ros::Duration().fromSec(number_of_data * msg.time_increment);
// - shift forward to time of first published scan point
msg.header.stamp += ros::Duration().fromSec((double)index_min * msg.time_increment);
// - add time offset (to account for USB latency etc.)
msg.header.stamp += ros::Duration().fromSec(config.time_offset);
改为
msg.header.stamp = start_time - ros::Duration/*().fromSec(*/(number_of_data * msg.time_increment);
// - shift forward to time of first published scan point
msg.header.stamp += ros::Duration/*().fromSec*/((double)index_min * msg.time_increment);
// - add time offset (to account for USB latency etc.)
msg.header.stamp += ros::Duration/*().fromSec*/(config.time_offset);