Made params const
parent
bf07e7a4d4
commit
272a5115bd
|
|
@ -156,7 +156,7 @@ public:
|
|||
* @param biasHat Current estimate of acceleration and rotation rate biases
|
||||
*/
|
||||
PreintegratedCombinedMeasurements(
|
||||
const boost::shared_ptr<Params>& p,
|
||||
const boost::shared_ptr<const Params>& p,
|
||||
const imuBias::ConstantBias& biasHat = imuBias::ConstantBias())
|
||||
: PreintegrationType(p, biasHat) {
|
||||
preintMeasCov_.setZero();
|
||||
|
|
@ -184,7 +184,7 @@ public:
|
|||
void resetIntegration() override;
|
||||
|
||||
/// const reference to params, shadows definition in base class
|
||||
Params& p() const { return *boost::static_pointer_cast<Params>(this->p_); }
|
||||
const Params& p() const { return *boost::static_pointer_cast<const Params>(this->p_); }
|
||||
/// @}
|
||||
|
||||
/// @name Access instance variables
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ using namespace std;
|
|||
namespace gtsam {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
PreintegrationBase::PreintegrationBase(const boost::shared_ptr<Params>& p,
|
||||
PreintegrationBase::PreintegrationBase(const boost::shared_ptr<const Params>& p,
|
||||
const Bias& biasHat)
|
||||
: p_(p), biasHat_(biasHat), deltaTij_(0.0) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class GTSAM_EXPORT PreintegrationBase {
|
|||
typedef PreintegrationParams Params;
|
||||
|
||||
protected:
|
||||
boost::shared_ptr<Params> p_;
|
||||
boost::shared_ptr<const Params> p_;
|
||||
|
||||
/// Acceleration and gyro bias used for preintegration
|
||||
Bias biasHat_;
|
||||
|
|
@ -67,7 +67,7 @@ class GTSAM_EXPORT PreintegrationBase {
|
|||
* @param p Parameters, typically fixed in a single application
|
||||
* @param bias Current estimate of acceleration and rotation rate biases
|
||||
*/
|
||||
PreintegrationBase(const boost::shared_ptr<Params>& p,
|
||||
PreintegrationBase(const boost::shared_ptr<const Params>& p,
|
||||
const imuBias::ConstantBias& biasHat = imuBias::ConstantBias());
|
||||
|
||||
/// @}
|
||||
|
|
@ -88,13 +88,13 @@ class GTSAM_EXPORT PreintegrationBase {
|
|||
}
|
||||
|
||||
/// shared pointer to params
|
||||
const boost::shared_ptr<Params>& params() const {
|
||||
const boost::shared_ptr<const Params>& params() const {
|
||||
return p_;
|
||||
}
|
||||
|
||||
/// const reference to params
|
||||
const Params& p() const {
|
||||
return *boost::static_pointer_cast<Params>(p_);
|
||||
return *p_;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ using namespace std;
|
|||
namespace gtsam {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
TangentPreintegration::TangentPreintegration(const boost::shared_ptr<Params>& p,
|
||||
TangentPreintegration::TangentPreintegration(const boost::shared_ptr<const Params>& p,
|
||||
const Bias& biasHat) :
|
||||
PreintegrationBase(p, biasHat) {
|
||||
resetIntegration();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public:
|
|||
* @param p Parameters, typically fixed in a single application
|
||||
* @param bias Current estimate of acceleration and rotation rate biases
|
||||
*/
|
||||
TangentPreintegration(const boost::shared_ptr<Params>& p,
|
||||
TangentPreintegration(const boost::shared_ptr<const Params>& p,
|
||||
const imuBias::ConstantBias& biasHat = imuBias::ConstantBias());
|
||||
|
||||
/// Virtual destructor
|
||||
|
|
|
|||
Loading…
Reference in New Issue