astuff / ibeo_lux

ROS Driver for Ibeo LUX and LUX Fusion Sensors
MIT License
12 stars 8 forks source link

Fix of ntp_to_ros_time function #8

Closed ShepelIlya closed 5 years ago

ShepelIlya commented 5 years ago

Fixed conversion from NTP64 time for ros time. ROS uses Unix Epoch Time, so NTP time causes overflow and 'secs' field always was zero.

JWhitleyWork commented 5 years ago

Looks good on principal. @ShepelIlya - Have you tested this on a sensor and does the output look correct? If so, which sensor?

ShepelIlya commented 5 years ago

Yes, I tested it along with the time server and the output was correct. My system consists of two sensors Ibeo Lux HD and ECU module with FeatureFusion system. For sync with ROS time policy I changed time in std_msgs/Header part too, but I think that this code is enough for master branch.

ShepelIlya commented 5 years ago

It may be worthwhile to make an optional time source (NTP or ROS master), which will be placed in the header. It is not true way for ROS applications, but for systems with many different sensors it is very good approach, I think.