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 <tf2/convert.h>
61 #include <tf2_eigen/tf2_eigen.h>
64 
65 // costmap & geometry
67 
68 // Eigen library for geometric operation
69 #include <Eigen/Core>
70 #include <Eigen/Geometry>
71 
72 
73 namespace eband_local_planner{
74 
80 
81  public:
82 
83  // typedefs
84  enum Color {blue, red, green};
85 
86 
87  // methods
88 
93 
98 
103 
108  void initialize(ros::NodeHandle& pn, costmap_2d::Costmap2DROS* costmap_ros);
109 
114  void reconfigure(EBandPlannerConfig& config);
115 
122  void publishBand(std::string marker_name_space, std::vector<Bubble> band);
123 
130  void publishBubble(std::string marker_name_space, int marker_id, Bubble bubble);
131 
139  void publishBubble(std::string marker_name_space, int marker_id, Color marker_color, Bubble bubble);
140 
148  void publishForceList(std::string marker_name_space, std::vector<geometry_msgs::WrenchStamped> forces, std::vector<Bubble> band);
149 
156  void publishForce(std::string marker_name_space, int id, Color marker_color, geometry_msgs::WrenchStamped force, Bubble bubble);
157 
158  private:
159 
160  // external objects
162 
163  // Topics & Services
166 
167  // flags
169 
170  // parameters
172 
173 
174  // methods
175 
183  void bubbleToMarker(Bubble bubble, visualization_msgs::Marker& marker, std::string marker_name_space, int marker_id, Color marker_color);
184 
192  void bubbleHeadingToMarker(Bubble bubble, visualization_msgs::Marker& marker, std::string marker_name_space, int marker_id, Color marker_color);
193 
203  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);
204 
205  };
206 };
207 #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 Mon Feb 28 2022 22:16:50