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

do not run calibration if no feature finders #167

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions robot_calibration/include/robot_calibration/finders/loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ class FeatureFinderLoader
{
features[name] = finder;
}
else
{
RCLCPP_ERROR(logger, "Feature finder %s failed to initialize", name.c_str());
}
}

// Make sure at least one finder loaded correctly
if (features.empty())
{
RCLCPP_FATAL(logger, "No feature finders loaded");
return false;
}

return true;
Expand Down
6 changes: 5 additions & 1 deletion robot_calibration/src/nodes/calibrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ int main(int argc, char** argv)
{
// No name provided for a calibration bag file, must do capture
robot_calibration::CaptureManager capture_manager;
capture_manager.init(node);
if (!capture_manager.init(node))
{
// Error will be printed in function
return -1;
}

// Save URDF for calibration/export step
description_msg.data = capture_manager.getUrdf();
Expand Down