Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
visp_tracker::TrackerViewer Class Reference

Monitors the tracking result provided by the tracking node. More...

#include <tracker-viewer.hh>

List of all members.

Public Types

typedef vpImage< unsigned char > image_t
 ViSP image type.
typedef
message_filters::sync_policies::ApproximateTime
< sensor_msgs::Image,
sensor_msgs::CameraInfo,
geometry_msgs::PoseWithCovarianceStamped,
visp_tracker::MovingEdgeSites,
visp_tracker::KltPoints > 
syncPolicy_t
 Synchronization policy.

Public Member Functions

void spin ()
 Display camera image, tracked object position and moving edge sites.
 TrackerViewer (ros::NodeHandle &nh, ros::NodeHandle &privateNh, volatile bool &exiting, unsigned queueSize=5u)
 Constructor.

Protected Member Functions

void callback (const sensor_msgs::ImageConstPtr &imageConst, const sensor_msgs::CameraInfoConstPtr &infoConst, const geometry_msgs::PoseWithCovarianceStamped::ConstPtr &trackingResult, const visp_tracker::MovingEdgeSites::ConstPtr &sitesConst, const visp_tracker::KltPoints::ConstPtr &kltConst)
 Callback used to received synchronized data.
void checkInputs ()
 Make sure the topics we subscribe already exist.
void displayKltPoints ()
 Display KLT points that are tracked.
void displayMovingEdgeSites ()
 Display moving edge sites.
void initializeTracker ()
 Initialize the tracker.
void timerCallback ()
void waitForImage ()
 Hang until the first image is received.

Private Member Functions

bool exiting ()

Private Attributes

vpCameraParameters cameraParameters_
 ViSP camera parameters.
image_proc::AdvertisementChecker checkInputs_
 Helper used to check that subscribed topics exist.
boost::optional
< vpHomogeneousMatrix > 
cMo_
 Last tracked object position, set to none if tracking failed.
volatile bool & exiting_
image_t image_
 ViSP image.
image_transport::ImageTransport imageTransport_
 Image transport used to receive images.
sensor_msgs::CameraInfoConstPtr info_
 Shared pointer to latest received camera information.
visp_tracker::KltPoints::ConstPtr klt_
 Shared pointer to latest received KLT point positions.
ros::NodeHandlenodeHandle_
ros::NodeHandlenodeHandlePrivate_
unsigned queueSize_
 Queue size for all subscribers.
visp_tracker::MovingEdgeSites::ConstPtr sites_
 Shared pointer to latest received moving edge sites.
vpMbEdgeTracker tracker_
 ViSP edge tracker.
boost::filesystem::path vrmlPath_
 VRML model path.
Topics and services strings.
std::string rectifiedImageTopic_
 Full topic name for rectified image.
std::string cameraInfoTopic_
 Full topic name for camera information.
Subscribers and synchronizer.

Subscriber to image topic.

image_transport::SubscriberFilter imageSubscriber_
message_filters::Subscriber
< sensor_msgs::CameraInfo > 
cameraInfoSubscriber_
 Subscriber to camera information topic.
message_filters::Subscriber
< geometry_msgs::PoseWithCovarianceStamped > 
trackingResultSubscriber_
 Subscriber to tracking result topic.
message_filters::Subscriber
< visp_tracker::MovingEdgeSites > 
movingEdgeSitesSubscriber_
 Subscriber to moving edge sites topics.
message_filters::Subscriber
< visp_tracker::KltPoints > 
kltPointsSubscriber_
 Subscriber to KLT point topics.
message_filters::Synchronizer
< syncPolicy_t
synchronizer_
 Synchronizer with approximate time policy.
Synchronization check

}

ros::WallTimer timer_
unsigned countAll_
unsigned countImages_
unsigned countCameraInfo_
unsigned countTrackingResult_
unsigned countMovingEdgeSites_
unsigned countKltPoints_

Detailed Description

Monitors the tracking result provided by the tracking node.

Definition at line 30 of file tracker-viewer.hh.


Member Typedef Documentation

typedef vpImage<unsigned char> visp_tracker::TrackerViewer::image_t

ViSP image type.

Definition at line 34 of file tracker-viewer.hh.

typedef message_filters::sync_policies::ApproximateTime< sensor_msgs::Image, sensor_msgs::CameraInfo, geometry_msgs::PoseWithCovarianceStamped, visp_tracker::MovingEdgeSites, visp_tracker::KltPoints > visp_tracker::TrackerViewer::syncPolicy_t

Synchronization policy.

This is used to make sure that the image, the object position and the moving edge sites are synchronized. This may not be the case as these informations are published on different topics. The approximate time allows light differences in timestamps which are not critical as this is only a viewer.

Definition at line 48 of file tracker-viewer.hh.


Constructor & Destructor Documentation

