Question about the penalty of basic grid map

Hi

No, not directly.
But you can take a look at this thread for a workaround: Movement cost in 2D Grid Graph - #25 by aron_granberg