parent
00a9564299
commit
9579db73ea
|
@ -32,7 +32,7 @@ namespace gtsam {
|
|||
|
||||
//******************************************************************************
|
||||
boost::shared_ptr<noiseModel::Isotropic> ConvertPose3NoiseModel(
|
||||
const SharedNoiseModel &model, size_t d, bool defaultToUnit) {
|
||||
const SharedNoiseModel& model, size_t d, bool defaultToUnit) {
|
||||
double sigma = 1.0;
|
||||
if (model != nullptr) {
|
||||
if (model->dim() != 6) {
|
||||
|
@ -67,18 +67,15 @@ FrobeniusWormholeFactor::FrobeniusWormholeFactor(
|
|||
G_ = boost::make_shared<Matrix>();
|
||||
*G_ = SOn::VectorizedGenerators(p); // expensive!
|
||||
}
|
||||
if (static_cast<size_t>(G_->rows()) != pp_ ||
|
||||
static_cast<size_t>(G_->cols()) != SOn::Dimension(p))
|
||||
throw std::invalid_argument(
|
||||
"FrobeniusWormholeFactor: passed in generators "
|
||||
if (G_->rows() != pp_ || G_->cols() != SOn::Dimension(p))
|
||||
throw std::invalid_argument("FrobeniusWormholeFactor: passed in generators "
|
||||
"of incorrect dimension.");
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
void FrobeniusWormholeFactor::print(const std::string &s,
|
||||
const KeyFormatter &keyFormatter) const {
|
||||
std::cout << s << "FrobeniusWormholeFactor<" << p_ << ">("
|
||||
<< keyFormatter(key1()) << "," << keyFormatter(key2()) << ")\n";
|
||||
void FrobeniusWormholeFactor::print(const std::string &s, const KeyFormatter &keyFormatter) const {
|
||||
std::cout << s << "FrobeniusWormholeFactor<" << p_ << ">(" << keyFormatter(key1()) << ","
|
||||
<< keyFormatter(key2()) << ")\n";
|
||||
traits<Matrix>::Print(M_, " M: ");
|
||||
noiseModel_->print(" noise model: ");
|
||||
}
|
||||
|
@ -93,12 +90,12 @@ bool FrobeniusWormholeFactor::equals(const NonlinearFactor &expected,
|
|||
|
||||
//******************************************************************************
|
||||
Vector FrobeniusWormholeFactor::evaluateError(
|
||||
const SOn &Q1, const SOn &Q2, boost::optional<Matrix &> H1,
|
||||
boost::optional<Matrix &> H2) const {
|
||||
const SOn& Q1, const SOn& Q2, boost::optional<Matrix&> H1,
|
||||
boost::optional<Matrix&> H2) const {
|
||||
gttic(FrobeniusWormholeFactorP_evaluateError);
|
||||
|
||||
const Matrix &M1 = Q1.matrix();
|
||||
const Matrix &M2 = Q2.matrix();
|
||||
const Matrix& M1 = Q1.matrix();
|
||||
const Matrix& M2 = Q2.matrix();
|
||||
assert(M1.rows() == p_ && M2.rows() == p_);
|
||||
|
||||
const size_t dim = 3 * p_; // Stiefel manifold dimension
|
||||
|
|
Loading…
Reference in New Issue