All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
controller::RosieOdometry Class Reference

#include <rosie_odometry.h>

Inheritance diagram for controller::RosieOdometry:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool init (pr2_mechanism_model::RobotState *robot_state, ros::NodeHandle &node)
 Initializes and loads odometry information from the param server.
bool initXml (pr2_mechanism_model::RobotState *robot_state, TiXmlElement *config)
 Loads Odometry's information from the xml description file and param server.
void publish ()
 Publishes the currently computed odometry information.
 RosieOdometry ()
 Constructor for the odometry.
void starting ()
void update ()
 (a) Updates positions of the caster and wheels. Called every timestep in realtime
 ~RosieOdometry ()
 Destructor for the odometry.

Private Member Functions

void computeBaseVelocity ()
 Computes the base velocity from the caster positions and wheel speeds.
Eigen::MatrixXf findWeightMatrix (Eigen::MatrixXf residual, std::string weight_type)
 Finds the weight matrix from the iterative least squares residuals.
double getCorrectedWheelSpeed (int index)
 Computes the wheel's speed adjusted for the attached caster's rotational velocity.
void getOdometry (double &x, double &y, double &yaw, double &vx, double &vy, double &vw)
 Takes the current odometery information and stores it into the six double parameters.
void getOdometry (geometry_msgs::Point &odom, geometry_msgs::Twist &odom_vel)
 Takes the current odometry information and stores it into the Point and Twist parameters.
void getOdometryMessage (nav_msgs::Odometry &msg)
 Builds the odometry message and prepares it for sending.
Eigen::MatrixXf iterativeLeastSquares (Eigen::MatrixXf lhs, Eigen::MatrixXf rhs, std::string weight_type, int max_iter)
 Function used to compute the most likely solution to the odometry using iterative least squares.
void populateCovariance (double residual, nav_msgs::Odometry &msg)
 populate the covariance part of the odometry message
void updateOdometry ()
 Finds and stores the latest odometry information.

Private Attributes

BaseKinematics base_kin_
 class where the robot's information is computed and stored
std::string base_link_frame_
 The topic name of the base link frame.
Eigen::MatrixXf cbv_lhs_
Eigen::MatrixXf cbv_rhs_
 Matricies used in the computation of the iterative least squares and related functions.
Eigen::MatrixXf cbv_soln_
double cov_x_theta_
double cov_x_y_
double cov_y_theta_
ros::Time current_time_
double expected_publish_time_
 The time that the odometry is expected to be published next.
Eigen::MatrixXf fit_lhs_
Eigen::MatrixXf fit_residual_
Eigen::MatrixXf fit_rhs_
Eigen::MatrixXf fit_soln_
int ils_max_iterations_
 Number of iterations used during iterative least squares.
std::string ils_weight_type_
 The type of weighting used in findWeightMatrix.
ros::Time last_publish_time_
 The last time the odometry information was published.
ros::Time last_time_
 Stores the last update time and the current update time.
ros::NodeHandle node_
geometry_msgs::Point odom_
 Point that stores the current translational position (x,y) and angular position (z)
std::string odom_frame_
 The topic name of the published odometry.
geometry_msgs::Twist odom_vel_
 Twist that remembers the current translational velocities (vel.vx, vel.vy) and angular position (ang_vel.vz)
double odometer_angle_
 Total angular distance traveled by the base as computed by the odometer.
double odometer_distance_
 Total distance traveled by the base as computed by the odometer.
boost::scoped_ptr
< realtime_tools::RealtimePublisher
< nav_msgs::Odometry > > 
odometry_publisher_
 The RealtimePublisher that does the realtime publishing of the odometry.
Eigen::MatrixXf odometry_residual_
double odometry_residual_max_
 Maximum residual from the iteritive least squares.
double sigma_theta_
double sigma_x_
double sigma_y_
boost::scoped_ptr
< realtime_tools::RealtimePublisher
< tf::tfMessage > > 
transform_publisher_
 Publishes the transform between the odometry frame and the base frame.
Eigen::MatrixXf weight_matrix_

Detailed Description

Definition at line 61 of file rosie_odometry.h.


Constructor & Destructor Documentation

Constructor for the odometry.

Definition at line 45 of file rosie_odometry.cpp.

Destructor for the odometry.

Definition at line 49 of file rosie_odometry.cpp.


Member Function Documentation

Computes the base velocity from the caster positions and wheel speeds.

Definition at line 219 of file rosie_odometry.cpp.

Eigen::MatrixXf controller::RosieOdometry::findWeightMatrix ( Eigen::MatrixXf  residual,
std::string  weight_type 
) [private]

Finds the weight matrix from the iterative least squares residuals.

Definition at line 295 of file rosie_odometry.cpp.

double controller::RosieOdometry::getCorrectedWheelSpeed ( int  index) [private]

Computes the wheel's speed adjusted for the attached caster's rotational velocity.

Parameters:
indexThe index of the wheel

Definition at line 253 of file rosie_odometry.cpp.

void controller::RosieOdometry::getOdometry ( double &  x,
double &  y,
double &  yaw,
double &  vx,
double &  vy,
double &  vw 
) [private]

Takes the current odometery information and stores it into the six double parameters.

Parameters:
xX component of the current odom position
yY component of the current odom position
yawYaw (theta) component of the current odom position
vxX component of the current odom velocity
vyY component of the current odom velocity
vwAngular velocity (omega) component of the current odom velocity

