olzforum.blogg.se

Bedroom map grid
Bedroom map grid





bedroom map grid

Then you can easily get the distance to the robot's position on the map.*This post contains some affiliate links, which means that if you click a link and make a purchase, we may receive a small commission at no cost to you. You need to put both things on the same reference frame, you can extract the position of a given pixel on the /map reference using a simple computation, an example can be void mapToWorld(unsigned int map_x, unsigned int map_y, double& pos_x, double& pos_y, nav_msgs::OccupancyGrid map) Not really, it only affects the position of the robot on the map

bedroom map grid

No, it depends on the map, moreover, it can be changed on the. Although this is by no means a rule, it depends on a variety of things. yaml file, its value depends on how it's created, but it usually when using gmapping it is given by the width and height of the map and its resolution, so as to try to put the 0,0 position at the center of the map. Thanks!Īs per following images, map origin isn't same, and not necessarily at the top left. But if someone experienced can answer these questions, it would be a great help.Īlso, if you think this isn't a good approach, and have a better approach, please teach me, or let me know. I'm using the default 0.05 resolution, therefore each pixel should be 5 cm.Īccording to my observations, the map origin depends on the start pose of the robot while the mapping process. That way I'd know the vector joining the pixel and the base_footprint, and can drive to the point if I want to. I'd thought of identifying the pixel, then knowing its location with respect to map, and map's origin with respect to base_footprint. I am not able to understand where does the map set its origin?ĭoes the robot's start, end pose or trajectory during the gmapping affect the map origin?Īlso, if the map isn't at the top left corner, then how can I compute the distance between that pixel and my robot? Now, I need to know where these are in relation to the bot.

bedroom map grid

I'll receive the pixels with corners and wall. I'll be feeding the map.pgm file to do the same. To find the corners and walls, I'm writing my own python script, using OpenCV functions like Harris Corner detection and Contours, and Canny. I've saved the map I generated using gmapping. I've made a very simple rectangular room of about 3.0 x 2.4 meter square. I've been playing around with turtlebot simulation. I'm developing a navigation algorithm, for which I need to find out corners and walls present in the room.







Bedroom map grid