Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef UPDATEPUBLISHER_H_
00030 #define UPDATEPUBLISHER_H_
00031
00032 #include <ros/ros.h>
00033 #include <interactive_markers/interactive_marker_server.h>
00034 #include <interactive_markers/menu_handler.h>
00035 #include "topics_list.h"
00036
00037 #define BUFFER_SIZE 5
00038
00039 namespace srs_interaction_primitives
00040 {
00041
00045 enum UpdateType
00046 {
00047 UPDATE_POSE, UPDATE_SCALE, MENU_CLICKED, MOVEMENT_CHANGED, TAG_CHANGED, MOVE_ARM_TO_PREGRASP
00048 };
00049
00055 class UpdatePublisher
00056 {
00057 public:
00062 UpdatePublisher(std::string im_name, int im_type);
00063 UpdatePublisher()
00064 {
00065 }
00066
00070 virtual ~UpdatePublisher()
00071 {
00072 }
00073
00078 std::string getUpdateTopic(int update_type);
00079
00085 void publishScaleChanged(geometry_msgs::Vector3 new_scale, geometry_msgs::Vector3 scale_change);
00086
00093 void publishPoseChanged(geometry_msgs::Pose new_pose, geometry_msgs::Pose pose_change);
00100 void publishMenuClicked(std::string title, interactive_markers::MenuHandler::CheckState state);
00101
00109 void publishMovementChanged(geometry_msgs::Quaternion new_direction, geometry_msgs::Quaternion direction_change,
00110 float new_velocity, float velocity_change);
00111
00116 void publishTagChanged(std::string new_tag);
00117
00122 void publishMoveArmToPreGrasp(int pos_id);
00123
00124 private:
00125
00126 std::string im_name_;
00127
00128 int im_type_;
00129
00130 ros::NodeHandle nh_;
00131
00132 ros::Publisher scaleChangedPublisher_, poseChangedPublisher_, menuClickedPublisher_, movementChangedPublisher_,
00133 tagChangedPublisher_, moveArmToPreGraspPublisher_;
00134
00135 };
00136
00137 }
00138
00139 #endif