Skip to content

Commit 14de79b

Browse files
committed
try to fix unresolved external symbol error
and dividing by zero problem
1 parent 9712acd commit 14de79b

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

gtsam/geometry/SO3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ Vector3 SO3::ChartAtOrigin::Local(const SO3& R, ChartJacobian H) {
388388
//******************************************************************************
389389
template <>
390390
GTSAM_EXPORT
391-
Vector9 SO3::vec(OptionalJacobian<9, 3> H) const {
391+
Vector9 SO<3>::vec(OptionalJacobian<9, 3> H) const {
392392
const Matrix3& R = matrix_;
393393
if (H) {
394394
H->setZero();

gtsam/geometry/SO3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Vector3 SO3::ChartAtOrigin::Local(const SO3& R, ChartJacobian H);
9797

9898
template <>
9999
GTSAM_EXPORT
100-
Vector9 SO3::vec(OptionalJacobian<9, 3> H) const;
100+
Vector9 SO<3>::vec(OptionalJacobian<9, 3> H) const;
101101

102102
#if GTSAM_ENABLE_BOOST_SERIALIZATION
103103
template <class Archive>

gtsam/linear/NoiseModel.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ namespace gtsam {
575575
* An isotropic noise model created by specifying a precision
576576
*/
577577
static shared_ptr Precision(size_t dim, double precision, bool smart = true) {
578+
if (0 == precision) {
579+
return nullptr;
580+
}
578581
return Variance(dim, 1.0/precision, smart);
579582
}
580583

0 commit comments

Comments
 (0)