$search
00001 /**************************************************************** 00002 * 00003 * Copyright (c) 2012 Brno University of Technology (BUT) 00004 * 00005 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00006 * 00007 * Project name: care-o-bot 00008 * ROS stack name: cob_navigation 00009 * ROS package name: cob_collision_velocity_filter 00010 * 00011 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 * 00013 * Author: Michal Spanel, email:spanel@fit.vutbr.cz 00014 * 00015 * Date of creation: November 2012 00016 * 00017 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00018 * 00019 * Redistribution and use in source and binary forms, with or without 00020 * modification, are permitted provided that the following conditions are met: 00021 * 00022 * * Redistributions of source code must retain the above copyright 00023 * notice, this list of conditions and the following disclaimer. 00024 * * Redistributions in binary form must reproduce the above copyright 00025 * notice, this list of conditions and the following disclaimer in the 00026 * documentation and/or other materials provided with the distribution. 00027 * * Neither the name of the Fraunhofer Institute for Manufacturing 00028 * Engineering and Automation (IPA) nor the names of its 00029 * contributors may be used to endorse or promote products derived from 00030 * this software without specific prior written permission. 00031 * 00032 * This program is free software: you can redistribute it and/or modify 00033 * it under the terms of the GNU Lesser General Public License LGPL as 00034 * published by the Free Software Foundation, either version 3 of the 00035 * License, or (at your option) any later version. 00036 * 00037 * This program is distributed in the hope that it will be useful, 00038 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00039 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00040 * GNU Lesser General Public License LGPL for more details. 00041 * 00042 * You should have received a copy of the GNU Lesser General Public 00043 * License LGPL along with this program. 00044 * If not, see <http://www.gnu.org/licenses/>. 00045 * 00046 ****************************************************************/ 00047 00048 #pragma once 00049 #ifndef COB_VELOCITY_LIMITED_MARKER_H 00050 #define COB_VELOCITY_LIMITED_MARKER_H 00051 00052 // ROS includes 00053 #include <ros/ros.h> 00054 00055 // ROS message includes 00056 #include <visualization_msgs/Marker.h> 00057 00058 namespace cob_collision_velocity_filter 00059 { 00060 00065 class VelocityLimitedMarker 00066 { 00067 public: 00071 VelocityLimitedMarker(); 00072 00076 ~VelocityLimitedMarker(); 00077 00081 void createDirectionalMarkers(); 00082 00086 void createRotationalMarkers(); 00087 00091 void publishMarkers( double vel_x_desired, 00092 double vel_x_actual, 00093 double vel_y_desired, 00094 double vel_y_actual, 00095 double vel_theta_desired, 00096 double vel_theta_actual); 00097 00098 protected: 00099 // Velocity limited markers 00100 visualization_msgs::Marker x_pos_marker_, x_neg_marker_, y_pos_marker_, y_neg_marker_; 00101 visualization_msgs::Marker theta_pos_marker_, theta_neg_marker_; 00102 00103 // a handle for this node 00104 ros::NodeHandle nh_; 00105 00106 // Marker publisher 00107 ros::Publisher marker_pub_; 00108 00109 // Is the marker disabled? 00110 bool disabled_; 00111 00112 // Robot base frame 00113 std::string base_frame_; 00114 00115 // Output topic name 00116 std::string topic_name_; 00117 00118 // Marker lifetime 00119 double lifetime_; 00120 00121 // Marker z-position 00122 double z_pos_; 00123 00124 // last velocities 00125 double vx_last_, vy_last_, vtheta_last_; 00126 }; 00127 00128 00129 } 00130 00131 #endif // COB_VELOCITY_LIMITED_MARKER_H 00132