velocity_limited_marker.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #pragma once
00019 #ifndef COB_VELOCITY_LIMITED_MARKER_H
00020 #define COB_VELOCITY_LIMITED_MARKER_H
00021 
00022 // ROS includes
00023 #include <ros/ros.h>
00024 
00025 // ROS message includes
00026 #include <visualization_msgs/Marker.h>
00027 
00028 namespace cob_collision_velocity_filter
00029 {
00030 
00035 class VelocityLimitedMarker
00036 {
00037 public:
00041     VelocityLimitedMarker();
00042 
00046     ~VelocityLimitedMarker();
00047 
00051     void createDirectionalMarkers();
00052 
00056     void createRotationalMarkers();
00057 
00061     void publishMarkers( double vel_x_desired,
00062                     double vel_x_actual,
00063                     double vel_y_desired,
00064                     double vel_y_actual,
00065                     double vel_theta_desired,
00066                     double vel_theta_actual);
00067 
00072     void interpolateColor(double velocity, std_msgs::ColorRGBA& color);
00073 
00074 protected:
00075     // Velocity limited markers
00076     visualization_msgs::Marker x_pos_marker_, x_neg_marker_, y_pos_marker_, y_neg_marker_;
00077     visualization_msgs::Marker theta_pos_marker_, theta_neg_marker_;
00078 
00079     // a handle for this node
00080     ros::NodeHandle nh_;
00081 
00082     // Marker publisher
00083     ros::Publisher marker_pub_;
00084 
00085     // Is the marker disabled?
00086     bool disabled_;
00087 
00088     // Robot base frame
00089     std::string base_frame_;
00090 
00091     // Output topic name
00092     std::string topic_name_;
00093 
00094     // Marker lifetime
00095     double lifetime_;
00096 
00097     // Marker z-position
00098     double z_pos_;
00099 
00100     // last velocities
00101     double vx_last_, vy_last_, vtheta_last_;
00102 };
00103 
00104 
00105 }
00106 
00107 #endif // COB_VELOCITY_LIMITED_MARKER_H
00108 


cob_collision_velocity_filter
Author(s): Matthias Gruhler, Michal Spanel
autogenerated on Thu Jun 6 2019 21:19:04