odometry
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
odometry::SkidOdometry Class Reference

Class which provides a simple wheel (skid steering) odometry. More...

#include <Odometry.hpp>

Inheritance diagram for odometry::SkidOdometry:
odometry::Gaussian3D odometry::Sampling3D odometry::Sampling2D odometry::Skid4Odometry

Public Types

typedef base::Matrix6d Matrix6d
 
typedef base::Vector6d Vector6d
 

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SkidOdometry (const Configuration &config, double wheelRadiusAvg, double trackWidth, double wheelBase, const std::vector< std::string > &leftWheelNames, const std::vector< std::string > &rightWheelNames)
 default constructor for wheel odometry class More...
 
 SkidOdometry (const Configuration &config, double wheelRadiusAvg, double trackWidth, double wheelBase, const std::vector< std::string > &leftWheelNames, const std::vector< std::string > &rightWheelNames, const std::vector< std::string > &leftSteeringNames, const std::vector< std::string > &rightSteeringNames)
 Advanced constructor for wheel odometry class. More...
 
void update (Eigen::Vector2d diff, const Eigen::Quaterniond &orientation)
 update method which is called for each new measurement More...
 
void update (double d, const Eigen::Quaterniond &orientation)
 update method which is called for each new measurement More...
 
void update (const base::samples::Joints &js, const Eigen::Quaterniond &orientation)
 update method which is called for each new measurement More...
 
void update (const base::samples::Joints &jsw, const base::samples::Joints &jss, const Eigen::Quaterniond &orientation)
 update method which is called for each new measurement More...
 
base::Pose getPoseDelta ()
 provides the mean of the change in pose between the last two update calls More...
 
Eigen::Matrix3d getPositionError ()
 Provide the error covariance matrix for the current pose delta. More...
 
Eigen::Matrix3d getOrientationError ()
 provide the orientation covariance matrix for the current pose delta More...
 
Matrix6d getPoseError ()
 
base::Pose getPoseDeltaSample ()
 get a 3d pose sample based on the current state of the odometry More...
 
base::Pose2D getPoseDeltaSample2D ()
 provide a 2d pose sample based on the current state of the odometry More...
 
- Public Member Functions inherited from odometry::Gaussian3D
virtual ~Gaussian3D ()
 
base::Matrix6d getPoseError ()
 
- Public Member Functions inherited from odometry::Sampling3D
virtual ~Sampling3D ()
 
- Public Member Functions inherited from odometry::Sampling2D
virtual ~Sampling2D ()
 

Protected Member Functions

double getTranslation (const std::vector< std::string > &actuatorNames)
 
double getRotation (const std::vector< std::string > &actuatorNames)
 

Protected Attributes

Configuration config
 
double wheelRadiusAvg
 
double trackWidth
 
double wheelBase
 
GaussianSamplingPose3D sampling
 
Eigen::Quaterniond orientation
 
Eigen::Quaterniond prevOrientation
 
base::Pose pose
 
State< base::samples::Joints > jointState
 
State< base::samples::Joints > steeringJointState
 
std::vector< std::string > leftWheelNames
 
std::vector< std::string > rightWheelNames
 
std::vector< std::string > leftSteeringNames
 
std::vector< std::string > rightSteeringNames
 

Detailed Description

Class which provides a simple wheel (skid steering) odometry.

class is based on a simple skid steering model, where the change in orientation is provided by an IMU, so effectively only the translation comes from a change in wheel position.

Member Typedef Documentation

◆ Matrix6d

typedef base::Matrix6d odometry::SkidOdometry::Matrix6d

◆ Vector6d

typedef base::Vector6d odometry::SkidOdometry::Vector6d

Constructor & Destructor Documentation

