Skip to content

Commit

Permalink
Include timestamps from the projected laser
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianoGuadagnino committed Nov 21, 2024
1 parent a4f7415 commit 6c9c4a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ros/src/kinematic_icp_ros/utils/TimeStampHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ using Header = std_msgs::msg::Header;
std::optional<PointField> GetTimestampField(const PointCloud2::ConstSharedPtr msg) {
PointField timestamp_field;
for (const auto &field : msg->fields) {
if ((field.name == "t" || field.name == "timestamp" || field.name == "time")) {
if ((field.name == "t" || field.name == "timestamp" || field.name == "time" ||
field.name == "stamps")) {
timestamp_field = field;
}
}
if (timestamp_field.count) return timestamp_field;
RCLCPP_WARN_ONCE(rclcpp::get_logger("kinematic_icp_ros"),
"Field 't', 'timestamp', or 'time' does not exist. "
"Field 't', 'timestamp', 'time', or 'stamps' does not exist. "
"Disabling scan deskewing");
return {};
}
Expand Down

0 comments on commit 6c9c4a4

Please sign in to comment.