eband_visualization.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2010, Willow Garage, Inc.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Willow Garage, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *
35  * Author: Christian Connette
36  *********************************************************************/
37 
38 #ifndef EBAND_VISUALIZATION_H_
39 #define EBAND_VISUALIZATION_H_
40 
41 
42 #include <ros/ros.h>
43 
44 // classes wich are part of this pkg
46 #include <eband_local_planner/EBandPlannerConfig.h>
47 
48 // msgs
49 #include <geometry_msgs/Pose2D.h>
50 #include <geometry_msgs/Pose.h>
51 #include <geometry_msgs/PoseStamped.h>
52 #include <geometry_msgs/Wrench.h>
53 #include <geometry_msgs/WrenchStamped.h>
54 
55 #include <visualization_msgs/Marker.h>
56 #include <visualization_msgs/MarkerArray.h>
57 
58 // transforms
59 #include <angles/angles.h>
60 #include <tf/tf.h>
62 
63 // costmap & geometry
65 
66 // Eigen library for geometric operation
67 #include <Eigen/Core>
68 #include <Eigen/Geometry>
69 
70 
71 namespace eband_local_planner{
72 
78 
79  public:
80 
81  // typedefs
82  enum Color {blue, red, green};
83 
84 
85  // methods
86 
91 
96 
101 
106  void initialize(ros::NodeHandle& pn, costmap_2d::Costmap2DROS* costmap_ros);
107 
112  void reconfigure(EBandPlannerConfig& config);
113 
120  void publishBand(std::string marker_name_space, std::vector<Bubble> band);
121 
128  void publishBubble(std::string marker_name_space, int marker_id, Bubble bubble);
129 
137  void publishBubble(std::string marker_name_space, int marker_id, Color marker_color, Bubble bubble);
138 
146  void publishForceList(std::string marker_name_space, std::vector<geometry_msgs::WrenchStamped> forces, std::vector<Bubble> band);
147 
154  void publishForce(std::string marker_name_space, int id, Color marker_color, geometry_msgs::WrenchStamped force, Bubble bubble);
155 
156  private:
157 
158  // external objects
160 
161  // Topics & Services
164 
165  // flags
167 
168  // parameters
170 
171 
172  // methods
173 
181  void bubbleToMarker(Bubble bubble, visualization_msgs::Marker& marker, std::string marker_name_space, int marker_id, Color marker_color);
182 
190  void bubbleHeadingToMarker(Bubble bubble, visualization_msgs::Marker& marker, std::string marker_name_space, int marker_id, Color marker_color);
191 
201  void forceToMarker(geometry_msgs::WrenchStamped wrench, geometry_msgs::Pose wrench_origin, visualization_msgs::Marker& marker, std::string marker_name_space, int marker_id, Color marker_color);
202 
203  };
204 };
205 #endif
void reconfigure(EBandPlannerConfig &config)
Reconfigures the parameters of the planner.
void bubbleHeadingToMarker(Bubble bubble, visualization_msgs::Marker &marker, std::string marker_name_space, int marker_id, Color marker_color)
converts the haeding of a bubble into a Arrow-Marker msg - this is visualization-specific ...
void publishBubble(std::string marker_name_space, int marker_id, Bubble bubble)
publishes a single bubble as a Marker
void bubbleToMarker(Bubble bubble, visualization_msgs::Marker &marker, std::string marker_name_space, int marker_id, Color marker_color)
converts a bubble into a Marker msg - this is visualization-specific
void publishBand(std::string marker_name_space, std::vector< Bubble > band)
publishes the bubbles (Position and Expansion) in a band as Marker-Array
ros::Publisher one_bubble_pub_
publishes markers to visualize bubbles of elastic band ("modified global plan")
costmap_2d::Costmap2DROS * costmap_ros_
pointer to costmap - needed to retrieve information about robot geometry
void publishForceList(std::string marker_name_space, std::vector< geometry_msgs::WrenchStamped > forces, std::vector< Bubble > band)
publishes the list of forces along the band as Marker-Array
void initialize(ros::NodeHandle &pn, costmap_2d::Costmap2DROS *costmap_ros)
Initializes the visualization class.
void forceToMarker(geometry_msgs::WrenchStamped wrench, geometry_msgs::Pose wrench_origin, visualization_msgs::Marker &marker, std::string marker_name_space, int marker_id, Color marker_color)
converts a wrench into a Marker msg - this is visualization-specific
ros::Publisher bubble_pub_
publishes markers to visualize bubbles of elastic band ("modified global plan")
void publishForce(std::string marker_name_space, int id, Color marker_color, geometry_msgs::WrenchStamped force, Bubble bubble)
publishes a single force as a Marker


eband_local_planner
Author(s): Christian Connette, Bhaskara Marthi, Piyush Khandelwal
autogenerated on Sat Feb 22 2020 04:03:28