GameElementLayer prototype
This commit is contained in:
39
toid_costmaps/include/toid_costmaps/game_elements_layer.hpp
Normal file
39
toid_costmaps/include/toid_costmaps/game_elements_layer.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "nav2_costmap_2d/costmap_layer.hpp"
|
||||
#include "nav2_costmap_2d/layer.hpp"
|
||||
#include "nav2_costmap_2d/layered_costmap.hpp"
|
||||
#include "rclcpp/rclcpp.hpp"
|
||||
|
||||
namespace toid
|
||||
{
|
||||
|
||||
class GameElementLayer : public nav2_costmap_2d::CostmapLayer
|
||||
{
|
||||
public:
|
||||
GameElementLayer(){
|
||||
costmap_ = NULL;
|
||||
}
|
||||
~GameElementLayer(){}
|
||||
|
||||
virtual void onInitialize();
|
||||
virtual void updateBounds(
|
||||
double robot_x, double robot_y, double robot_yaw, double * min_x, double * min_y,
|
||||
double * max_x, double * max_y);
|
||||
|
||||
virtual void updateCosts(
|
||||
nav2_costmap_2d::Costmap2D & master_grid, int min_i, int min_j, int max_i, int max_j);
|
||||
|
||||
virtual void reset() { return; }
|
||||
|
||||
virtual void onFootprintChanged() {}
|
||||
|
||||
virtual bool isClearable() { return false; }
|
||||
|
||||
private:
|
||||
double last_min_x_, last_min_y_, last_max_x_, last_max_y_;
|
||||
|
||||
bool need_recalculation_;
|
||||
};
|
||||
|
||||
} // namespace toid
|
||||
Reference in New Issue
Block a user