All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Public Member Functions | Private Member Functions | Private Attributes
ccny_rgbd::VisualOdometry Class Reference

Subscribes to incoming RGBD images and outputs the position of the moving (base) frame wrt some fixed frame. More...

#include <visual_odometry.h>

List of all members.

Public Member Functions

 VisualOdometry (const ros::NodeHandle &nh, const ros::NodeHandle &nh_private)
 Constructor from ROS nodehandles.
virtual ~VisualOdometry ()
 Default destructor.

Private Member Functions

void configureMotionEstimation ()
void diagnostics (int n_features, int n_valid_features, int n_model_pts, double d_frame, double d_features, double d_reg, double d_total)
 Saves computed running times to file (or print on screen)
bool getBaseToCameraTf (const std_msgs::Header &header)
 Caches the transform from the base frame to the camera frame.
void gftReconfigCallback (GftDetectorConfig &config, uint32_t level)
 ROS dynamic reconfigure callback function for GFT.
void initParams ()
 Initializes all the parameters from the ROS param server.
void orbReconfigCallback (OrbDetectorConfig &config, uint32_t level)
 ROS dynamic reconfigure callback function for ORB.
void publishFeatureCloud (rgbdtools::RGBDFrame &frame)
 Publish the feature point cloud.
void publishFeatureCovariances (rgbdtools::RGBDFrame &frame)
void publishModelCloud ()
void publishModelCovariances ()
void publishOdom (const std_msgs::Header &header)
 publishes the f2b_ (fixed-to-base) transform as an Odom message
void publishPath (const std_msgs::Header &header)
 publishes the path of f2b_ (fixed-to-base) transform as an Path message
void publishPoseStamped (const std_msgs::Header &header)
 publishes the f2b_ (fixed-to-base) transform as an pose stamped message
void publishTf (const std_msgs::Header &header)
 publishes the f2b_ (fixed-to-base) transform as a tf
void resetDetector ()
 Re-instantiates the feature detector based on the detector type parameter.
bool resetposSrvCallback (Save::Request &request, Save::Response &response)
void RGBDCallback (const ImageMsg::ConstPtr &rgb_msg, const ImageMsg::ConstPtr &depth_msg, const CameraInfoMsg::ConstPtr &info_msg)
 Main callback for RGB, Depth, and CameraInfo messages.
void starReconfigCallback (StarDetectorConfig &config, uint32_t level)
 ROS dynamic reconfigure callback function for STAR.
void surfReconfigCallback (SurfDetectorConfig &config, uint32_t level)
 ROS dynamic reconfigure callback function for SURF.

Private Attributes

tf::Transform b2c_
 Transform from the base to the camera frame, wrt base frame.
std::string base_frame_
 Moving frame parameter.
boost::shared_ptr< ImageTransportdepth_it_
 Image transport for depth message subscription.
std::string detector_type_
 Feature detector type parameter.
FILE * diagnostics_file_
 File for time recording statistics.
std::string diagnostics_file_name_
 File name for time recording statistics.
tf::Transform f2b_
 Transform from the fixed to the base frame, wrt fixed frame.
ros::Publisher feature_cloud_publisher_
ros::Publisher feature_cov_publisher_
boost::shared_ptr
< rgbdtools::FeatureDetector
feature_detector_
 The feature detector object.
std::string fixed_frame_
 Fixed frame parameter.
int frame_count_
 RGBD frame counter.
GftDetectorConfigServerPtr gft_config_server_
 ROS dynamic reconfigure server for GFT params.
ros::Time init_time_
 Time of first RGBD message.
bool initialized_
 Whether the init_time and b2c_ variables have been set.
ros::Publisher model_cloud_publisher_
ros::Publisher model_cov_publisher_
rgbdtools::MotionEstimationICPProbModel motion_estimation_
 The motion estimation object.
ros::NodeHandle nh_
 the public nodehandle
ros::NodeHandle nh_private_
 the private nodehandle
ros::Publisher odom_publisher_
 ROS Odometry publisher.
OrbDetectorConfigServerPtr orb_config_server_
 ROS dynamic reconfigure server for ORB params.
PathMsg path_msg_
 contains a vector of positions of the Base frame.
ros::Publisher path_pub_
 ROS publisher for the VO path.
ros::Publisher pose_stamped_publisher_
 ROS pose stamped publisher.
bool publish_cloud_
 If true, publish the pcl feature cloud.
bool publish_feature_cloud_
bool publish_feature_cov_
bool publish_model_cloud_
bool publish_model_cov_
bool publish_odom_
 Parameter whether to publish an odom message.
bool publish_path_
 Parameter whether to publish a path message.
bool publish_pose_
 Parameter whether to publish a pose message.
bool publish_tf_
 Parameter whether to publish a ros tf.
int queue_size_
 Subscription queue size.
std::string reg_type_
 Motion estimation (registration) type parameter.
