fix compile
This commit is contained in:
parent
3bb45510b5
commit
e2e1ff0c70
|
@ -93,7 +93,7 @@ set(CMAKE_CXX_FLAGS_CIDEBUG "-O0 -DEIGEN_INITIALIZE_MATRICES_BY_NAN")
|
||||||
set(CMAKE_CXX_FLAGS_CIRELWITHDEBINFO "-O3 -DEIGEN_INITIALIZE_MATRICES_BY_NAN") # CI version with no debug symbols
|
set(CMAKE_CXX_FLAGS_CIRELWITHDEBINFO "-O3 -DEIGEN_INITIALIZE_MATRICES_BY_NAN") # CI version with no debug symbols
|
||||||
|
|
||||||
# base set of compile flags
|
# base set of compile flags
|
||||||
set(BASALT_CXX_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -ftemplate-backtrace-limit=0")
|
set(BASALT_CXX_FLAGS "-Wall -Wextra -Werror -Wno-error=unused-parameter -Wno-error=maybe-uninitialized -ftemplate-backtrace-limit=0")
|
||||||
|
|
||||||
# clang-specific compile flags
|
# clang-specific compile flags
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
|
|
@ -77,7 +77,7 @@ class CalibHelper {
|
||||||
calib_corners_rejected);
|
calib_corners_rejected);
|
||||||
|
|
||||||
static void initCamPoses(
|
static void initCamPoses(
|
||||||
const Calibration<double>::Ptr& calib, const VioDatasetPtr& vio_data,
|
const Calibration<double>::Ptr& calib,
|
||||||
const Eigen::vector<Eigen::Vector4d>& aprilgrid_corner_pos_3d,
|
const Eigen::vector<Eigen::Vector4d>& aprilgrid_corner_pos_3d,
|
||||||
tbb::concurrent_unordered_map<TimeCamId, CalibCornerData>& calib_corners,
|
tbb::concurrent_unordered_map<TimeCamId, CalibCornerData>& calib_corners,
|
||||||
tbb::concurrent_unordered_map<TimeCamId, CalibInitPoseData>&
|
tbb::concurrent_unordered_map<TimeCamId, CalibInitPoseData>&
|
||||||
|
|
|
@ -101,8 +101,7 @@ struct LinearizeSplineOpt : public LinearizeBase<Scalar> {
|
||||||
const SplineT* spline;
|
const SplineT* spline;
|
||||||
|
|
||||||
LinearizeSplineOpt(size_t opt_size, const SplineT* spl,
|
LinearizeSplineOpt(size_t opt_size, const SplineT* spl,
|
||||||
const CalibCommonData& common_data,
|
const CalibCommonData& common_data)
|
||||||
const SplineT* spl_lin = nullptr)
|
|
||||||
: opt_size(opt_size), spline(spl) {
|
: opt_size(opt_size), spline(spl) {
|
||||||
this->common_data = common_data;
|
this->common_data = common_data;
|
||||||
|
|
||||||
|
@ -670,8 +669,7 @@ struct ComputeErrorSplineOpt : public LinearizeBase<Scalar> {
|
||||||
const SplineT* spline;
|
const SplineT* spline;
|
||||||
|
|
||||||
ComputeErrorSplineOpt(size_t opt_size, const SplineT* spl,
|
ComputeErrorSplineOpt(size_t opt_size, const SplineT* spl,
|
||||||
const CalibCommonData& common_data,
|
const CalibCommonData& common_data)
|
||||||
const SplineT* spl_lin = nullptr)
|
|
||||||
: opt_size(opt_size), spline(spl) {
|
: opt_size(opt_size), spline(spl) {
|
||||||
this->common_data = common_data;
|
this->common_data = common_data;
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ void CalibHelper::detectCorners(
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibHelper::initCamPoses(
|
void CalibHelper::initCamPoses(
|
||||||
const Calibration<double>::Ptr &calib, const VioDatasetPtr &vio_data,
|
const Calibration<double>::Ptr &calib,
|
||||||
const Eigen::vector<Eigen::Vector4d> &aprilgrid_corner_pos_3d,
|
const Eigen::vector<Eigen::Vector4d> &aprilgrid_corner_pos_3d,
|
||||||
tbb::concurrent_unordered_map<TimeCamId, CalibCornerData> &calib_corners,
|
tbb::concurrent_unordered_map<TimeCamId, CalibCornerData> &calib_corners,
|
||||||
tbb::concurrent_unordered_map<TimeCamId, CalibInitPoseData>
|
tbb::concurrent_unordered_map<TimeCamId, CalibInitPoseData>
|
||||||
|
|
|
@ -528,7 +528,7 @@ void CamCalib::initCamPoses() {
|
||||||
|
|
||||||
std::cout << "Started initial camera pose computation " << std::endl;
|
std::cout << "Started initial camera pose computation " << std::endl;
|
||||||
|
|
||||||
CalibHelper::initCamPoses(calib_opt->calib, this->vio_dataset,
|
CalibHelper::initCamPoses(calib_opt->calib,
|
||||||
april_grid.aprilgrid_corner_pos_3d,
|
april_grid.aprilgrid_corner_pos_3d,
|
||||||
this->calib_corners, this->calib_init_poses);
|
this->calib_corners, this->calib_init_poses);
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ void CamImuCalib::initCamPoses() {
|
||||||
{
|
{
|
||||||
std::cout << "Started initial camera pose computation " << std::endl;
|
std::cout << "Started initial camera pose computation " << std::endl;
|
||||||
|
|
||||||
CalibHelper::initCamPoses(calib_opt->calib, this->vio_dataset,
|
CalibHelper::initCamPoses(calib_opt->calib,
|
||||||
april_grid.aprilgrid_corner_pos_3d,
|
april_grid.aprilgrid_corner_pos_3d,
|
||||||
this->calib_corners, this->calib_init_poses);
|
this->calib_corners, this->calib_init_poses);
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@ void KeypointVioEstimator::linearizeMargPrior(const AbsOrderMap& aom,
|
||||||
|
|
||||||
BASALT_ASSERT(size_t(marg_H.cols()) == marg_order.total_size);
|
BASALT_ASSERT(size_t(marg_H.cols()) == marg_order.total_size);
|
||||||
|
|
||||||
|
// Check if the order of variables is the same.
|
||||||
|
for (const auto& kv : marg_order.abs_order_map)
|
||||||
|
BASALT_ASSERT(aom.abs_order_map.at(kv.first) == kv.second);
|
||||||
|
|
||||||
size_t marg_size = marg_order.total_size;
|
size_t marg_size = marg_order.total_size;
|
||||||
abs_H.topLeftCorner(marg_size, marg_size) += marg_H;
|
abs_H.topLeftCorner(marg_size, marg_size) += marg_H;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue