Error generating map in jetbot

Hi, I am working with Jetbot ROS Ai Kit. (
I am running ROS2 Humble on Jetson nano on docker which has ubuntu 20.04.

I am trying to run slam_toolbox on ros2 humble and jetbot, but I am getting distorted map.
This is one of the map that I tried to generate.
Note:- I have converted jetbot.cpp code from ros to ros2 by my self.
Can anybody please help.