Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
VisualCompass Class Reference

List of all members.

Public Member Functions

 VisualCompass ()
 ~VisualCompass ()

Private Member Functions

std::pair< double, double > corel_row (const Mat &I, const Mat &J)
double deg2rad (double deg)
void imageCb (const sensor_msgs::ImageConstPtr &Image)

Private Attributes

double angle_deg
 Total angle measured from the start of computing in degrees.
std::string compass_image
 Name of the subsribed topic.
std::string compass_output_topic
 Name of the published topic.
ros::Time current_time
double dt
 delta time, time difference
Mat I
 The opencv matrix for the actual image.
image_transport::Subscriber image_sub_
image_transport::ImageTransport it_
Mat J
 The opencv matrix for the last image.
ros::Time last_time
ros::NodeHandle nh_
ros::Publisher odom_pub
bool textout
 Turns on the text output to the console.

Static Private Attributes

static const int computed_rows = down-up
 computed rows of the ROI
static const int down = 45
 downer threshold of ROI
static const int up = 25
 upper threshold of ROI

Detailed Description

computes the horizontal rotation between two images.

Definition at line 31 of file compass.cpp.


Constructor & Destructor Documentation

Constructor that loads the ROS parameters, subsribes to the camera topic and advertise odometry topic.

Parameters:
compass_imagedefines the input panorama topic
compass_output_topicdefines the output odometry topic
compass_textoutsets the text output to the console on

Definition at line 57 of file compass.cpp.

Destructor

Definition at line 86 of file compass.cpp.


Member Function Documentation

std::pair<double, double> VisualCompass::corel_row ( const Mat &  I,
const Mat &  J 
) [inline, private]

Funtion that compares lines from two images and calculates their angle difference.

Parameters:
[in]I,JThe opencv matrices containing the image line from the first and the second image.
Returns:
pair that contains angle in radians as a first element and the correlation coeficient as a second.

Definition at line 102 of file compass.cpp.

double VisualCompass::deg2rad ( double  deg) [inline, private]

Function that converts degrees to radians.

Definition at line 92 of file compass.cpp.

void VisualCompass::imageCb ( const sensor_msgs::ImageConstPtr &  Image) [inline, private]

The main routine that is executed everytime a new image occurs

Parameters:
[in]ImagePanorama Image from the camera in the spherical or the cylindrical projection.

< mean angle

< sum of weights

Definition at line 144 of file compass.cpp.


Member Data Documentation

double VisualCompass::angle_deg [private]

Total angle measured from the start of computing in degrees.

Definition at line 46 of file compass.cpp.

std::string VisualCompass::compass_image [private]

Name of the subsribed topic.

Definition at line 34 of file compass.cpp.

std::string VisualCompass::compass_output_topic [private]

Name of the published topic.

Definition at line 35 of file compass.cpp.

const int VisualCompass::computed_rows = down-up [static, private]

computed rows of the ROI

Definition at line 43 of file compass.cpp.

ros::Time VisualCompass::current_time [private]

Definition at line 47 of file compass.cpp.

const int VisualCompass::down = 45 [static, private]

downer threshold of ROI

Definition at line 42 of file compass.cpp.

double VisualCompass::dt [private]

delta time, time difference

Definition at line 37 of file compass.cpp.

Mat VisualCompass::I [private]

The opencv matrix for the actual image.

Definition at line 44 of file compass.cpp.

image_transport::Subscriber VisualCompass::image_sub_ [private]

Definition at line 39 of file compass.cpp.

image_transport::ImageTransport VisualCompass::it_ [private]

Definition at line 38 of file compass.cpp.

Mat VisualCompass::J [private]

The opencv matrix for the last image.

Definition at line 45 of file compass.cpp.

ros::Time VisualCompass::last_time [private]

Definition at line 47 of file compass.cpp.

ros::NodeHandle VisualCompass::nh_ [private]

Definition at line 33 of file compass.cpp.

ros::Publisher VisualCompass::odom_pub [private]

Definition at line 40 of file compass.cpp.

bool VisualCompass::textout [private]

Turns on the text output to the console.

Definition at line 36 of file compass.cpp.

const int VisualCompass::up = 25 [static, private]

upper threshold of ROI

Definition at line 41 of file compass.cpp.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Defines


visual_compass_relase
Author(s): Tomas Nouza nouzato1@fel.cvut.cz
autogenerated on Tue Dec 3 2013 22:10:56