add function getTypeLayer
This commit is contained in:
@@ -45,6 +45,21 @@
|
||||
#include <robot/node_handle.h>
|
||||
namespace robot_costmap_2d
|
||||
{
|
||||
enum class LayerType
|
||||
{
|
||||
UNKNOWN,
|
||||
STATIC_LAYER,
|
||||
OBSTACLE_LAYER,
|
||||
INFLATION_LAYER,
|
||||
CRITICAL_LAYER,
|
||||
DIRECTIONAL_LAYER,
|
||||
PREFERRED_LAYER,
|
||||
UNPREFERRED_LAYER,
|
||||
VOXEL_LAYER
|
||||
};
|
||||
|
||||
|
||||
|
||||
class LayeredCostmap;
|
||||
|
||||
class Layer
|
||||
@@ -79,7 +94,7 @@ public:
|
||||
|
||||
virtual void reset() {}
|
||||
|
||||
virtual ~Layer() {}
|
||||
virtual ~Layer() = default;
|
||||
|
||||
/**
|
||||
* @brief Check to make sure all the data in the layer is up to date.
|
||||
@@ -130,6 +145,8 @@ public:
|
||||
* notified of changes to the robot's footprint. */
|
||||
virtual void onFootprintChanged() {}
|
||||
|
||||
virtual LayerType getType() const { return LayerType::UNKNOWN; }
|
||||
|
||||
template<typename T>
|
||||
void dataCallBack(const T& value, const std::string& topic) {
|
||||
handle(value, topic);
|
||||
|
||||
Reference in New Issue
Block a user