add function getTypeLayer

This commit is contained in:
2025-12-31 10:11:12 +07:00
parent 6c682712fe
commit ae469e3271
11 changed files with 60 additions and 10 deletions

View File

@@ -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);