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

fix(gnss_poser): no conversion when projection type is local #6356

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: 7 additions & 0 deletions sensing/gnss_poser/src/gnss_poser_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
return;
}

if (projector_info_.projector_type == MapProjectorInfo::Message::LOCAL) {
RCLCPP_ERROR_THROTTLE(

Check warning on line 82 in sensing/gnss_poser/src/gnss_poser_core.cpp

View check run for this annotation

Codecov / codecov/patch

sensing/gnss_poser/src/gnss_poser_core.cpp#L81-L82

Added lines #L81 - L82 were not covered by tests
this->get_logger(), *this->get_clock(), std::chrono::milliseconds(5000).count(),
"map_projector_info is local projector type. Unable to convert GNSS pose.");
return;

Check warning on line 85 in sensing/gnss_poser/src/gnss_poser_core.cpp

View check run for this annotation

Codecov / codecov/patch

sensing/gnss_poser/src/gnss_poser_core.cpp#L85

Added line #L85 was not covered by tests
}

Check warning on line 87 in sensing/gnss_poser/src/gnss_poser_core.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

GNSSPoser::callbackNavSatFix increases in cyclomatic complexity from 11 to 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
// check fixed topic
const bool is_fixed = isFixed(nav_sat_fix_msg_ptr->status);

Expand Down
Loading