0
$\begingroup$

Rosanswers logo

Hello everyone. I want to create a map, let say of a rectangle shaped room/area. I am using a turtlebot 3 but without laser sensor. Is it possible to create a map without any laser sensor or let say i give coordinate range of my area which will represent a border line of a map? Or is there any custom maps which can acquire and modify it's dimensions according to my usability?


Originally posted by enthusiast.australia on ROS Answers with karma: 91 on 2019-08-12

Post score: 0


Original comments

Comment by PG_GrantDare on 2019-08-12:
To generate an actual map you will need some sensor to sense the environment. Answer by @billy describes how you can trick it by drawing your own map. This approach however assumes that you accurately describe the operating environment. If you choose to use this for navigation, you cannot avoid actual obstacles as it will assume your map is accurate.

Comment by enthusiast.australia on 2019-08-13:
Yes, i want to use it for navigation. In the map, can I also include actual static obstacles? For example, i make a map of square shape area of 4 meter square, is it possible to include static obstacle, let say a square shape area of 0.2 meter square, and then use this map for navigation.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As per @billy s answer you can use map_server to load an existing map to your environment. To do this, assuming you know the details of the environment you are trying to describe, you can use an image editor to draw and represent the Occupancy Grid Map (OGM). To accompany this you will require a .yaml file that defines parameters about how map_server loads your map and interprets it. The YAML file is as so:

image: testmap.png
resolution: 0.1
origin: [0.0, 0.0, 0.0]
occupied_thresh: 0.65
free_thresh: 0.196
negate: 0

in order, define:

  • The location of the image
  • The resolution meters/pixels (This is based on how you choose to draw the image)
  • 0,0,0 (origin) of your map (set this number to where ever your robot will consistently start in your drawn map) (or you could initialize your robots pose at a point other than map origin)
  • The % that occupied is defined as (leave this default if your map is black and white)
  • The % that free is defined as (leave this default if your map is black and white)
  • Leave this default as if true inverts occupied and free

The restriction of not having environmental sensory data will affect navigation in that you won't have dynamic avoidance. You are restricted to what ever map you draw. Ensure you represent your environment accurately or you might collide with obstacles and ensure you have not added obstacles.

Using a global planner your path will be generated to navigate the environment you have specified in your OGM. The local control is where sensory data is usually important. If you use a blank costmap then a local planner will control a local path to achieve the global plan without dynamic avoidance. Without dynamic information of obstacles, the navigation will assume there are no obstacles and will control the robot to achieve the global plan which has already accounted for the static obstacles you have defined in your OGM.

I can understand that a LIDAR might be expensive however I have personally chosen to use an Xbox Kinect as it is rather cheap and can sense a 3D environment. You do not have to use 3D environments if you choose this path and can squash everything to 2D.

Please consider choosing an answer :)


Originally posted by PapaG with karma: 161 on 2019-08-15

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.