Skip to content
Snippets Groups Projects
Commit dd3f387f authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

hotfix

parent e43901b0
No related branches found
No related tags found
No related merge requests found
Pipeline #6462 passed
......@@ -60,7 +60,6 @@ void ProcessorMotion::mergeCaptures(CaptureMotionConstPtr cap_prev,
{
assert(cap_prev != nullptr);
assert(cap_target != nullptr);
assert(cap_target->getOriginCapture() != nullptr);
assert(cap_prev == cap_target->getOriginCapture() && "merging not consecutive capture motions");
// add prev buffer (discarding the first zero motion)
......@@ -88,7 +87,7 @@ void ProcessorMotion::mergeCaptures(CaptureMotionConstPtr cap_prev,
}
// emplace new feature and factor (if origin has frame)
if (cap_prev->getOriginCapture()->getFrame())
if (cap_prev->getOriginCapture() and cap_prev->getOriginCapture()->getFrame())
{
auto new_feature = emplaceFeature(cap_target);
emplaceFactor(new_feature, cap_prev->getOriginCapture());
......
......@@ -315,7 +315,7 @@ TEST_F(ProcessorMotion_test, mergeCaptures)
FrameBasePtr F_target = problem->emplaceFrame(t_target);
CaptureMotionPtr C_source = std::dynamic_pointer_cast<CaptureMotion>(processor->getLast());
CaptureMotionPtr C_target = CaptureBase::emplace<CaptureMotion>(F_target,
"ODOM 2d",
"CaptureOdom2d",
t_target,
sensor,
data,
......
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