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

Solve #600 (ExtrapolationException & its error_code) #601

Merged
merged 2 commits into from
May 8, 2023
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
7 changes: 5 additions & 2 deletions tf2/src/buffer_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ tf2::TF2Error BufferCore::walkToTopParent(
uint32_t depth = 0;

TF2Error error_code = TF2Error::TF2_NO_ERROR;
TF2Error extrapolation_error_code = TF2Error::TF2_NO_ERROR;
std::string extrapolation_error_string;
bool extrapolation_might_have_occurred = false;

Expand All @@ -367,7 +368,9 @@ tf2::TF2Error BufferCore::walkToTopParent(
break;
}

CompactFrameID parent = f.gather(cache, time, &extrapolation_error_string, &error_code);
CompactFrameID parent = f.gather(
cache, time, &extrapolation_error_string,
&extrapolation_error_code);
if (parent == 0) {
// Just break out here... there may still be a path from source -> target
top_parent = frame;
Expand Down Expand Up @@ -458,7 +461,7 @@ tf2::TF2Error BufferCore::walkToTopParent(
lookupFrameString(source_id) << "] to frame [" << lookupFrameString(target_id) << "]";
*error_string = ss.str();
}
return error_code;
return extrapolation_error_code;
}
createConnectivityErrorString(source_id, target_id, error_string);
return tf2::TF2Error::TF2_CONNECTIVITY_ERROR;
Expand Down