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

Merge branch 'remove-sensor-from-processor-creators' into devel

parents a77bc19a 96c26a82
No related branches found
No related tags found
1 merge request!8Remove sensor from processor creators
......@@ -30,9 +30,9 @@ struct ProcessorParamsGnssFix : public ProcessorParamsBase
}
std::string print()
{
return "\n" + ProcessorParamsBase::print()
+ "time_th: " + std::to_string(time_th) + "\n";
+ "dist_traveled: " + std::to_string(dist_traveled) + "\n";
return "\n" + ProcessorParamsBase::print() + "\n"
+ "time_th: " + std::to_string(time_th) + "\n"
+ "dist_traveled: " + std::to_string(dist_traveled) + "\n"
+ "enu_map_init_dist_min: " + std::to_string(enu_map_init_dist_min) + "\n";
}
};
......@@ -47,7 +47,7 @@ class ProcessorGnssFix : public ProcessorBase
FrameBasePtr last_KF_;
public:
ProcessorGnssFix(ProcessorParamsGnssFixPtr _params, SensorGnssPtr _sensor_gnss_ptr);
ProcessorGnssFix(ProcessorParamsGnssFixPtr _params);
virtual ~ProcessorGnssFix();
virtual void configure(SensorBasePtr _sensor) override;
......@@ -96,7 +96,7 @@ class ProcessorGnssFix : public ProcessorBase
bool rejectOutlier(FactorBasePtr ctr_ptr);
public:
static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor_ptr);
static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params);
};
......
......@@ -30,9 +30,9 @@ struct ProcessorParamsGnssSingleDiff : public ProcessorParamsBase
}
std::string print()
{
return "\n" + ProcessorParamsBase::print()
+ "time_th: " + std::to_string(time_th) + "\n";
+ "dist_traveled: " + std::to_string(dist_traveled) + "\n";
return "\n" + ProcessorParamsBase::print() + "\n"
+ "time_th: " + std::to_string(time_th) + "\n"
+ "dist_traveled: " + std::to_string(dist_traveled) + "\n"
+ "enu_map_init_dist_min: " + std::to_string(enu_map_init_dist_min) + "\n";
}
};
......@@ -47,7 +47,7 @@ class ProcessorGnssSingleDiff : public ProcessorBase
FrameBasePtr last_KF_;
public:
ProcessorGnssSingleDiff(ProcessorParamsGnssSingleDiffPtr _params_gnss, SensorGnssPtr _sensor_gnss);
ProcessorGnssSingleDiff(ProcessorParamsGnssSingleDiffPtr _params_gnss);
virtual ~ProcessorGnssSingleDiff();
virtual void configure(SensorBasePtr _sensor) override;
FrameBasePtr getLastKF();
......@@ -97,7 +97,7 @@ class ProcessorGnssSingleDiff : public ProcessorBase
FactorBasePtr emplaceFactor(FeatureBasePtr _ftr);
public:
static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor);
static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params);
};
......
......@@ -24,21 +24,21 @@ struct IntrinsicsGnss : public IntrinsicsBase
IntrinsicsGnss(std::string _unique_name, const ParamsServer& _server):
IntrinsicsBase(_unique_name, _server)
{
extrinsics_fixed_ = _server.getParam<bool>(_unique_name + "/extrinsics_fixed");
roll_fixed_ = _server.getParam<bool>(_unique_name + "/roll_fixed");
pitch_fixed_ = _server.getParam<bool>(_unique_name + "/pitch_fixed");
yaw_fixed_ = _server.getParam<bool>(_unique_name + "/yaw_fixed");
translation_fixed_ = _server.getParam<bool>(_unique_name + "/translation_fixed");
extrinsics_fixed_ = _server.getParam<bool>(_unique_name + "/extrinsics_fixed");
roll_fixed_ = _server.getParam<bool>(_unique_name + "/roll_fixed");
pitch_fixed_ = _server.getParam<bool>(_unique_name + "/pitch_fixed");
yaw_fixed_ = _server.getParam<bool>(_unique_name + "/yaw_fixed");
translation_fixed_ = _server.getParam<bool>(_unique_name + "/translation_fixed");
}
std::string print()
{
return "\n" + IntrinsicsBase::print() + "\n"
+ "extrinsics_fixed: " + std::to_string(extrinsics_fixed_) + "\n"
+ "roll_fixed: " + std::to_string(roll_fixed_) + "\n"
+ "pitch_fixed: " + std::to_string(pitch_fixed_) + "\n"
+ "yaw_fixed: " + std::to_string(yaw_fixed_) + "\n"
+ "translation_fixed: " + std::to_string(translation_fixed_) + "\n";
}
std::string print()
{
return "\n" + IntrinsicsBase::print()
+ "extrinsics_fixed: " + std::to_string(extrinsics_fixed_) + "\n"
+ "roll_fixed: " + std::to_string(roll_fixed_) + "\n"
+ "pitch_fixed: " + std::to_string(pitch_fixed_) + "\n"
+ "yaw_fixed: " + std::to_string(yaw_fixed_) + "\n"
+ "translation_fixed: " + std::to_string(translation_fixed_) + "\n";
}
};
class SensorGnss : public SensorBase
......
......@@ -7,9 +7,8 @@
namespace wolf
{
ProcessorGnssFix::ProcessorGnssFix(ProcessorParamsGnssFixPtr _params_gnss, SensorGnssPtr _sensor_gnss) :
ProcessorGnssFix::ProcessorGnssFix(ProcessorParamsGnssFixPtr _params_gnss) :
ProcessorBase("GNSS FIX", _params_gnss),
sensor_gnss_(_sensor_gnss),
params_gnss_(_params_gnss),
first_capture_(nullptr)
......@@ -169,10 +168,9 @@ void ProcessorGnssFix::configure(SensorBasePtr _sensor)
sensor_gnss_ = std::static_pointer_cast<SensorGnss>(_sensor);
};
ProcessorBasePtr ProcessorGnssFix::create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor)
ProcessorBasePtr ProcessorGnssFix::create(const std::string& _unique_name, const ProcessorParamsBasePtr _params)
{
auto prc = std::make_shared<ProcessorGnssFix>(std::static_pointer_cast<ProcessorParamsGnssFix>(_params),
std::static_pointer_cast<SensorGnss>(sensor));
auto prc = std::make_shared<ProcessorGnssFix>(std::static_pointer_cast<ProcessorParamsGnssFix>(_params));
prc->setName(_unique_name);
return prc;
}
......
......@@ -6,9 +6,8 @@
namespace wolf
{
ProcessorGnssSingleDiff::ProcessorGnssSingleDiff(ProcessorParamsGnssSingleDiffPtr _params_gnss, SensorGnssPtr _sensor_gnss) :
ProcessorGnssSingleDiff::ProcessorGnssSingleDiff(ProcessorParamsGnssSingleDiffPtr _params_gnss) :
ProcessorBase("GNSS SINGLE DIFFERENCES", _params_gnss),
sensor_gnss_(_sensor_gnss),
params_gnss_(_params_gnss)
{
//
......@@ -142,9 +141,9 @@ void ProcessorGnssSingleDiff::configure(SensorBasePtr _sensor)
sensor_gnss_ = std::static_pointer_cast<SensorGnss>(_sensor);
};
ProcessorBasePtr ProcessorGnssSingleDiff::create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor)
ProcessorBasePtr ProcessorGnssSingleDiff::create(const std::string& _unique_name, const ProcessorParamsBasePtr _params)
{
ProcessorGnssSingleDiffPtr prc = std::make_shared<ProcessorGnssSingleDiff>(std::static_pointer_cast<ProcessorParamsGnssSingleDiff>(_params), std::static_pointer_cast<SensorGnss>(sensor));
ProcessorGnssSingleDiffPtr prc = std::make_shared<ProcessorGnssSingleDiff>(std::static_pointer_cast<ProcessorParamsGnssSingleDiff>(_params));
prc->setName(_unique_name);
return prc;
}
......
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