Skip to content

Commit

Permalink
icp_odom: Fixed scan without stamps field after projecting to point c…
Browse files Browse the repository at this point in the history
…loud before deskewing
  • Loading branch information
matlabbe committed Nov 27, 2023
1 parent 8129ace commit e3452e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtabmap_conversions/src/MsgConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2853,6 +2853,12 @@ bool deskew_impl(
if(offsetTime < 0)
{
ROS_ERROR("Input cloud doesn't have \"t\", \"time\", \"stamps\" or \"timestamp\" field!");
std::string fieldsReceived;
for(size_t i=0; i<input.fields.size(); ++i)
{
fieldsReceived += input.fields[i].name + " ";
}
ROS_ERROR("Input cloud has these fields: %s", fieldsReceived.c_str());
return false;
}
if(offsetX < 0)
Expand Down
1 change: 1 addition & 0 deletions rtabmap_odom/src/nodelets/icp_odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ class ICPOdometry : public OdometryROS
*scanMsg,
scanOut,
this->tfListener(),
-1.0,
laser_geometry::channel_option::Intensity | laser_geometry::channel_option::Timestamp);

if(guessFrameId().empty() && previousStamp() > 0 && !velocityGuess().isNull())
Expand Down

0 comments on commit e3452e1

Please sign in to comment.