ros::ServiceServer reset_pos_
boost::shared_ptr< ImageTransportrgb_it_
 Image transport for RGB message subscription.
bool save_diagnostics_
 indicates whether to save results to file or print to screen
StarDetectorConfigServerPtr star_config_server_
 ROS dynamic reconfigure server for STAR params.
ImageSubFilter sub_depth_
 Depth message subscriber.
CameraInfoSubFilter sub_info_
 Camera info message subscriber.
ImageSubFilter sub_rgb_
 RGB message subscriber.
SurfDetectorConfigServerPtr surf_config_server_
 ROS dynamic reconfigure server for SURF params.
boost::shared_ptr
< RGBDSynchronizer3
sync_
 Callback syncronizer.
tf::TransformBroadcaster tf_broadcaster_
 ROS transform broadcaster.
tf::TransformListener tf_listener_
 ROS transform listener.
bool verbose_
 indicates whether to print diagnostics to screen

Detailed Description

Subscribes to incoming RGBD images and outputs the position of the moving (base) frame wrt some fixed frame.

The class offers a selection of sparse feature detectors (GFT, ORB, SURF, STAR), as well as a selection of registration algorithms. The default registration method (ICPProbModel) aligns the incoming 3D sparse features against a persistent 3D feature model, which is continuously updated using a Kalman Filer.

Definition at line 57 of file visual_odometry.h.


Constructor & Destructor Documentation

Constructor from ROS nodehandles.

Parameters:
nhthe public nodehandle
nh_privatethe private nodehandle

Definition at line 29 of file visual_odometry.cpp.

Default destructor.

Definition at line 83 of file visual_odometry.cpp.


Member Function Documentation

Definition at line 225 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::diagnostics ( int  n_features,
int  n_valid_features,
int  n_model_pts,
double  d_frame,
double  d_features,
double  d_reg,
double  d_total 
) [private]

Saves computed running times to file (or print on screen)

Returns:
1 if write to file was successful

Definition at line 513 of file visual_odometry.cpp.

Caches the transform from the base frame to the camera frame.

Parameters:
headerheader of the incoming message, used to stamp things correctly

Definition at line 456 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::gftReconfigCallback ( GftDetectorConfig &  config,
uint32_t  level 
) [private]

ROS dynamic reconfigure callback function for GFT.

Definition at line 478 of file visual_odometry.cpp.

Initializes all the parameters from the ROS param server.

Definition at line 149 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::orbReconfigCallback ( OrbDetectorConfig &  config,
uint32_t  level 
) [private]

ROS dynamic reconfigure callback function for ORB.

Definition at line 504 of file visual_odometry.cpp.

Publish the feature point cloud.

Note: this might decrease performance

Definition at line 540 of file visual_odometry.cpp.

< publish feature covariances

Definition at line 547 of file visual_odometry.cpp.

Definition at line 552 of file visual_odometry.cpp.

< ppublish model covariances

Definition at line 559 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::publishOdom ( const std_msgs::Header header) [private]

publishes the f2b_ (fixed-to-base) transform as an Odom message

Todo:
publish also as PoseWithCovariance
Parameters:
headerheader of the incoming message, used to stamp things correctly

Definition at line 422 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::publishPath ( const std_msgs::Header header) [private]

publishes the path of f2b_ (fixed-to-base) transform as an Path message

Parameters:
headerheader of the incoming message, used to stamp things correctly

Definition at line 442 of file visual_odometry.cpp.

publishes the f2b_ (fixed-to-base) transform as an pose stamped message

Parameters:
headerheader of the incoming message, used to stamp things correctly

Definition at line 431 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::publishTf ( const std_msgs::Header header) [private]

publishes the f2b_ (fixed-to-base) transform as a tf

Parameters:
headerheader of the incoming message, used to stamp things correctly

Definition at line 415 of file visual_odometry.cpp.

Re-instantiates the feature detector based on the detector type parameter.

Definition at line 275 of file visual_odometry.cpp.

bool ccny_rgbd::VisualOdometry::resetposSrvCallback ( Save::Request &  request,
Save::Response &  response 
) [private]

Definition at line 89 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::RGBDCallback ( const ImageMsg::ConstPtr &  rgb_msg,
const ImageMsg::ConstPtr &  depth_msg,
const CameraInfoMsg::ConstPtr &  info_msg 
) [private]

Main callback for RGB, Depth, and CameraInfo messages.

Parameters:
rgb_msgRGB message (8UC3)
depth_msgDepth message (16UC1, in mm)
info_msgCameraInfo message, applies to both RGB and depth images

Definition at line 344 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::starReconfigCallback ( StarDetectorConfig &  config,
uint32_t  level 
) [private]

ROS dynamic reconfigure callback function for STAR.

Definition at line 487 of file visual_odometry.cpp.

