confusion over map frame and base_footprint frame
from the /map
topic, I can calculate pixel location as well as pose(from pixel location), is the pose(x,y) in the map frame?
if so,In my algorithm, I use map.data
to create a quadtree, where the quadtree contains the pixel locations(x,y) of every cell from map.data
. I use this quadtree to easily access all the pixel locations around my robot's location at any given time.
for example:
def collect_poses_around_robot(xpose,ypose):
where (xpose,ypose) is the robot's pose position
convert (x,y) from pose to pixel location
use pixel location and quadtree to get pixel locations around robot's position
I have to use the robot's location in the base_footprint frame
for the function above to have my algorithm work correctly, which doesn't make sense. When I transform my robot's pose from base_footprint frame
to map frame
and use that as input for the function above, the algorithm believe's the robot to be in a completely different place from where it actually is in the map.
I hope my confusion make's sense? If my quadtree contains pixel locations in the map frame, wouldn't I have to use my robot's location in the map frame to carry out calculations with said quadtree?