Skip to content

Commit

Permalink
renaming types: ObsrvModel -> Sensor, ObservationModel -> Sensor, Obs…
Browse files Browse the repository at this point in the history
…ervationFunction -> SensorFunction etc.

                ProcessModel -> Transition, TransitionModel -> Transition etc.
  • Loading branch information
wumanu committed Jul 21, 2016
1 parent 45bc4ac commit dc7e368
Show file tree
Hide file tree
Showing 59 changed files with 746 additions and 748 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
namespace fl
{
// Forward delcaration
template <typename StateTransitionFunction,
typename JointObsrvModel,
template <typename TransitionFunction,
typename ActualJointSensor,
typename Quadrature>
class RobustMultiSensorGaussianFilter;

Expand All @@ -49,35 +49,35 @@ class RobustMultiSensorGaussianFilter;
* with customizable policies, i.e implementations of the time and measurement
* updates.
*/
template <typename StateTransitionFunction,
typename JointObsrvModel,
template <typename TransitionFunction,
typename ActualJointSensor,
typename Quadrature>
struct Traits<RobustMultiSensorGaussianFilter<StateTransitionFunction,
JointObsrvModel,
struct Traits<RobustMultiSensorGaussianFilter<TransitionFunction,
ActualJointSensor,
Quadrature>>
{
typedef typename StateTransitionFunction::State State;
typedef typename StateTransitionFunction::Input Input;
typedef typename JointObsrvModel::Obsrv Obsrv;
typedef typename TransitionFunction::State State;
typedef typename TransitionFunction::Input Input;
typedef typename ActualJointSensor::Obsrv Obsrv;
typedef Gaussian<State> Belief;
};

/**
* \ingroup nonlinear_gaussian_filter
*/
template <typename StateTransitionFunction,
typename JointObsrvModel,
template <typename TransitionFunction,
typename ActualJointSensor,
typename Quadrature>
class RobustMultiSensorGaussianFilter
: public FilterInterface<
RobustMultiSensorGaussianFilter<StateTransitionFunction,
JointObsrvModel,
RobustMultiSensorGaussianFilter<TransitionFunction,
ActualJointSensor,
Quadrature>>
{
public:
typedef typename StateTransitionFunction::State State;
typedef typename StateTransitionFunction::Input Input;
typedef typename JointObsrvModel::Obsrv Obsrv;
typedef typename TransitionFunction::State State;
typedef typename TransitionFunction::Input Input;
typedef typename ActualJointSensor::Obsrv Obsrv;
typedef Gaussian<State> Belief;

private:
Expand All @@ -86,23 +86,23 @@ class RobustMultiSensorGaussianFilter
// Get the original local model types
enum : signed int
{
ModelCount = JointObsrvModel::ModelCount
ModelCount = ActualJointSensor::ModelCount
};
typedef typename JointObsrvModel::LocalModel BodyTailModel;
typedef typename ActualJointSensor::LocalModel BodyTailModel;

// Define local feature observation model
typedef RobustMultiSensorFeatureObsrvModel<BodyTailModel, ModelCount>
FeatureObsrvModel;
typedef MultiRobustSensorFunction<BodyTailModel, ModelCount>
FeatureSensor;

// Define robust joint feature observation model
typedef JointObservationModel<MultipleOf<FeatureObsrvModel, ModelCount>>
RobustJointFeatureObsrvModel;
typedef JointSensor<MultipleOf<FeatureSensor, ModelCount>>
RobustJointFeatureSensor;
/**
* \brief Internal generic multi-sensor GaussianFilter for nonlinear
* problems
*/
typedef MultiSensorGaussianFilter<StateTransitionFunction,
RobustJointFeatureObsrvModel,
typedef MultiSensorGaussianFilter<TransitionFunction,
RobustJointFeatureSensor,
Quadrature>
InternalMultiSensorGaussianFilter;

Expand All @@ -113,14 +113,14 @@ class RobustMultiSensorGaussianFilter
* \brief Creates a RobustGaussianFilter
*/
RobustMultiSensorGaussianFilter(
const StateTransitionFunction& process_model,
const JointObsrvModel& joint_obsrv_model,
const TransitionFunction& process_model,
const ActualJointSensor& joint_obsrv_model,
const Quadrature& quadrature)
: joint_obsrv_model_(joint_obsrv_model),
multi_sensor_gaussian_filter_(
process_model,
RobustJointFeatureObsrvModel(
FeatureObsrvModel(joint_obsrv_model_.local_obsrv_model(),
RobustJointFeatureSensor(
FeatureSensor(joint_obsrv_model_.local_obsrv_model(),
joint_obsrv_model_.count_local_models()),
joint_obsrv_model_.count_local_models()),
quadrature)
Expand Down Expand Up @@ -154,8 +154,8 @@ class RobustMultiSensorGaussianFilter
auto& body_tail_model = feature_model.embedded_obsrv_model();

typedef typename BodyTailModel::Obsrv LocalObsrv;
typedef typename FeatureObsrvModel::Obsrv LocalFeature;
typedef typename BodyTailModel::BodyObsrvModel::Noise LocalObsrvNoise;
typedef typename FeatureSensor::Obsrv LocalFeature;
typedef typename BodyTailModel::BodySensor::Noise LocalObsrvNoise;

/* ------------------------------------------ */
/* - Determine the number of quadrature - */
Expand Down Expand Up @@ -316,18 +316,18 @@ class RobustMultiSensorGaussianFilter
}

public: /* accessors & mutators */
StateTransitionFunction& process_model()
TransitionFunction& process_model()
{
return multi_sensor_gaussian_filter_.process_model();
}

JointObsrvModel& obsrv_model() { return joint_obsrv_model_; }
const StateTransitionFunction& process_model() const
ActualJointSensor& obsrv_model() { return joint_obsrv_model_; }
const TransitionFunction& process_model() const
{
return multi_sensor_gaussian_filter_.process_model();
}

const JointObsrvModel& obsrv_model() const { return joint_obsrv_model_; }
const ActualJointSensor& obsrv_model() const { return joint_obsrv_model_; }
std::string name() const override
{
return "RobustMultiSensorGaussianFilter<" +
Expand All @@ -342,14 +342,14 @@ class RobustMultiSensorGaussianFilter
}

protected:
RobustJointFeatureObsrvModel& joint_feature_model()
RobustJointFeatureSensor& joint_feature_model()
{
return multi_sensor_gaussian_filter_.obsrv_model();
}

protected:
/** \cond internal */
JointObsrvModel joint_obsrv_model_;
ActualJointSensor joint_obsrv_model_;
InternalMultiSensorGaussianFilter multi_sensor_gaussian_filter_;
/** \endcond */
};
Expand Down
46 changes: 23 additions & 23 deletions include/fl/filter/gaussian/gaussian_filter_linear.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ template <typename...> class GaussianFilter;
*
* Traits of the Linear GaussianFilter (KalmanFilter)
*/
template <typename LinearStateTransitionModel, typename LinearObservationModel>
template <typename LinearTransition, typename LinearSensor>
struct Traits<
GaussianFilter<
LinearStateTransitionModel,
LinearObservationModel>>
LinearTransition,
LinearSensor>>
{
typedef typename LinearStateTransitionModel::State State;
typedef typename LinearStateTransitionModel::Input Input;
typedef typename LinearObservationModel::Obsrv Obsrv;
typedef typename LinearTransition::State State;
typedef typename LinearTransition::Input Input;
typedef typename LinearSensor::Obsrv Obsrv;
typedef Gaussian<State> Belief;
};

Expand All @@ -76,24 +76,24 @@ struct Traits<
*
*/
template <
typename LinearStateTransitionModel,
typename LinearObservationModel
typename LinearTransition,
typename LinearSensor
>
class GaussianFilter<
LinearStateTransitionModel,
LinearObservationModel>
LinearTransition,
LinearSensor>
:
/* Implement the conceptual filter interface */
public
FilterInterface<
GaussianFilter<
typename ForwardLinearModelOnly<LinearStateTransitionModel>::Type,
typename ForwardLinearModelOnly<LinearObservationModel>::Type>>
typename ForwardLinearModelOnly<LinearTransition>::Type,
typename ForwardLinearModelOnly<LinearSensor>::Type>>
{
public:
typedef typename LinearStateTransitionModel::State State;
typedef typename LinearStateTransitionModel::Input Input;
typedef typename LinearObservationModel::Obsrv Obsrv;
typedef typename LinearTransition::State State;
typedef typename LinearTransition::Input Input;
typedef typename LinearSensor::Obsrv Obsrv;

/**
* \brief Represents the underlying distribution of the estimated state.
Expand All @@ -109,8 +109,8 @@ class GaussianFilter<
* \param process_model Process model instance
* \param obsrv_model Obsrv model instance
*/
GaussianFilter(const LinearStateTransitionModel& process_model,
const LinearObservationModel& obsrv_model)
GaussianFilter(const LinearTransition& process_model,
const LinearSensor& obsrv_model)
: process_model_(process_model),
obsrv_model_(obsrv_model)
{ }
Expand Down Expand Up @@ -215,30 +215,30 @@ class GaussianFilter<
obsrv_model().description());
}

LinearStateTransitionModel& process_model()
LinearTransition& process_model()
{
return process_model_;
}

LinearObservationModel& obsrv_model()
LinearSensor& obsrv_model()
{
return obsrv_model_;
}

const LinearStateTransitionModel& process_model() const
const LinearTransition& process_model() const
{
return process_model_;
}

const LinearObservationModel& obsrv_model() const
const LinearSensor& obsrv_model() const
{
return obsrv_model_;
}

protected:
/** \cond internal */
LinearStateTransitionModel process_model_;
LinearObservationModel obsrv_model_;
LinearTransition process_model_;
LinearSensor obsrv_model_;
/** \endcond */
};

Expand Down
Loading

0 comments on commit dc7e368

Please sign in to comment.