void ccny_rgbd::VisualOdometry::surfReconfigCallback ( SurfDetectorConfig &  config,
uint32_t  level 
) [private]

ROS dynamic reconfigure callback function for SURF.

Definition at line 496 of file visual_odometry.cpp.


Member Data Documentation

tf::Transform ccny_rgbd::VisualOdometry::b2c_ [private]

Transform from the base to the camera frame, wrt base frame.

Definition at line 164 of file visual_odometry.h.

Moving frame parameter.

Definition at line 120 of file visual_odometry.h.

Image transport for depth message subscription.

Definition at line 103 of file visual_odometry.h.

Feature detector type parameter.

Possible values:

  • GFT (default)
  • SURF
  • STAR
  • ORB

Definition at line 140 of file visual_odometry.h.

File for time recording statistics.

Definition at line 89 of file visual_odometry.h.

File name for time recording statistics.

Definition at line 90 of file visual_odometry.h.

tf::Transform ccny_rgbd::VisualOdometry::f2b_ [private]

Transform from the fixed to the base frame, wrt fixed frame.

Definition at line 165 of file visual_odometry.h.

Definition at line 84 of file visual_odometry.h.

Definition at line 85 of file visual_odometry.h.

The feature detector object.

Definition at line 167 of file visual_odometry.h.

Fixed frame parameter.

Definition at line 119 of file visual_odometry.h.

RGBD frame counter.

Definition at line 161 of file visual_odometry.h.

ROS dynamic reconfigure server for GFT params.

Definition at line 94 of file visual_odometry.h.

Time of first RGBD message.

Definition at line 162 of file visual_odometry.h.

Whether the init_time and b2c_ variables have been set.

Definition at line 160 of file visual_odometry.h.

Definition at line 86 of file visual_odometry.h.

Definition at line 87 of file visual_odometry.h.

The motion estimation object.

Definition at line 169 of file visual_odometry.h.

the public nodehandle

Definition at line 76 of file visual_odometry.h.

the private nodehandle

Definition at line 77 of file visual_odometry.h.

ROS Odometry publisher.

Definition at line 80 of file visual_odometry.h.

ROS dynamic reconfigure server for ORB params.

Definition at line 97 of file visual_odometry.h.

contains a vector of positions of the Base frame.

Definition at line 171 of file visual_odometry.h.

ROS publisher for the VO path.

Definition at line 82 of file visual_odometry.h.

ROS pose stamped publisher.

Definition at line 81 of file visual_odometry.h.

If true, publish the pcl feature cloud.

Note: this might slightly decrease performance

Definition at line 154 of file visual_odometry.h.

Definition at line 126 of file visual_odometry.h.

Definition at line 127 of file visual_odometry.h.

Definition at line 129 of file visual_odometry.h.

Definition at line 130 of file visual_odometry.h.

Parameter whether to publish an odom message.

Definition at line 123 of file visual_odometry.h.

Parameter whether to publish a path message.

Definition at line 122 of file visual_odometry.h.

Parameter whether to publish a pose message.

Definition at line 124 of file visual_odometry.h.

Parameter whether to publish a ros tf.

Definition at line 121 of file visual_odometry.h.

Subscription queue size.

Definition at line 156 of file visual_odometry.h.

std::string ccny_rgbd::VisualOdometry::reg_type_ [private]

Motion estimation (registration) type parameter.

Possible values:

  • ICPProbModel (default)
  • ICP

Definition at line 148 of file visual_odometry.h.

Definition at line 88 of file visual_odometry.h.

boost::shared_ptr<ImageTransport> ccny_rgbd::VisualOdometry::rgb_it_ [private]

Image transport for RGB message subscription.

Definition at line 100 of file visual_odometry.h.

indicates whether to save results to file or print to screen

Definition at line 91 of file visual_odometry.h.

ROS dynamic reconfigure server for STAR params.

Definition at line 95 of file visual_odometry.h.

Depth message subscriber.

Definition at line 112 of file visual_odometry.h.

Camera info message subscriber.

Definition at line 115 of file visual_odometry.h.

RGB message subscriber.

Definition at line 109 of file visual_odometry.h.

ROS dynamic reconfigure server for SURF params.

Definition at line 96 of file visual_odometry.h.

Callback syncronizer.

Definition at line 106 of file visual_odometry.h.

tf::TransformBroadcaster ccny_rgbd::VisualOdometry::tf_broadcaster_ [private]

ROS transform broadcaster.

Definition at line 79 of file visual_odometry.h.

tf::TransformListener ccny_rgbd::VisualOdometry::tf_listener_ [private]

ROS transform listener.

Definition at line 78 of file visual_odometry.h.

indicates whether to print diagnostics to screen

Definition at line 92 of file visual_odometry.h.


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


ccny_rgbd
Author(s): Ivan Dryanovski
autogenerated on Tue Aug 27 2013 10:34:02