velocity_limited_marker.h
Go to the documentation of this file.
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 
00102     void interpolateColor(double velocity, std_msgs::ColorRGBA& color);
00103 
00104 protected:
00105     // Velocity limited markers
00106     visualization_msgs::Marker x_pos_marker_, x_neg_marker_, y_pos_marker_, y_neg_marker_;
00107     visualization_msgs::Marker theta_pos_marker_, theta_neg_marker_;
00108 
00109     // a handle for this node
00110     ros::NodeHandle nh_;
00111 
00112     // Marker publisher
00113     ros::Publisher marker_pub_;
00114 
00115     // Is the marker disabled?
00116     bool disabled_;
00117 
00118     // Robot base frame
00119     std::string base_frame_;
00120 
00121     // Output topic name
00122     std::string topic_name_;
00123 
00124     // Marker lifetime
00125     double lifetime_;
00126 
00127     // Marker z-position
00128     double z_pos_;
00129 
00130     // last velocities
00131     double vx_last_, vy_last_, vtheta_last_;
00132 };
00133 
00134 
00135 }
00136 
00137 #endif // COB_VELOCITY_LIMITED_MARKER_H
00138 


cob_collision_velocity_filter
Author(s): Matthias Gruhler, Michal Spanel (spanel@fit.vutbr.cz, vel. limited marker)
autogenerated on Tue Mar 3 2015 15:11:57