release/4.3a0
kartik arcot 2023-01-12 13:39:52 -08:00
parent 1f833a0bc3
commit 51e60cc8e0
4 changed files with 11 additions and 11 deletions

View File

@ -43,13 +43,13 @@ struct Keypoints {
// Optional scale of the detections, of shape N. // Optional scale of the detections, of shape N.
// Note: gtsam::Vector is typedef'd for Eigen::VectorXd. // Note: gtsam::Vector is typedef'd for Eigen::VectorXd.
boost::optional<gtsam::Vector> scales; std::optional<gtsam::Vector> scales;
/// Optional confidences/responses for each detection, of shape N. /// Optional confidences/responses for each detection, of shape N.
boost::optional<gtsam::Vector> responses; std::optional<gtsam::Vector> responses;
Keypoints(const Eigen::MatrixX2d& coordinates) Keypoints(const Eigen::MatrixX2d& coordinates)
: coordinates(coordinates){}; // boost::none : coordinates(coordinates){}; // std::nullopt
}; };
using KeypointsVector = std::vector<Keypoints>; using KeypointsVector = std::vector<Keypoints>;

View File

@ -424,8 +424,8 @@ NonlinearFactorGraph SfmData::generalSfmFactors(
/* ************************************************************************** */ /* ************************************************************************** */
NonlinearFactorGraph SfmData::sfmFactorGraph( NonlinearFactorGraph SfmData::sfmFactorGraph(
const SharedNoiseModel &model, boost::optional<size_t> fixedCamera, const SharedNoiseModel &model, std::optional<size_t> fixedCamera,
boost::optional<size_t> fixedPoint) const { std::optional<size_t> fixedPoint) const {
NonlinearFactorGraph graph = generalSfmFactors(model); NonlinearFactorGraph graph = generalSfmFactors(model);
using noiseModel::Constrained; using noiseModel::Constrained;
if (fixedCamera) { if (fixedCamera) {

View File

@ -102,14 +102,14 @@ struct GTSAM_EXPORT SfmData {
* Note: pose keys are simply integer indices, points use Symbol('p', j). * Note: pose keys are simply integer indices, points use Symbol('p', j).
* *
* @param model a noise model for projection errors * @param model a noise model for projection errors
* @param fixedCamera which camera to fix, if any (use boost::none if none) * @param fixedCamera which camera to fix, if any (use std::nullopt if none)
* @param fixedPoint which point to fix, if any (use boost::none if none) * @param fixedPoint which point to fix, if any (use std::nullopt if none)
* @return NonlinearFactorGraph * @return NonlinearFactorGraph
*/ */
NonlinearFactorGraph sfmFactorGraph( NonlinearFactorGraph sfmFactorGraph(
const SharedNoiseModel& model = noiseModel::Isotropic::Sigma(2, 1.0), const SharedNoiseModel& model = noiseModel::Isotropic::Sigma(2, 1.0),
boost::optional<size_t> fixedCamera = 0, std::optional<size_t> fixedCamera = 0,
boost::optional<size_t> fixedPoint = 0) const; std::optional<size_t> fixedPoint = 0) const;
/// @} /// @}
/// @name Testable /// @name Testable

View File

@ -56,7 +56,7 @@ public:
* the Jacobian will be multiplied with 1/sigma = sqrt(gamma). * the Jacobian will be multiplied with 1/sigma = sqrt(gamma).
*/ */
ShonanGaugeFactor(Key key, size_t p, size_t d = 3, ShonanGaugeFactor(Key key, size_t p, size_t d = 3,
boost::optional<double> gamma = boost::none) std::optional<double> gamma = {})
: NonlinearFactor(KeyVector{key}) { : NonlinearFactor(KeyVector{key}) {
if (p < d) { if (p < d) {
throw std::invalid_argument("ShonanGaugeFactor must have p>=d."); throw std::invalid_argument("ShonanGaugeFactor must have p>=d.");
@ -103,4 +103,4 @@ public:
}; };
// \ShonanGaugeFactor // \ShonanGaugeFactor
} // namespace gtsam } // namespace gtsam