Skip to content
Snippets Groups Projects
Commit 2e92444f authored by Médéric Fourmy's avatar Médéric Fourmy
Browse files

Add default behaviour for processor pose if time tolerance not set

parent c336cdc9
No related branches found
No related tags found
1 merge request!412Resolve "Implement a Pose sensor"
Pipeline #6405 passed
......@@ -29,7 +29,12 @@ void ProcessorPose::createFactorIfNecessary(){
{
auto kf_it = buffer_pack_kf_.getContainer().begin();
TimeStamp t = kf_it->first;
auto cap_it = buffer_capture_.selectIterator(t, kf_it->second->time_tolerance);
double time_tolerance = std::min(getTimeTolerance(), kf_it->second->time_tolerance);
if (getTimeTolerance() == 0.0){
WOLF_WARN("Time tolerance set to zero -> value not used");
time_tolerance = kf_it->second->time_tolerance;
}
auto cap_it = buffer_capture_.selectIterator(t, time_tolerance);
// if capture with corresponding timestamp is not found, stop and assume you will get it later
if (cap_it == buffer_capture_.getContainer().end())
......
/**
* \file gtest_factor_pose_with_extrinsics.cpp
*
* Created on: Feb a9, 2020
* Created on: Feb 19, 2020
* \author: mfourmy
*/
......@@ -116,6 +116,7 @@ class FactorPose3dWithExtrinsicsBase_Test : public testing::Test
Vector7d extr; extr << b_p_bm_, b_q_m_.coeffs();
sensor_pose_ = problem_->installSensor("SensorPose", "pose", extr, intr_sp);
auto params_proc = std::make_shared<ParamsProcessorPose>();
params_proc->time_tolerance = 0.5;
auto proc_pose = problem_->installProcessor("ProcessorPose", "pose", sensor_pose_, params_proc);
// somehow by default the sensor extrinsics is fixed
sensor_pose_->unfixExtrinsics();
......
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