update_publisher.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * \file
00003  *
00004  * $Id: UpdatePublisher.h 676 2012-04-19 18:32:07Z xlokaj03 $
00005  *
00006  * Copyright (C) Brno University of Technology
00007  *
00008  * This file is part of software developed by Robo@FIT group.
00009  *
00010  * Author: Tomas Lokaj (xlokaj03@stud.fit.vutbr.cz)
00011  * Supervised by: Michal Spanel (spanel@fit.vutbr.cz)
00012  * Date: 21/02/2012
00013  * 
00014  * This file is free software: you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License as published by
00016  * the Free Software Foundation, either version 3 of the License, or
00017  * (at your option) any later version.
00018  * 
00019  * This file is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU Lesser General Public License for more details.
00023  * 
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this file.  If not, see <http://www.gnu.org/licenses/>.
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   // Interactive Marker name
00126   std::string im_name_;
00127   // Interactive Marker type
00128   int im_type_;
00129   // Node handler
00130   ros::NodeHandle nh_;
00131   // Publishers
00132   ros::Publisher scaleChangedPublisher_, poseChangedPublisher_, menuClickedPublisher_, movementChangedPublisher_,
00133                  tagChangedPublisher_, moveArmToPreGraspPublisher_;
00134 
00135 };
00136 
00137 }
00138 
00139 #endif /* UPDATEPUBLISHER_H_ */


srs_interaction_primitives
Author(s): Tomas Lokaj, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:47:47