collision_check_grid_map_plugin.h
Go to the documentation of this file.
1 //=================================================================================================
2 // Copyright (c) 2017, Alexander Stumpf, TU Darmstadt
3 // Based on http://wiki.ros.org/footstep_planner by Johannes Garimort and Armin Hornung
4 // All rights reserved.
5 
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of the Simulation, Systems Optimization and Robotics
14 // group, TU Darmstadt nor the names of its contributors may be used to
15 // endorse or promote products derived from this software without
16 // specific prior written permission.
17 
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
22 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 //=================================================================================================
29 
30 #ifndef VIGIR_FOOTSTEP_PLANNING_PLUGINS_COLLISION_CHECK_GRID_MAP_PLUGIN_H__
31 #define VIGIR_FOOTSTEP_PLANNING_PLUGINS_COLLISION_CHECK_GRID_MAP_PLUGIN_H__
32 
33 #include <ros/ros.h>
34 
35 #include <boost/thread/shared_mutex.hpp>
36 
37 #include <nav_msgs/OccupancyGrid.h>
38 
40 
42 
43 
44 
46 {
48  : public CollisionCheckPlugin
49 {
50 public:
51  CollisionCheckGridMapPlugin(const std::string& name = "collision_check_grid_map_plugin");
52 
53  bool initialize(const vigir_generic_params::ParameterSet& params = vigir_generic_params::ParameterSet()) override;
54 
55  void reset() override;
56 
57  bool isCollisionCheckAvailable() const override;
58 
59  bool isAccessible(const State& s) const override;
60  bool isAccessible(const State& next, const State& current) const override;
61 
62  void setOccupancyThreshold(unsigned char thresh);
63 
64 protected:
65  virtual void mapCallback(const nav_msgs::OccupancyGridConstPtr& occupancy_grid_map);
66 
67  // subscribers
69 
70  // mutex
71  mutable boost::shared_mutex grid_map_shared_mutex_;
72 
73  // pointer to last received grid map
74  nav_msgs::OccupancyGridConstPtr occupancy_grid_map_;
75 
76  // occupancy threshold
77  int8_t occ_thresh_;
78 };
79 }
80 
81 #endif
XmlRpcServer s
CollisionCheckGridMapPlugin(const std::string &name="collision_check_grid_map_plugin")
bool initialize(const vigir_generic_params::ParameterSet &params=vigir_generic_params::ParameterSet()) override
virtual void mapCallback(const nav_msgs::OccupancyGridConstPtr &occupancy_grid_map)
void reset() override
Resets the plugin to initial state.


vigir_footstep_planning_plugins
Author(s): Alexander Stumpf
autogenerated on Mon Jun 10 2019 15:47:39