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

Reorder params in ProcessorMotion constructor

parent 21368b5d
No related branches found
No related tags found
1 merge request!180Reorder params in ProcessorMotion constructor
Pipeline #
This commit is part of merge request !180. Comments created here will be created in the context of that merge request.
......@@ -4,7 +4,7 @@
namespace wolf {
ProcessorIMU::ProcessorIMU(ProcessorIMUParamsPtr _params) :
ProcessorMotion("IMU", 10, 10, 9, 6, 0.01, 6),
ProcessorMotion("IMU", 10, 10, 9, 6, 6, 0.01),
max_time_span_ (_params ? _params ->max_time_span : 1.0 ),
max_buff_length_(_params ? _params ->max_buff_length : 10000 ),
dist_traveled_ (_params ? _params ->dist_traveled : 1.0 ),
......
......@@ -20,6 +20,8 @@ namespace wolf {
/** \brief Key frame class pack
*
* To store a key_frame with an associated time tolerance.
*
* Used in keyframe callbacks as the minimal pack of information needed by the processor receiving the callback.
*/
class KFPack
{
......
......@@ -7,8 +7,8 @@ ProcessorMotion::ProcessorMotion(const std::string& _type,
Size _delta_size,
Size _delta_cov_size,
Size _data_size,
Scalar _time_tolerance,
Size _calib_size) :
Size _calib_size,
Scalar _time_tolerance) :
ProcessorBase(_type, _time_tolerance),
processing_step_(RUNNING_WITHOUT_PACK),
x_size_(_state_size),
......@@ -30,7 +30,6 @@ ProcessorMotion::ProcessorMotion(const std::string& _type,
jacobian_delta_(delta_cov_size_, delta_cov_size_),
jacobian_calib_(delta_size_, calib_size_)
{
status_ = IDLE;
//
}
......
......@@ -110,13 +110,6 @@ class ProcessorMotion : public ProcessorBase
protected:
ProcessingStep processing_step_; ///< State machine controlling the processing step
private:
enum
{
IDLE,
RUNNING
} status_;
// This is the main public interface
public:
ProcessorMotion(const std::string& _type,
......@@ -124,8 +117,8 @@ class ProcessorMotion : public ProcessorBase
Size _delta_size,
Size _delta_cov_size,
Size _data_size,
Scalar _time_tolerance = 0.1,
Size _calib_size = 0);
Size _calib_size = 0,
Scalar _time_tolerance = 0.1);
virtual ~ProcessorMotion();
// Instructions to the processor:
......
......@@ -6,8 +6,9 @@ ProcessorOdom2D::ProcessorOdom2D(const Scalar& _dist_traveled_th,
const Scalar& _theta_traveled_th,
const Scalar& _cov_det_th,
const Scalar& _elapsed_time_th,
const Scalar& _unmeasured_perturbation_std) :
ProcessorMotion("ODOM 2D", 3, 3, 3, 2),
const Scalar& _unmeasured_perturbation_std,
const Scalar& _time_tolerance) :
ProcessorMotion("ODOM 2D", 3, 3, 3, 2, 0, _time_tolerance),
dist_traveled_th_(_dist_traveled_th),
theta_traveled_th_(_theta_traveled_th),
cov_det_th_(_cov_det_th),
......
......@@ -35,7 +35,8 @@ class ProcessorOdom2D : public ProcessorMotion
const Scalar& _theta_traveled_th = 0.17,
const Scalar& _cov_det_th = 1.0,
const Scalar& _elapsed_time_th = 1.0,
const Scalar& _unmeasured_perturbation_std = 0.001);
const Scalar& _unmeasured_perturbation_std = 0.001,
const Scalar& _time_tolerance = 0.01);
virtual ~ProcessorOdom2D();
virtual bool voteForKeyFrame() override;
......
......@@ -3,7 +3,7 @@ namespace wolf
{
ProcessorOdom3D::ProcessorOdom3D(ProcessorOdom3DParamsPtr _params, SensorOdom3DPtr _sensor_ptr) :
ProcessorMotion("ODOM 3D", 7, 7, 6, 6),
ProcessorMotion("ODOM 3D", 7, 7, 6, 6, 0, (_params ? _params->time_tolerance : 0.01) ),
max_time_span_ (_params ? _params ->max_time_span : 1.0 ),
max_buff_length_(_params ? _params ->max_buff_length : 10 ),
dist_traveled_ (_params ? _params ->dist_traveled : 1.0 ),
......
......@@ -13,7 +13,7 @@ namespace wolf
{
ProcessorDiffDrive::ProcessorDiffDrive(const ProcessorParamsDiffDrive &params) :
ProcessorMotion("DIFF DRIVE", 3, 3, 3, 2, 0.15, 3),
ProcessorMotion("DIFF DRIVE", 3, 3, 3, 2, 3, 0.15),
unmeasured_perturbation_cov_(Matrix3s::Identity()*
params.unmeasured_perturbation_std_*
params.unmeasured_perturbation_std_),
......
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