◆ SkidOdometry() [1/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW odometry::SkidOdometry::SkidOdometry ( const Configuration config,
double  wheelRadiusAvg,
double  trackWidth,
double  wheelBase,
const std::vector< std::string > &  leftWheelNames,
const std::vector< std::string > &  rightWheelNames 
)

default constructor for wheel odometry class

Parameters
configodometry configuration class, mainly setting the error matrix

◆ SkidOdometry() [2/2]

odometry::SkidOdometry::SkidOdometry ( const Configuration config,
double  wheelRadiusAvg,
double  trackWidth,
double  wheelBase,
const std::vector< std::string > &  leftWheelNames,
const std::vector< std::string > &  rightWheelNames,
const std::vector< std::string > &  leftSteeringNames,
const std::vector< std::string > &  rightSteeringNames 
)

Advanced constructor for wheel odometry class.

Parameters
configodometry configuration class, mainly setting the error matrix

Member Function Documentation

◆ getOrientationError()

Eigen::Matrix3d SkidOdometry::getOrientationError ( )
virtual

provide the orientation covariance matrix for the current pose delta

Returns
orientation error covariance as 3 matrix as axis/angle of rotation

Implements odometry::Gaussian3D.

Reimplemented in odometry::Skid4Odometry.

◆ getPoseDelta()

base::Pose SkidOdometry::getPoseDelta ( )
virtual

provides the mean of the change in pose between the last two update calls

Returns
is a body to previous body transform

Implements odometry::Gaussian3D.

◆ getPoseDeltaSample()

base::Pose SkidOdometry::getPoseDeltaSample ( )
virtual

get a 3d pose sample based on the current state of the odometry

Provides a sample of the pose based on the last two update calls. This is effectively the PoseDelta perturbed by gaussian noise based on the poseError.

Returns
a full body to previous body transform

Implements odometry::Sampling3D.

◆ getPoseDeltaSample2D()

base::Pose2D SkidOdometry::getPoseDeltaSample2D ( )
virtual

provide a 2d pose sample based on the current state of the odometry

Works like the 3d pose sample, but performs a flatting onto a 2d pose.

Returns
a body to previous body transform in 2d

Implements odometry::Sampling2D.

◆ getPoseError()

base::Matrix6d SkidOdometry::getPoseError ( )

◆ getPositionError()

Eigen::Matrix3d SkidOdometry::getPositionError ( )
virtual

Provide the error covariance matrix for the current pose delta.

Returns
position error covariance as 3 matrix

Implements odometry::Gaussian3D.

Reimplemented in odometry::Skid4Odometry.

◆ getRotation()

double SkidOdometry::getRotation ( const std::vector< std::string > &  actuatorNames)
protected

helper function that computes the mean angle of the specified actuators

◆ getTranslation()

double SkidOdometry::getTranslation ( const std::vector< std::string > &  actuatorNames)
protected

helper function that computes the mean distance traveled by the specified actuators

◆ update() [1/4]

void SkidOdometry::update ( Eigen::Vector2d  diff,
const Eigen::Quaterniond &  orientation 
)

update method which is called for each new measurement

Parameters
diffaverage of wheel distance travelled within the time step in x and y
orientationbody to world rotation provided by an IMU

◆ update() [2/4]

void SkidOdometry::update ( double  d,
const Eigen::Quaterniond &  orientation 
)

update method which is called for each new measurement

Parameters
daverage of wheel distance travelled within the time step
orientationbody to world rotation provided by an IMU

◆ update() [3/4]

void SkidOdometry::update ( const base::samples::Joints &  js,
const Eigen::Quaterniond &  orientation 
)

update method which is called for each new measurement

Parameters
jsencodes the current in wheel positions
orientationbody to world rotation provided by an IMU

◆ update() [4/4]

void SkidOdometry::update ( const base::samples::Joints &  jsw,
const base::samples::Joints &  jss,
const Eigen::Quaterniond &  orientation 
)

update method which is called for each new measurement

Parameters
jswencodes the current in wheel positions
jssencodes the current in steering positions
orientationbody to world rotation provided by an IMU

Member Data Documentation

◆ config

Configuration odometry::SkidOdometry::config
protected

Odometry configuration

◆ jointState

State<base::samples::Joints> odometry::SkidOdometry::jointState
protected

◆ leftSteeringNames

std::vector<std::string> odometry::SkidOdometry::leftSteeringNames
protected

◆ leftWheelNames

std::vector<std::string> odometry::SkidOdometry::leftWheelNames
protected

◆ orientation

Eigen::Quaterniond odometry::SkidOdometry::orientation
protected

◆ pose

base::Pose odometry::SkidOdometry::pose
protected

◆ prevOrientation

Eigen::Quaterniond odometry::SkidOdometry::prevOrientation
protected

◆ rightSteeringNames

std::vector<std::string> odometry::SkidOdometry::rightSteeringNames
protected

◆ rightWheelNames

std::vector<std::string> odometry::SkidOdometry::rightWheelNames
protected

◆ sampling

GaussianSamplingPose3D odometry::SkidOdometry::sampling
protected

◆ steeringJointState

State<base::samples::Joints> odometry::SkidOdometry::steeringJointState
protected

◆ trackWidth

double odometry::SkidOdometry::trackWidth
protected

distance between left and right wheel

◆ wheelBase

double odometry::SkidOdometry::wheelBase
protected

distance between front and rear axle

◆ wheelRadiusAvg

double odometry::SkidOdometry::wheelRadiusAvg
protected

avg wheel radius for odometry calculations


The documentation for this class was generated from the following files: