Logging the data in a csv file while Path Planning.
Good day,
I have used Dijkstra's algorithm for doing path planning of a single turtlebot3. I now wish to log the data from a costmap2d while the robot moves towards the goal and write it into a csv file. The format for the data should be following a schema in which there is a 3x3 Grid and each grid point is written to be either obstacle or either a robot or either an empty space, followed by the distance to the Goal and the Robot Movement.
How can I do this?