Public Member Functions | Protected Attributes
VisualServoAction Class Reference

List of all members.

Public Member Functions

cv::Mat colorSegment (cv::Mat color_frame, int hue, int threshold)
cv::Mat colorSegment (cv::Mat color_frame, int _hue_n, int _hue_p, int _sat_n, int _sat_p, int _value_n, int _value_p)
std::vector< cv::Moments > findMoments (cv::Mat in, cv::Mat &color_frame, unsigned int max_num=3)
visual_servo::VisualServoPose formPoseService (float px, float py, float pz)
float getError (PoseStamped a, PoseStamped b)
std::vector< cv::PointgetMomentCoordinates (std::vector< cv::Moments > ms)
void goalCB ()
bool isExpired ()
void printMatrix (cv::Mat_< double > in)
bool sendZeroVelocity ()
void sensorCallback (const sensor_msgs::ImageConstPtr &img_msg, const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::PointCloud2ConstPtr &cloud_msg)
void setTimer (float time)
bool updateGripperFeatures ()
 VisualServoAction (ros::NodeHandle &n, std::string which_arm)
 ~VisualServoAction ()

Protected Attributes

std::string action_name_
actionlib::SimpleActionServer
< visual_servo::VisualServoAction > 
as_
sensor_msgs::CameraInfo cam_info_
std::string cam_info_topic_
bool camera_initialized_
message_filters::Subscriber
< sensor_msgs::PointCloud2 > 
cloud_sub_
std_msgs::Header cur_camera_header_
cv::Mat cur_color_frame_
cv::Mat cur_depth_frame_
std::vector< VSXYZcur_goal_
cv::Mat cur_orig_color_frame_
XYZPointCloud cur_point_cloud_
cv::Mat cur_workspace_mask_
int default_sat_bot_value_
int default_sat_top_value_
int default_val_value_
message_filters::Subscriber
< sensor_msgs::Image > 
depth_sub_
bool desire_points_initialized_
VSXYZ desired_
cv::Mat desired_jacobian_
int display_wait_ms_
visual_servo::VisualServoFeedback feedback_
std::vector< VSXYZgoal_
PoseStamped goal_p_
bool gripper_pose_estimated_
GripperTape gripper_tape_
int gripper_tape_hue_threshold_
int gripper_tape_hue_value_
message_filters::Subscriber
< sensor_msgs::Image > 
image_sub_
bool is_gripper_initialized_
image_transport::ImageTransport it_
int jacobian_type_
cv::Mat K
double max_exec_time_
double min_contour_size_
ros::NodeHandle n_
ros::NodeHandle n_private_
int num_downsamples_
std::string optical_frame_
double place_z_velocity_
double pose_servo_z_offset_
visual_servo::VisualServoResult result_
message_filters::Synchronizer
< MySyncPolicy
sync_
double tape1_offset_x_
double tape1_offset_y_
double tape1_offset_z_
std::vector< VSXYZtape_features_
PoseStamped tape_features_p_
int target_hue_threshold_
int target_hue_value_
shared_ptr< tf::TransformListenertf_
ros::Time timer_
ros::ServiceClient v_client_
std::vector< pcl::PointXYZ > v_fk_diff_
shared_ptr< VisualServovs_
double vs_err_term_threshold_
std::string which_arm_
std::string workspace_frame_

Detailed Description

Definition at line 169 of file vs_action.cpp.


Constructor & Destructor Documentation

VisualServoAction::VisualServoAction ( ros::NodeHandle n,
std::string  which_arm 
) [inline]

Definition at line 172 of file vs_action.cpp.

Definition at line 231 of file vs_action.cpp.


Member Function Documentation

cv::Mat VisualServoAction::colorSegment ( cv::Mat  color_frame,
int  hue,
int  threshold 
) [inline]

Definition at line 540 of file vs_action.cpp.

cv::Mat VisualServoAction::colorSegment ( cv::Mat  color_frame,
int  _hue_n,
int  _hue_p,
int  _sat_n,
int  _sat_p,
int  _value_n,
int  _value_p 
) [inline]

Very Basic Color Segmentation done in HSV space Takes in Hue value and threshold as input to compute the distance in color space

Parameters:
color_framecolor input from image
Returns:
mask from the color segmentation

Definition at line 560 of file vs_action.cpp.

std::vector<cv::Moments> VisualServoAction::findMoments ( cv::Mat  in,
cv::Mat &  color_frame,
unsigned int  max_num = 3 
) [inline]
Parameters:
insingle channel image input
color_frameneed the original image for debugging and imshow
Returns:
returns ALL moment of specific color in the image

Definition at line 511 of file vs_action.cpp.

visual_servo::VisualServoPose VisualServoAction::formPoseService ( float  px,
float  py,
float  pz 
) [inline]

Definition at line 607 of file vs_action.cpp.

float VisualServoAction::getError ( PoseStamped  a,
PoseStamped  b 
) [inline]

Definition at line 413 of file vs_action.cpp.

Take three biggest moments of specific color and returns the three biggest blobs or moments. This method assumes that the features are in QR code like configuration

Parameters:
msAll moments of color segmented
Returns:
returns vectors of cv::Point. Ordered in specific way (1. top left, 2. top right, and 3. bottom left)

