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 some problem #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion svo_ceres_backend/src/estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ bool Estimator::addStates(const FrameBundleConstPtr& frame_bundle,
information(0,0) = 1.0e8;
information(1,1) = 1.0e8;
information(2,2) = 1.0e8;
information(3,3) = 1.0e-8; // numeric issue
information(4,4) = 1.0e-8; // numeric issue
std::shared_ptr<ceres_backend::PoseError > pose_error =
std::make_shared<ceres_backend::PoseError>(T_WS, information);
map_ptr_->addResidualBlock(pose_error, nullptr, pose_parameter_block);
Expand Down Expand Up @@ -563,7 +565,7 @@ bool Estimator::addVelocityPrior(BackendId nframe_id,
Eigen::Matrix<double, 9, 9> information;
information.setIdentity();
information.topLeftCorner<3, 3>() *= speed_information;
information.bottomLeftCorner<6, 6>() *= bias_information;
information.bottomRightCorner<6, 6>() *= bias_information;
std::shared_ptr<ceres_backend::SpeedAndBiasError> prior =
std::make_shared<ceres_backend::SpeedAndBiasError>(speed_and_bias, information);
ceres::ResidualBlockId id =
Expand Down Expand Up @@ -1663,6 +1665,8 @@ bool Estimator::setFrameFixed(const BundleId &fixed_frame_bundle_id,
information(1, 1) = 1.0e35;
information(2, 2) = 1.0e35;
information(5, 5) = 1.0e35;
information(3, 3) = 1.0e-8; // numeric issue
information(4, 4) = 1.0e-8; // numeric issue
std::shared_ptr<ceres_backend::PoseError> pose_error =
std::make_shared<ceres_backend::PoseError>(T_WS_new, information);
std::shared_ptr<ceres_backend::PoseParameterBlock> block_ptr =
Expand Down Expand Up @@ -1694,6 +1698,8 @@ void Estimator::setOldestFrameFixed()
information(1, 1) = 1.0e14;
information(2, 2) = 1.0e14;
information(5, 5) = 1.0e14;
information(3, 3) = 1.0e-8; // numeric issue
information(4, 4) = 1.0e-8; // numeric issue
std::shared_ptr<ceres_backend::PoseError> pose_error =
std::make_shared<ceres_backend::PoseError>(T_WS_0, information);
map_ptr_->addResidualBlock(
Expand Down
4 changes: 2 additions & 2 deletions svo_direct/src/feature_detection_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ void fastDetector(
img_pyr[level].rows, img_pyr[level].step, threshold, fast_corners);
#else
fast::fast_corner_detect_10(
(fast::fast_byte*) img_pyr[L].data, img_pyr[L].cols,
img_pyr[L].rows, img_pyr[L].step, threshold, fast_corners);
(fast::fast_byte*) img_pyr[level].data, img_pyr[level].cols,
img_pyr[level].rows, img_pyr[level].step, threshold, fast_corners);
#endif
std::vector<int> scores, nm_corners;
fast::fast_corner_score_10((fast::fast_byte*) img_pyr[level].data, img_pyr[level].step,
Expand Down