ROS map of environment?
Hello I am new to ROS
I found c++ code for different robotic path planning algorithms: A*, Dijkstra,….
https://github.com/vss2sn/path_planning
I am trying to improve the code to have GUI and also to use it in ROS
The map in this project is 2d vector of vector of integers, which has the same index notation for arrays(the yellow part in the image link below).
in the file utils.cpp, in function GetMotion(), which gets the neighbors of any cell.
For example, based on the calculations done in operator+(Node p) function:
For the point (1,1) in the yellow part The down neighbor is (1,2)
The up neighbor is (1,0)
The left neighbor is (0,1)
The right neighbor is (2,1)
BUT, I think the down and up must be swapped to be consistent with left and right, so down becomes (1,0) and up becomes (1,2)
I am right?
NOTE: The pink part is the representation of any digital image. In ROS, maps are digital images.
My questions:
(1) If I take the c++ code and apply it in ROS. How could I deal with the map.
In ROS, I have to specify the :
origin : The 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation (yaw=0 means no rotation). Many parts of the system currently ignore yaw.
So In ROS:
The origin will be : (4,0) as in the vector of vector of int, OR (0,4) as in the digital image ?
(2) Will the c++ code change if I use it in ROS?
I mean (1,2) in c++ code (yellow part) differs from (1,2) in ROS digital image representation
Thanks a lot in advance,