Skip to content
Snippets Groups Projects
Commit 8f585337 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Remove all CalibSize things

parent 0fb6b64c
No related branches found
No related tags found
1 merge request!358WIP: Resolve "Complete state vector new data structure?"
Pipeline #5349 failed
......@@ -90,7 +90,6 @@ class SensorBase : public NodeBase, public HasStateBlocks, public std::enable_sh
private:
HardwareBaseWPtr hardware_ptr_;
ProcessorBasePtrList processor_list_;
SizeEigen calib_size_;
static unsigned int sensor_id_count_; ///< Object counter (acts as simple ID factory)
......@@ -234,8 +233,6 @@ class SensorBase : public NodeBase, public HasStateBlocks, public std::enable_sh
unsigned int _start_idx = 0,
int _size = -1);
SizeEigen getCalibSize() const;
VectorComposite getCalibration() const;
void getCalibration(VectorComposite& _calib) const;
......@@ -262,11 +259,6 @@ class SensorBase : public NodeBase, public HasStateBlocks, public std::enable_sh
template<typename classType, typename... T>
static std::shared_ptr<classType> emplace(HardwareBasePtr _hwd_ptr, T&&... all);
protected:
SizeEigen computeCalibSize() const;
private:
void updateCalibSize();
};
}
......@@ -354,16 +346,6 @@ inline void SensorBase::addPriorIntrinsics(const Eigen::VectorXd& _x, const Eige
addPriorParameter("I", _x, _cov);
}
inline SizeEigen SensorBase::getCalibSize() const
{
return calib_size_;
}
inline void SensorBase::updateCalibSize()
{
calib_size_ = computeCalibSize();
}
} // namespace wolf
#endif
......@@ -20,7 +20,6 @@ SensorBase::SensorBase(const std::string& _type,
NodeBase("SENSOR", _type),
HasStateBlocks(""),
hardware_ptr_(),
calib_size_(0),
sensor_id_(++sensor_id_count_), // simple ID factory
noise_std_(_noise_size),
noise_cov_(_noise_size, _noise_size)
......@@ -40,8 +39,6 @@ SensorBase::SensorBase(const std::string& _type,
if (_intr_ptr)
addStateBlock("I", _intr_ptr, _intr_dyn);
updateCalibSize();
}
SensorBase::SensorBase(const std::string& _type,
......@@ -55,7 +52,6 @@ SensorBase::SensorBase(const std::string& _type,
NodeBase("SENSOR", _type),
HasStateBlocks(""),
hardware_ptr_(),
calib_size_(0),
sensor_id_(++sensor_id_count_), // simple ID factory
noise_std_(_noise_std),
noise_cov_(_noise_std.size(), _noise_std.size())
......@@ -70,8 +66,6 @@ SensorBase::SensorBase(const std::string& _type,
if (_intr_ptr)
addStateBlock("I", _intr_ptr, _intr_dyn);
updateCalibSize();
}
SensorBase::~SensorBase()
......@@ -105,7 +99,6 @@ void SensorBase::fixExtrinsics()
if (sbp != nullptr)
sbp->fix();
}
updateCalibSize();
}
void SensorBase::unfixExtrinsics()
......@@ -116,7 +109,6 @@ void SensorBase::unfixExtrinsics()
if (sbp != nullptr)
sbp->unfix();
}
updateCalibSize();
}
void SensorBase::fixIntrinsics()
......@@ -131,7 +123,6 @@ void SensorBase::fixIntrinsics()
sbp->fix();
}
}
updateCalibSize();
}
void SensorBase::unfixIntrinsics()
......@@ -146,7 +137,6 @@ void SensorBase::unfixIntrinsics()
sbp->unfix();
}
}
updateCalibSize();
}
void SensorBase::addPriorParameter(const std::string& _key, const Eigen::VectorXd& _x, const Eigen::MatrixXd& _cov, unsigned int _start_idx, int _size)
......@@ -315,18 +305,6 @@ StateBlockPtr SensorBase::getIntrinsic() const
return getStateBlockDynamic("I");
}
SizeEigen SensorBase::computeCalibSize() const
{
SizeEigen sz = 0;
for (const auto& pair_key_sb : getStateBlockMap())
{
auto sb = pair_key_sb.second;
if (sb && !sb->isFixed())
sz += sb->getSize();
}
return sz;
}
VectorComposite SensorBase::getCalibration() const
{
VectorComposite calib;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment