Semantic model with static navigation map
Foreword
- Background model is a semantic map, but ROS-NAV need a grid map, so I want to change my ways
- Also needs to be done in line with P3AT comes with a map format ArMap map
- Re-set the cost of ROS-Nav global map configuration
reference
ros-mapserver
ArMap Map file format
Resize the static map
setup map yaml file
Aria Docs: Maps
ArMap file formats
Learning Content
ROS-MapServer
Map Format
- Multiple file jointly decided map data, the map YAML file metadata describing meta-data, graphics files with the same name YAML files, graphics files describing raster data
Image Format
- General grayscale image to create a map, a fatal obstacle to pure black and pure white for freedom control, intermediate gray value uncertain, but may be determined by a threshold value if it is recognized as an obstacle, the threshold value processing by the internal MapServer deal with
- Determining whether the pixel gray scale higher risk probability using the following formula: occ = (255 - color_avg) / 255.0, where color_avg is the 8-bit value that results from averaging over all channels
- The image is read by SDL_Image library, the library supported file is supported map image data including bmp, git, jpg, png, tif, etc.
yaml format
- yaml some technical parameters
image: testmap.png
# 使用相对或绝对路径
resolution: 0.1
# 分辨率 0.1m/pixel
origin: [0.0, 0.0, 0.0]
# 图像的左下角(边界)在地图中的坐标
occupied_thresh: 0.65
# 判断像素格是否为障碍的阈值
free_thresh: 0.196
# 判断是否为自由空间的阈值
negate: 0
# 一般情况下,黑色为障碍物,白色为自由空间
width: 20 # m Don't forget to create a file with 2000 pixel width
height: 20 # m Don't forget to create a file with 2000 pixel height
global_costmap.yaml
global_costmap:
global_frame: /map
robot_base_frame: /base_link
update_frequency: 3.0
publish_frequency: 0.0 # For a static global map, there is generally no need to continually publish it
static_map: true # This parameter and the next are always set to opposite values. The global map is usually static so we set static_map to true
rolling_window: false # The global map is generally not updated as the robot moves to we set this parameter to false
resolution: 0.01
transform_tolerance: 1.0
map_type: costmap
width: 20 # m Don't forget to create a file with 2000 pixel width
height: 20 # m Don't forget to create a file with 2000 pixel width
Command Line
rosrun map_server map_server mymap.yaml
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="/tmp/my_map_waalre.yaml" />
Arnap
format
- Because the temporary expect no semantic model into ArMap, so here is omitted
Use Mapper3 modify the map
- 添加forbidden line, forbidden area, home point, home area
ROS-Map generation
new map
- CAD display, the whole environment is 148876mmX117600mm, namely 148.876mX117.6m
- 则width=148.876; height=117.600
- Suggested amendments is an integer:
- Setting resolution = 0.05m / pixel
- 2977.52: 2352
- Picture pixels 2978: 2352
- Fixed dimensions: width: 148.9; height: 117.6
The new chart resolution increases
- Setting resolution = 0.1m / pixel
- 1488.76: 1176
- Pixels: 1489: 1176
Sim old map
- 1417.4cmX1187.9cm; 141.74mX118.79m
- width=141.74; height=118.79
- Repair is an integer:
- Setting resolution = 0.05m / pixel
- 2834.8: 2375.8
- Picture pixels 2835: 2376
- Revised dimensions: width: 141.75 height: 118.8
Old map yaml
image: 4F-sim.png
resolution: 0.050000
origin: [0, 0, 0]
negate: 0
occupied_thresh: 0.65 # 无关紧要
free_thresh: 0.196 # # 无关紧要
width: 141.75
height: 118.8
PS Retouching
- LV semantic map drawn low pixel, with PS amplified to the specified resolution
- Toolbar - image - the image size - the specified pixel - Resample Image: Bicubic smoother (applicable to expand)
Note: Windows Paint program that comes with, you can modify the image resolution, but did not enlarge the existing pixel graphics, but simply extends the boundaries of the picture, making the graphics peripheral pixels are all white
Reconfigure ROS
global costmap
tf and message design
- In order to facilitate control map-> odom relationship, i.e. a global positioning robot, or decide not to use fake amcl AMCL
- If you are using amcl or fake amcl, you need to ROSARIA be modified to add move_to interface.
- Use amcl does not make sense to draw a map of semantics, because it is too simple geometric elements, using the registration algorithm still a problem, SLAM algorithm to generate the map is much better compared to the details contained in the laser sensor are generated.
- ARIA finally decided to amend the publisher, the original zs_worldframe into / map.
- Later I thought, if the change / map, then, proxy there are a lot of things about the coordinate system also needs to be changed, it should do so, the topic name changed mapserver sent directly into zsworld_frame. Solve OK!
- Take a look at fake_amcl be convenient positioning in RViz, the temporarily tf between zs_worldframe and odom to disabled, if the location is not convenient then to major changes in the code.