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

remove unused sizes in MotionBuffer

parent d3a669ac
No related branches found
No related tags found
1 merge request!317Motion cleanup
......@@ -74,9 +74,7 @@ struct Motion
*/
class MotionBuffer{
public:
SizeEigen data_size_, delta_size_, cov_size_;
MotionBuffer() = delete;
MotionBuffer(SizeEigen _data_size, SizeEigen _delta_size, SizeEigen _cov_size);
MotionBuffer() ;
std::list<Motion>& get();
const std::list<Motion>& get() const;
const Motion& getMotion(const TimeStamp& _ts) const;
......
......@@ -20,7 +20,7 @@ CaptureMotion::CaptureMotion(const std::string & _type,
CaptureBase(_type, _ts, _sensor_ptr),
data_(_data),
data_cov_(_sensor_ptr ? _sensor_ptr->getNoiseCov() : Eigen::MatrixXs::Zero(_data.rows(), _data.rows())), // Someone should test this zero and do something smart accordingly
buffer_(_data.size(), _delta_size, _delta_cov_size),
buffer_(),
origin_frame_ptr_(_origin_frame_ptr)
{
//
......@@ -40,7 +40,7 @@ CaptureMotion::CaptureMotion(const std::string & _type,
CaptureBase(_type, _ts, _sensor_ptr, _p_ptr, _o_ptr, _intr_ptr),
data_(_data),
data_cov_(_data_cov),
buffer_(_data.size(), _delta_size, _delta_cov_size),
buffer_(),
origin_frame_ptr_(_origin_frame_ptr)
{
//
......
......@@ -62,12 +62,7 @@ void Motion::resize(SizeEigen _data_s, SizeEigen _delta_s, SizeEigen _delta_cov_
////////////////////////////////////////////////////////////////////////////////////////
MotionBuffer::MotionBuffer(SizeEigen _data_size,
SizeEigen _delta_size,
SizeEigen _cov_size) :
data_size_(_data_size),
delta_size_(_delta_size),
cov_size_(_cov_size)
MotionBuffer::MotionBuffer()
{
container_.clear();
}
......
......@@ -40,7 +40,7 @@ Motion m4 = newMotion(t4, 4, 10, 1, .1, 1);
TEST(MotionBuffer, QueryTimeStamps)
{
MotionBuffer MB(1,1,1);
MotionBuffer MB;
MB.get().push_back(m0);
MB.get().push_back(m1);
......@@ -64,7 +64,7 @@ TEST(MotionBuffer, QueryTimeStamps)
TEST(MotionBuffer, getMotion)
{
MotionBuffer MB(1,1,1);
MotionBuffer MB;
MB.get().push_back(m0);
ASSERT_EQ(MB.getMotion(t0).delta_, m0.delta_);
......@@ -78,7 +78,7 @@ TEST(MotionBuffer, getMotion)
TEST(MotionBuffer, getDelta)
{
MotionBuffer MB(1,1,1);
MotionBuffer MB;
MB.get().push_back(m0);
......@@ -92,7 +92,7 @@ TEST(MotionBuffer, getDelta)
TEST(MotionBuffer, Split)
{
MotionBuffer MB(1,1,1);
MotionBuffer MB;
MB.get().push_back(m0);
MB.get().push_back(m1);
......@@ -100,7 +100,7 @@ TEST(MotionBuffer, Split)
MB.get().push_back(m3);
MB.get().push_back(m4); // put 5 motions
MotionBuffer MB_old(1,1,1);
MotionBuffer MB_old;
TimeStamp t = 1.5; // between m1 and m2
MB.split(t, MB_old);
......@@ -116,7 +116,7 @@ TEST(MotionBuffer, Split)
// TEST(MotionBuffer, integrateCovariance)
// {
// MotionBuffer MB(1,1,1,0);
// MotionBuffer MB;
//
// MB.get().push_back(m0);
// MB.get().push_back(m1);
......@@ -131,7 +131,7 @@ TEST(MotionBuffer, Split)
//
// TEST(MotionBuffer, integrateCovariance_ts)
// {
// MotionBuffer MB(1,1,1,0);
// MotionBuffer MB;
//
// MB.get().push_back(m0);
// MB.get().push_back(m1);
......@@ -145,7 +145,7 @@ TEST(MotionBuffer, Split)
//
// TEST(MotionBuffer, integrateCovariance_ti_tf)
// {
// MotionBuffer MB(1,1,1,0);
// MotionBuffer MB;
//
// MB.get().push_back(m0);
// MB.get().push_back(m1);
......@@ -162,7 +162,7 @@ TEST(MotionBuffer, Split)
TEST(MotionBuffer, print)
{
MotionBuffer MB(1,1,1);
MotionBuffer MB;
MB.get().push_back(m0);
MB.get().push_back(m1);
......
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