Model path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/model.urdf
Matfile path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/sync-walk-est.mat
Opening mat file successful.
Loading model successful.
r_sole position in the world: -0.0161299
l_sole position in the world: -0.016674
Configured estimator successful
[2021-07-29 18:53:17.389] [thread: 45321] [blf] [info] [ContactDetector::initialize] Contact detector initialization is successful.
Configured contact detector successful.
double free or corruption (out)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EKFOdometryiSAM2UnitTests is a Catch v2.11.3 host application.
Run with -? for options
-------------------------------------------------------------------------------
Invariant EKF Base Estimator + iSAM2 Fixed Lag Smoothing
-------------------------------------------------------------------------------
/home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/EKFOdometryiSAM2.cpp:162
...............................................................................
/home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/EKFOdometryiSAM2.cpp:162: FAILED:
{Unknown expression after the reported line}
due to a fatal error condition:
SIGABRT - Abort (abnormal termination) signal
===============================================================================
test cases: 1 | 1 failed
assertions: 6 | 5 passed | 1 failed
Aborted (core dumped)
Running the tests from within the BLF library (InvariantEKFBaseEstimatorTest in BLF), I do not have this problem.
Valgrind output on debug
``` sh
==45456== Memcheck, a memory error detector
==45456== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==45456== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==45456== Command: ./bin/EKFOdometryiSAM2UnitTests
==45456==
Model path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/model.urdf
Matfile path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/sync-walk-est.mat
Opening mat file successful.
Loading model successful.
r_sole position in the world: -0.0161299
l_sole position in the world: -0.016674
Configured estimator successful
[2021-07-29 18:55:49.558] [thread: 45456] [blf] [info] [ContactDetector::initialize] Contact detector initialization is successful.
Configured contact detector successful.
==45456== Invalid free() / delete / delete[] / realloc()
==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4BD4198: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::calcLc(BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState const&, BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::SkewSymContainter const&, bool const&, Eigen::Matrix&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD8FE1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456== by 0x4A48F8F: Catch::RunContext::invokeActiveTestCase() (catch.hpp:12819)
==45456== by 0x4A48CC2: Catch::RunContext::runCurrentTest(std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&) (catch.hpp:12792)
==45456== by 0x4A476E8: Catch::RunContext::runTest(Catch::TestCase const&) (catch.hpp:12553)
==45456== by 0x4A4A949: Catch::(anonymous namespace)::TestGroup::execute() (catch.hpp:13147)
==45456== by 0x4A4BD8A: Catch::Session::runInternal() (catch.hpp:13353)
==45456== Address 0x87de0c0 is 16 bytes inside a block of size 1,832 alloc'd
==45456== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x119985: Eigen::internal::handmade_aligned_malloc(unsigned long) (Memory.h:88)
==45456== by 0x119A15: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:164)
==45456== by 0x123818: void* Eigen::internal::conditional_aligned_malloc(unsigned long) (Memory.h:214)
==45456== by 0x1216BE: double* Eigen::internal::conditional_aligned_new_auto(unsigned long) (Memory.h:374)
==45456== by 0x11EC0F: Eigen::DenseStorage::resize(long, long, long) (DenseStorage.h:408)
==45456== by 0x11C4CB: Eigen::PlainObjectBase >::resize(long, long) (PlainObjectBase.h:293)
==45456== by 0x4BD35E5: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::calcAdjointX(BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState const&, BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::SkewSymContainter const&, Eigen::Matrix&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD3FF2: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::calcLc(BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState const&, BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::SkewSymContainter const&, bool const&, Eigen::Matrix&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD8FE1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456==
==45456== Invalid free() / delete / delete[] / realloc()
==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4BD86CE: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE1D74: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE39F7: void Eigen::internal::call_dense_assignment_loop, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const>, Eigen::internal::assign_op >(Eigen::Matrix&, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const> const&, Eigen::internal::assign_op const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD91E1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456== by 0x4A48F8F: Catch::RunContext::invokeActiveTestCase() (catch.hpp:12819)
==45456== by 0x4A48CC2: Catch::RunContext::runCurrentTest(std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&) (catch.hpp:12792)
==45456== by 0x4A476E8: Catch::RunContext::runTest(Catch::TestCase const&) (catch.hpp:12553)
==45456== Address 0x87e05c0 is 32 bytes inside a block of size 1,832 alloc'd
==45456== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x119985: Eigen::internal::handmade_aligned_malloc(unsigned long) (Memory.h:88)
==45456== by 0x119A15: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:164)
==45456== by 0x123818: void* Eigen::internal::conditional_aligned_malloc(unsigned long) (Memory.h:214)
==45456== by 0x1216BE: double* Eigen::internal::conditional_aligned_new_auto(unsigned long) (Memory.h:374)
==45456== by 0x11EC0F: Eigen::DenseStorage::resize(long, long, long) (DenseStorage.h:408)
==45456== by 0x11C4CB: Eigen::PlainObjectBase >::resize(long, long) (PlainObjectBase.h:293)
==45456== by 0x4BD85C9: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE1D74: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE39F7: void Eigen::internal::call_dense_assignment_loop, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const>, Eigen::internal::assign_op >(Eigen::Matrix&, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const> const&, Eigen::internal::assign_op const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD91E1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456==
==45456== Invalid free() / delete / delete[] / realloc()
==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4BE1E5A: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE39F7: void Eigen::internal::call_dense_assignment_loop, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const>, Eigen::internal::assign_op >(Eigen::Matrix&, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const> const&, Eigen::internal::assign_op const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD91E1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456== by 0x4A48F8F: Catch::RunContext::invokeActiveTestCase() (catch.hpp:12819)
==45456== by 0x4A48CC2: Catch::RunContext::runCurrentTest(std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&) (catch.hpp:12792)
==45456== by 0x4A476E8: Catch::RunContext::runTest(Catch::TestCase const&) (catch.hpp:12553)
==45456== by 0x4A4A949: Catch::(anonymous namespace)::TestGroup::execute() (catch.hpp:13147)
==45456== Address 0x87dfe40 is 16 bytes inside a block of size 1,832 alloc'd
==45456== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x119985: Eigen::internal::handmade_aligned_malloc(unsigned long) (Memory.h:88)
==45456== by 0x119A15: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:164)
==45456== by 0x123818: void* Eigen::internal::conditional_aligned_malloc(unsigned long) (Memory.h:214)
==45456== by 0x1216BE: double* Eigen::internal::conditional_aligned_new_auto(unsigned long) (Memory.h:374)
==45456== by 0x11EC0F: Eigen::DenseStorage::resize(long, long, long) (DenseStorage.h:408)
==45456== by 0x11C4CB: Eigen::PlainObjectBase >::resize(long, long) (PlainObjectBase.h:293)
==45456== by 0x4BE1D69: Eigen::internal::Assignment, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::internal::assign_op, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0> const&, Eigen::internal::assign_op const&) [clone .isra.0] (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BE39F7: void Eigen::internal::call_dense_assignment_loop, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const>, Eigen::internal::assign_op >(Eigen::Matrix&, Eigen::CwiseBinaryOp, Eigen::Product, Eigen::Matrix, 0>, Eigen::Matrix, 0>, Eigen::Transpose >, 0>, Eigen::Transpose >, 0> const, Eigen::CwiseNullaryOp, Eigen::Matrix const> const> const&, Eigen::internal::assign_op const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD91E1: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456==
==45456== Invalid free() / delete / delete[] / realloc()
==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4BE17D7: void Eigen::internal::generic_product_impl, Eigen::Matrix, 0>, Eigen::Transpose >, Eigen::DenseShape, Eigen::DenseShape, 8>::evalTo >(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0> const&, Eigen::Transpose > const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD92A4: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456== by 0x4A48F8F: Catch::RunContext::invokeActiveTestCase() (catch.hpp:12819)
==45456== by 0x4A48CC2: Catch::RunContext::runCurrentTest(std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&) (catch.hpp:12792)
==45456== by 0x4A476E8: Catch::RunContext::runTest(Catch::TestCase const&) (catch.hpp:12553)
==45456== by 0x4A4A949: Catch::(anonymous namespace)::TestGroup::execute() (catch.hpp:13147)
==45456== by 0x4A4BD8A: Catch::Session::runInternal() (catch.hpp:13353)
==45456== Address 0x87e1bc0 is 16 bytes inside a block of size 1,832 alloc'd
==45456== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x119985: Eigen::internal::handmade_aligned_malloc(unsigned long) (Memory.h:88)
==45456== by 0x119A15: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:164)
==45456== by 0x123818: void* Eigen::internal::conditional_aligned_malloc(unsigned long) (Memory.h:214)
==45456== by 0x1216BE: double* Eigen::internal::conditional_aligned_new_auto(unsigned long) (Memory.h:374)
==45456== by 0x11EC0F: Eigen::DenseStorage::resize(long, long, long) (DenseStorage.h:408)
==45456== by 0x11C4CB: Eigen::PlainObjectBase >::resize(long, long) (PlainObjectBase.h:293)
==45456== by 0x4BE16B1: void Eigen::internal::generic_product_impl, Eigen::Matrix, 0>, Eigen::Transpose >, Eigen::DenseShape, Eigen::DenseShape, 8>::evalTo >(Eigen::Matrix&, Eigen::Product, Eigen::Matrix, 0> const&, Eigen::Transpose > const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BD92A4: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::predictState(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements const&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD85A: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456==
==45456== Invalid free() / delete / delete[] / realloc()
==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4BDC907: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::updateKinematics(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD972: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456== by 0x4A48F8F: Catch::RunContext::invokeActiveTestCase() (catch.hpp:12819)
==45456== by 0x4A48CC2: Catch::RunContext::runCurrentTest(std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&) (catch.hpp:12792)
==45456== by 0x4A476E8: Catch::RunContext::runTest(Catch::TestCase const&) (catch.hpp:12553)
==45456== by 0x4A4A949: Catch::(anonymous namespace)::TestGroup::execute() (catch.hpp:13147)
==45456== by 0x4A4BD8A: Catch::Session::runInternal() (catch.hpp:13353)
==45456== by 0x4A4BA80: Catch::Session::run() (catch.hpp:13309)
==45456== Address 0x87e3240 is 32 bytes inside a block of size 5,440 alloc'd
==45456== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x119985: Eigen::internal::handmade_aligned_malloc(unsigned long) (Memory.h:88)
==45456== by 0x119A15: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:164)
==45456== by 0x123818: void* Eigen::internal::conditional_aligned_malloc(unsigned long) (Memory.h:214)
==45456== by 0x1216BE: double* Eigen::internal::conditional_aligned_new_auto(unsigned long) (Memory.h:374)
==45456== by 0x11EC0F: Eigen::DenseStorage::resize(long, long, long) (DenseStorage.h:408)
==45456== by 0x11C4CB: Eigen::PlainObjectBase >::resize(long, long) (PlainObjectBase.h:293)
==45456== by 0x4BDC19E: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::updateKinematics(BipedalLocomotion::Estimators::FloatingBaseEstimators::Measurements&, double const&) (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x4BAD972: BipedalLocomotion::Estimators::FloatingBaseEstimator::advance() (in /home/pramadoss/iit_ws/dic-iit/bipedal-locomotion-framework/install/lib/libBipedalLocomotionFrameworkFloatingBaseEstimators.so.0.2.0)
==45456== by 0x117F3A: ____C_A_T_C_H____T_E_S_T____0() (EKFOdometryiSAM2.cpp:335)
==45456== by 0x4A4F6ED: Catch::TestInvokerAsFunction::invoke() const (catch.hpp:14065)
==45456== by 0x4A4ECE0: Catch::TestCase::invoke() const (catch.hpp:13958)
==45456==
**45456** new/new[] failed and should throw an exception, but Valgrind
**45456** cannot throw exceptions and so is aborting instead. Sorry.
==45456== at 0x483B3CC: ??? (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x483BED5: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==45456== by 0x4AAD6C0: void std::__cxx11::basic_string, std::allocator >::_M_construct(char*, char*, std::forward_iterator_tag) (basic_string.tcc:219)
==45456== by 0x123CA3: BipedalLocomotion::Contacts::ContactBase::ContactBase(BipedalLocomotion::Contacts::ContactBase const&) (Contact.h:41)
==45456== by 0x123D0E: BipedalLocomotion::Contacts::EstimatedContact::EstimatedContact(BipedalLocomotion::Contacts::EstimatedContact const&) (Contact.h:91)
==45456== by 0x129A28: std::pair::pair(std::pair const&) (stl_pair.h:303)
==45456== by 0x129A76: void __gnu_cxx::new_allocator > >::construct, std::pair const&>(std::pair*, std::pair const&) (new_allocator.h:147)
==45456== by 0x129578: void std::allocator_traits > > >::construct, std::pair const&>(std::allocator > >&, std::pair*, std::pair const&) (alloc_traits.h:484)
==45456== by 0x128D6D: void std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_construct_node const&>(std::_Rb_tree_node >*, std::pair const&) (stl_tree.h:614)
==45456== by 0x127E5B: std::_Rb_tree_node >* std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node const&>(std::pair const&) (stl_tree.h:631)
==45456== by 0x126EA4: std::_Rb_tree_node >* std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_Alloc_node::operator() const&>(std::pair const&) const (stl_tree.h:548)
==45456== by 0x1258FD: std::_Rb_tree_node >* std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_clone_node, std::_Select1st >, std::less, std::allocator
Trying to run the
EKFOdometryiSAM2
example code added in https://github.com/dic-iit/kindyn-vio/commit/e03a5bea068e3a31870d07a9df8c72e95e813c21 results in segmentation fault when the call togetOutput()
method is uncommented, with following output. It usesInvariantEKFBaseEstimator
class as the underlying floating base estimation method.Running the tests from within the BLF library (
InvariantEKFBaseEstimatorTest
in BLF), I do not have this problem.Valgrind output on debug
``` sh ==45456== Memcheck, a memory error detector ==45456== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==45456== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==45456== Command: ./bin/EKFOdometryiSAM2UnitTests ==45456== Model path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/model.urdf Matfile path: /home/pramadoss/iit_ws/prashanthr05/kindyn-vio/src/Estimators/tests/data/sync-walk-est.mat Opening mat file successful. Loading model successful. r_sole position in the world: -0.0161299 l_sole position in the world: -0.016674 Configured estimator successful [2021-07-29 18:55:49.558] [thread: 45456] [blf] [info] [ContactDetector::initialize] Contact detector initialization is successful. Configured contact detector successful. ==45456== Invalid free() / delete / delete[] / realloc() ==45456== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==45456== by 0x4BD4198: BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::calcLc(BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState const&, BipedalLocomotion::Estimators::InvariantEKFBaseEstimator::Impl::SkewSymContainter const&, bool const&, Eigen::Matrix