Definition at line 434 of file vs_action.cpp.

void VisualServoAction::goalCB ( ) [inline]

Definition at line 235 of file vs_action.cpp.

Definition at line 319 of file vs_action.cpp.

void VisualServoAction::printMatrix ( cv::Mat_< double >  in) [inline]

Definition at line 615 of file vs_action.cpp.

Definition at line 596 of file vs_action.cpp.

void VisualServoAction::sensorCallback ( const sensor_msgs::ImageConstPtr &  img_msg,
const sensor_msgs::ImageConstPtr &  depth_msg,
const sensor_msgs::PointCloud2ConstPtr &  cloud_msg 
) [inline]

Called when Kinect information is avaiable. Refresh rate of about 30Hz

Definition at line 248 of file vs_action.cpp.

void VisualServoAction::setTimer ( float  time) [inline]

Definition at line 314 of file vs_action.cpp.

Definition at line 332 of file vs_action.cpp.


Member Data Documentation

std::string VisualServoAction::action_name_ [protected]

Definition at line 628 of file vs_action.cpp.

actionlib::SimpleActionServer<visual_servo::VisualServoAction> VisualServoAction::as_ [protected]

Definition at line 627 of file vs_action.cpp.

sensor_msgs::CameraInfo VisualServoAction::cam_info_ [protected]

Definition at line 644 of file vs_action.cpp.

std::string VisualServoAction::cam_info_topic_ [protected]

Definition at line 660 of file vs_action.cpp.

Definition at line 658 of file vs_action.cpp.

message_filters::Subscriber<sensor_msgs::PointCloud2> VisualServoAction::cloud_sub_ [protected]

Definition at line 641 of file vs_action.cpp.

Definition at line 652 of file vs_action.cpp.

Definition at line 648 of file vs_action.cpp.

Definition at line 650 of file vs_action.cpp.

Definition at line 684 of file vs_action.cpp.

Definition at line 649 of file vs_action.cpp.

Definition at line 653 of file vs_action.cpp.

Definition at line 651 of file vs_action.cpp.

Definition at line 667 of file vs_action.cpp.

Definition at line 668 of file vs_action.cpp.

Definition at line 669 of file vs_action.cpp.

Definition at line 640 of file vs_action.cpp.

Definition at line 659 of file vs_action.cpp.

Definition at line 689 of file vs_action.cpp.

Definition at line 683 of file vs_action.cpp.

Definition at line 654 of file vs_action.cpp.

visual_servo::VisualServoFeedback VisualServoAction::feedback_ [protected]

Definition at line 635 of file vs_action.cpp.

Definition at line 685 of file vs_action.cpp.

PoseStamped VisualServoAction::goal_p_ [protected]

Definition at line 686 of file vs_action.cpp.

Definition at line 693 of file vs_action.cpp.

Definition at line 694 of file vs_action.cpp.

Definition at line 666 of file vs_action.cpp.

Definition at line 665 of file vs_action.cpp.

Definition at line 639 of file vs_action.cpp.

Definition at line 692 of file vs_action.cpp.

Definition at line 643 of file vs_action.cpp.

Definition at line 673 of file vs_action.cpp.

cv::Mat VisualServoAction::K [protected]

Definition at line 690 of file vs_action.cpp.

Definition at line 633 of file vs_action.cpp.

Definition at line 670 of file vs_action.cpp.

Definition at line 626 of file vs_action.cpp.

Definition at line 638 of file vs_action.cpp.

Definition at line 655 of file vs_action.cpp.

std::string VisualServoAction::optical_frame_ [protected]

Definition at line 657 of file vs_action.cpp.

Definition at line 676 of file vs_action.cpp.

Definition at line 675 of file vs_action.cpp.

visual_servo::VisualServoResult VisualServoAction::result_ [protected]

Definition at line 636 of file vs_action.cpp.

Definition at line 642 of file vs_action.cpp.

Definition at line 677 of file vs_action.cpp.

Definition at line 678 of file vs_action.cpp.

Definition at line 679 of file vs_action.cpp.

Definition at line 687 of file vs_action.cpp.

PoseStamped VisualServoAction::tape_features_p_ [protected]

Definition at line 688 of file vs_action.cpp.

Definition at line 664 of file vs_action.cpp.

Definition at line 663 of file vs_action.cpp.

Definition at line 645 of file vs_action.cpp.

Definition at line 632 of file vs_action.cpp.

Definition at line 680 of file vs_action.cpp.

std::vector<pcl::PointXYZ> VisualServoAction::v_fk_diff_ [protected]

Definition at line 691 of file vs_action.cpp.

shared_ptr<VisualServo> VisualServoAction::vs_ [protected]

Definition at line 629 of file vs_action.cpp.

Definition at line 674 of file vs_action.cpp.

std::string VisualServoAction::which_arm_ [protected]

Definition at line 631 of file vs_action.cpp.

std::string VisualServoAction::workspace_frame_ [protected]

Definition at line 656 of file vs_action.cpp.


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


visual_servo
Author(s): Stephan Lee
autogenerated on Wed Nov 27 2013 11:44:03