.. _pilot.CostMapData: pilot.CostMapData ================= .. cpp:namespace:: pilot::CostMapData Class ----- A map representing the navigation cost based on the proximity to walls and other obstacles. Inherits from :ref:`pilot.GridMapData`. Fields ------ .. cpp:member:: static const uchar PROHIBITED = 254 .. cpp:member:: static const uchar UNKNOWN = 255 .. cpp:member:: float cost_scale obstacle distance scale [m] ``distance = (1 - (cost / 200)) * cost_scale`` .. cpp:member:: Image8 cost * 0 to 200 = cost * 200 = wall * > 200 = same as occupancy map Methods ------- .. cpp:function:: ImageF32 to_float() const convert to float format (0 to 1) .. cpp:function:: Image8 to_rgba_image(int alpha) const for visualization (with color) .. cpp:function:: Image8 to_rgba_mono_image(int alpha) const for visualization (just grayscale) .. cpp:function:: static Vector4uc to_rgba(int value, int alpha) convert occupancy to RGBA .. cpp:function:: static Vector4uc to_rgba_mono(int value, int alpha) convert occupancy to RGBA mono