Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore time difference order so future extrapolation exceptions show positive seconds into future #522

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tf2/src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ void createExtrapolationException2(ros::Time t0, ros::Time t1, std::string* erro
{
if (error_str)
{
ros::Duration tdiff = t1 - t0;
// Want this to come out positive, because this is a future extrapolation problem with t0
// t0 needs to come first because it will be bigger than t1
ros::Duration tdiff = t0 - t1;
char str[163]; // Text without formatting strings has 102, each timestamp has up to 20
snprintf(
str, sizeof(str),
Expand Down