add function computeCost file layer.h

This commit is contained in:
2026-07-10 11:27:20 +07:00
parent 2fcd211ccf
commit a2a021c114
10 changed files with 1355 additions and 26 deletions

View File

@@ -96,8 +96,9 @@ public:
/** @brief Given a distance, compute a cost.
* @param distance The distance from an obstacle in cells
* @return A cost value for the distance */
virtual inline unsigned char computeCost(double distance) const
virtual unsigned char computeCost(double distance) const override
{
// robot::log_warning("InflationLayer::computeCost() is deprecated. Please use costLookup() instead.");
unsigned char cost = 0;
if (distance == 0)
cost = LETHAL_OBSTACLE;