Definition at line 209 of file rosie_odometry.cpp.

void controller::RosieOdometry::getOdometry ( geometry_msgs::Point odom,
geometry_msgs::Twist &  odom_vel 
) [private]

Takes the current odometry information and stores it into the Point and Twist parameters.

Parameters:
odomPoint into which the odometry position is placed (z is theta)
odom_velinto which the odometry velocity is placed

Definition at line 143 of file rosie_odometry.cpp.

void controller::RosieOdometry::getOdometryMessage ( nav_msgs::Odometry &  msg) [private]

Builds the odometry message and prepares it for sending.

Parameters:
msgThe nav_msgs::Odometry into which the odometry values are placed

Definition at line 150 of file rosie_odometry.cpp.

Initializes and loads odometry information from the param server.

Parameters:
robot_stateThe robot's current state
configTiny xml element pointing to this controller
Returns:
Successful init

Implements pr2_controller_interface::Controller.

Definition at line 53 of file rosie_odometry.cpp.

bool controller::RosieOdometry::initXml ( pr2_mechanism_model::RobotState robot_state,
TiXmlElement *  config 
)

Loads Odometry's information from the xml description file and param server.

Parameters:
robot_stateThe robot's current state
configTiny xml element pointing to this controller
Returns:
Successful init

Definition at line 101 of file rosie_odometry.cpp.

Eigen::MatrixXf controller::RosieOdometry::iterativeLeastSquares ( Eigen::MatrixXf  lhs,
Eigen::MatrixXf  rhs,
std::string  weight_type,
int  max_iter 
) [private]

Function used to compute the most likely solution to the odometry using iterative least squares.

Definition at line 264 of file rosie_odometry.cpp.

void controller::RosieOdometry::populateCovariance ( double  residual,
nav_msgs::Odometry &  msg 
) [private]

populate the covariance part of the odometry message

Definition at line 171 of file rosie_odometry.cpp.

Publishes the currently computed odometry information.

Definition at line 340 of file rosie_odometry.cpp.

Reimplemented from pr2_controller_interface::Controller.

Definition at line 107 of file rosie_odometry.cpp.

void controller::RosieOdometry::update ( void  ) [virtual]

(a) Updates positions of the caster and wheels. Called every timestep in realtime

Implements pr2_controller_interface::Controller.

Definition at line 114 of file rosie_odometry.cpp.

Finds and stores the latest odometry information.

Definition at line 122 of file rosie_odometry.cpp.


Member Data Documentation

class where the robot's information is computed and stored

Definition at line 119 of file rosie_odometry.h.

The topic name of the base link frame.

Definition at line 224 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::cbv_lhs_ [private]

Definition at line 189 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::cbv_rhs_ [private]

Matricies used in the computation of the iterative least squares and related functions.

Definition at line 189 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::cbv_soln_ [private]

Definition at line 189 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

Definition at line 184 of file rosie_odometry.h.

The time that the odometry is expected to be published next.

Definition at line 235 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::fit_lhs_ [private]

Definition at line 189 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::fit_residual_ [private]

Definition at line 189 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::fit_rhs_ [private]

Definition at line 189 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::fit_soln_ [private]

Definition at line 189 of file rosie_odometry.h.

Number of iterations used during iterative least squares.

Definition at line 209 of file rosie_odometry.h.

The type of weighting used in findWeightMatrix.

Definition at line 204 of file rosie_odometry.h.

The last time the odometry information was published.

Definition at line 230 of file rosie_odometry.h.

Stores the last update time and the current update time.

Definition at line 184 of file rosie_odometry.h.

Definition at line 114 of file rosie_odometry.h.

Point that stores the current translational position (x,y) and angular position (z)

Definition at line 194 of file rosie_odometry.h.

The topic name of the published odometry.

Definition at line 219 of file rosie_odometry.h.

geometry_msgs::Twist controller::RosieOdometry::odom_vel_ [private]

Twist that remembers the current translational velocities (vel.vx, vel.vy) and angular position (ang_vel.vz)

Definition at line 199 of file rosie_odometry.h.

Total angular distance traveled by the base as computed by the odometer.

Definition at line 179 of file rosie_odometry.h.

Total distance traveled by the base as computed by the odometer.

Definition at line 174 of file rosie_odometry.h.

boost::scoped_ptr<realtime_tools::RealtimePublisher <nav_msgs::Odometry> > controller::RosieOdometry::odometry_publisher_ [private]

The RealtimePublisher that does the realtime publishing of the odometry.

Definition at line 240 of file rosie_odometry.h.

Definition at line 189 of file rosie_odometry.h.

Maximum residual from the iteritive least squares.

Definition at line 214 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

Definition at line 247 of file rosie_odometry.h.

boost::scoped_ptr<realtime_tools::RealtimePublisher <tf::tfMessage> > controller::RosieOdometry::transform_publisher_ [private]

Publishes the transform between the odometry frame and the base frame.

Definition at line 245 of file rosie_odometry.h.

Eigen::MatrixXf controller::RosieOdometry::weight_matrix_ [private]

Definition at line 189 of file rosie_odometry.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


ias_mechanism_controllers
Author(s): Lorenz Moesenlechner, Ingo Kresse
autogenerated on Thu May 23 2013 10:34:13