add function computeCost file layer.h
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user