Class CRobot2DPoseEstimator
Defined in File CRobot2DPoseEstimator.h
Nested Relationships
Nested Types
Class Documentation
-
class CRobot2DPoseEstimator
A simple filter to estimate and extrapolate the robot 2D (x,y,phi) pose from asynchronous odometry and localization/SLAM data. The implemented model is a state vector:
TPose2D (x,y,phi) + TTwist2D (vx,vy,omega) The filter can be asked for an extrapolation for some arbitrary time t`, and it’ll do a simple linear prediction. All methods are thread-safe.
Public Functions
-
CRobot2DPoseEstimator()
Default constructor
-
virtual ~CRobot2DPoseEstimator()
Destructor
-
void reset()
Resets all internal state.
-
void processUpdateNewPoseLocalization(const mrpt::math::TPose2D &newPose, mrpt::Clock::time_point tim)
Updates the filter with new global-coordinates localization data from a localization or SLAM source.
- Parameters:
tim – The timestamp of the sensor readings used to evaluate localization / SLAM.
-
void processUpdateNewOdometry(const mrpt::math::TPose2D &newGlobalOdometry, mrpt::Clock::time_point cur_tim, bool hasVelocities = false, const mrpt::math::TTwist2D &newRobotVelLocal = mrpt::math::TTwist2D())
Updates the filter with new odometry readings.
-
bool getCurrentEstimate(mrpt::math::TPose2D &pose, mrpt::math::TTwist2D &velLocal, mrpt::math::TTwist2D &velGlobal, mrpt::Clock::time_point tim_query = mrpt::Clock::now()) const
Get the estimate for a given timestamp (defaults to
now()), obtained as:last_loc (+) [ last_odo (-) odo_ref ] (+) extrapolation_from_vw
See also
- Returns:
true is the estimate can be trusted. False if the real observed data is too old or there is no valid data yet.
-
bool getLatestRobotPose(mrpt::math::TPose2D &pose) const
Get the latest known robot pose, either from odometry or localization. This differs from getCurrentEstimate() in that this method does NOT extrapolate as getCurrentEstimate() does.
See also
- Returns:
false if there is not estimation yet.
Public Static Functions