visp_tracker::TrackerViewer::TrackerViewer ( ros::NodeHandle nh,
ros::NodeHandle privateNh,
volatile bool &  exiting,
unsigned  queueSize = 5u 
)

Constructor.

Definition at line 35 of file tracker-viewer.cpp.


Member Function Documentation

void visp_tracker::TrackerViewer::callback ( const sensor_msgs::ImageConstPtr &  imageConst,
const sensor_msgs::CameraInfoConstPtr &  infoConst,
const geometry_msgs::PoseWithCovarianceStamped::ConstPtr &  trackingResult,
const visp_tracker::MovingEdgeSites::ConstPtr &  sitesConst,
const visp_tracker::KltPoints::ConstPtr &  kltConst 
) [protected]

Callback used to received synchronized data.

Definition at line 280 of file tracker-viewer.cpp.

Make sure the topics we subscribe already exist.

Definition at line 250 of file tracker-viewer.cpp.

Display KLT points that are tracked.

Definition at line 342 of file tracker-viewer.cpp.

Display moving edge sites.

Definition at line 307 of file tracker-viewer.cpp.

bool visp_tracker::TrackerViewer::exiting ( ) [inline, private]

Definition at line 86 of file tracker-viewer.hh.

Initialize the tracker.

Definition at line 262 of file tracker-viewer.cpp.

Display camera image, tracked object position and moving edge sites.

Definition at line 179 of file tracker-viewer.cpp.

Definition at line 366 of file tracker-viewer.cpp.

Hang until the first image is received.

Definition at line 237 of file tracker-viewer.cpp.


Member Data Documentation

Subscriber to camera information topic.

Definition at line 141 of file tracker-viewer.hh.

Full topic name for camera information.

Definition at line 109 of file tracker-viewer.hh.

vpCameraParameters visp_tracker::TrackerViewer::cameraParameters_ [private]

ViSP camera parameters.

Definition at line 123 of file tracker-viewer.hh.

Helper used to check that subscribed topics exist.

Definition at line 118 of file tracker-viewer.hh.

boost::optional<vpHomogeneousMatrix> visp_tracker::TrackerViewer::cMo_ [private]

Last tracked object position, set to none if tracking failed.

Definition at line 130 of file tracker-viewer.hh.

Definition at line 159 of file tracker-viewer.hh.

Definition at line 161 of file tracker-viewer.hh.

Definition at line 160 of file tracker-viewer.hh.

Definition at line 164 of file tracker-viewer.hh.

Definition at line 163 of file tracker-viewer.hh.

Definition at line 162 of file tracker-viewer.hh.

volatile bool& visp_tracker::TrackerViewer::exiting_ [private]

Definition at line 91 of file tracker-viewer.hh.

ViSP image.

Definition at line 125 of file tracker-viewer.hh.

Definition at line 139 of file tracker-viewer.hh.

Image transport used to receive images.

Definition at line 100 of file tracker-viewer.hh.

sensor_msgs::CameraInfoConstPtr visp_tracker::TrackerViewer::info_ [private]

Shared pointer to latest received camera information.

Definition at line 128 of file tracker-viewer.hh.

visp_tracker::KltPoints::ConstPtr visp_tracker::TrackerViewer::klt_ [private]

Shared pointer to latest received KLT point positions.

Definition at line 134 of file tracker-viewer.hh.

Subscriber to KLT point topics.

Definition at line 150 of file tracker-viewer.hh.

Subscriber to moving edge sites topics.

Definition at line 147 of file tracker-viewer.hh.

Definition at line 96 of file tracker-viewer.hh.

Definition at line 97 of file tracker-viewer.hh.

Queue size for all subscribers.

Definition at line 94 of file tracker-viewer.hh.

Full topic name for rectified image.

Definition at line 107 of file tracker-viewer.hh.

visp_tracker::MovingEdgeSites::ConstPtr visp_tracker::TrackerViewer::sites_ [private]

Shared pointer to latest received moving edge sites.

Definition at line 132 of file tracker-viewer.hh.

Synchronizer with approximate time policy.

Definition at line 153 of file tracker-viewer.hh.

Definition at line 158 of file tracker-viewer.hh.

vpMbEdgeTracker visp_tracker::TrackerViewer::tracker_ [private]

ViSP edge tracker.

Definition at line 121 of file tracker-viewer.hh.

message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped> visp_tracker::TrackerViewer::trackingResultSubscriber_ [private]

Subscriber to tracking result topic.

Definition at line 144 of file tracker-viewer.hh.

boost::filesystem::path visp_tracker::TrackerViewer::vrmlPath_ [private]

VRML model path.

Definition at line 115 of file tracker-viewer.hh.


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


visp_tracker
Author(s): Thomas Moulard
autogenerated on Mon Oct 6 2014 08:40:35