00001 /* 00002 * Copyright 2018, Sebastian Pütz 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 00011 * 2. Redistributions in binary form must reproduce the above 00012 * copyright notice, this list of conditions and the following 00013 * disclaimer in the documentation and/or other materials provided 00014 * with the distribution. 00015 * 00016 * 3. Neither the name of the copyright holder nor the names of its 00017 * contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00021 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00022 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00023 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00024 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00025 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00026 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00028 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00029 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00030 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00031 * POSSIBILITY OF SUCH DAMAGE. 00032 * 00033 * mbf_costmap_core.h 00034 * 00035 * author: Sebastian Pütz <spuetz@uni-osnabrueck.de> 00036 * 00037 */ 00038 00039 #ifndef MBF_COSTMAP_CORE__COSTMAP_CONTROLLER_H_ 00040 #define MBF_COSTMAP_CORE__COSTMAP_CONTROLLER_H_ 00041 00042 #include <mbf_abstract_core/abstract_controller.h> 00043 #include <costmap_2d/costmap_2d_ros.h> 00044 #include <mbf_utility/types.h> 00045 00046 namespace mbf_costmap_core { 00053 class CostmapController : public mbf_abstract_core::AbstractController{ 00054 public: 00055 00056 typedef boost::shared_ptr< ::mbf_costmap_core::CostmapController > Ptr; 00057 00085 virtual uint32_t computeVelocityCommands(const geometry_msgs::PoseStamped& pose, 00086 const geometry_msgs::TwistStamped& velocity, 00087 geometry_msgs::TwistStamped &cmd_vel, 00088 std::string &message) = 0; 00089 00097 virtual bool isGoalReached(double xy_tolerance, double yaw_tolerance) = 0; 00098 00104 virtual bool setPlan(const std::vector<geometry_msgs::PoseStamped> &plan) = 0; 00105 00111 virtual bool cancel() = 0; 00112 00119 virtual void initialize(std::string name, TF *tf, costmap_2d::Costmap2DROS *costmap_ros) = 0; 00120 00124 virtual ~CostmapController(){} 00125 00126 protected: 00127 CostmapController(){} 00128 00129 }; 00130 } /* namespace mbf_costmap_core */ 00131 00132 #endif /* MBF_COSTMAP_CORE__COSTMAP_CONTROLLER_H_ */