Skip to content

Commit

Permalink
Merge branch 'master' of github.com:introlab/rtabmap_ros into fixing_…
Browse files Browse the repository at this point in the history
…sync_and_delays
  • Loading branch information
matlabbe committed Dec 1, 2024
2 parents 723ac7c + e5667b2 commit 3a782a7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rtabmap_conversions/src/MsgConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3058,6 +3058,25 @@ bool deskew_impl(
}
}

if(secFirst > 1.e18)
{
// convert nanoseconds to seconds
secFirst /= 1.e9;
secLast /= 1.e9;
}
else if(secFirst > 1.e15)
{
// convert microseconds to seconds
secFirst /= 1.e6;
secLast /= 1.e6;
}
else if(secFirst > 1.e12)
{
// convert milliseconds to seconds
secFirst /= 1.e3;
secLast /= 1.e3;
}

firstStamp = timestampToROS(secFirst);
lastStamp = timestampToROS(secLast);
}
Expand Down

0 comments on commit 3a782a7

Please sign in to comment.