map

map

/map

消息类型

rostopic type /map_metadata 
nav_msgs/MapMetaData

rostopic type /map
nav_msgs/OccupancyGrid

/map

rosmsg show nav_msgs/OccupancyGrid 
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
nav_msgs/MapMetaData info
  time map_load_time
  float32 resolution
  uint32 width
  uint32 height
  geometry_msgs/Pose origin
    geometry_msgs/Point position
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion orientation
      float64 x
      float64 y
      float64 z
      float64 w
int8[] data

/map_metadata

 rosmsg show nav_msgs/MapMetaData 
WARNING: Package name "LaserUndistortion" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
time map_load_time
float32 resolution
uint32 width
uint32 height
geometry_msgs/Pose origin
  geometry_msgs/Point position
    float64 x
    float64 y
    float64 z
  geometry_msgs/Quaternion orientation
    float64 x
    float64 y
    float64 z
    float64 w

map.yaml

image: testmap.png  # 名字非常重要,这就是为什么要加载yaml,而不是pgm

resolution: 0.1     #meter per pixel
origin: [0.0, 0.0, 0.0] #left down corner pos in map frame, just a translate
occupied_thresh: 0.65   #占用概率最小值
free_thresh: 0.196      #不被占用概率最大值
negate: 0               #黑白语义反转,没用,一般为0

shangetu vs data[]

robot-coordinates-in-map
-----
在这里插入图片描述
test
在这里插入图片描述

pixel value vs cost

常规pgm 使用灰度图像;0: black; 255: white
占用概率计算: occ = (255 - pixel_value)/ 255
值域范围【0,100】
occ > occupied_thresh -> 占用
occ < fresh_thresh -> 不占用

map_server 初始化地图后,只有3个值Trinary

占用100
不占用0
unknow-1

staic_map 生成costmap

在这里插入图片描述

等级cost意义
lethal254碰撞,基于碰撞和内切为肯定碰撞区间
inscribed253内切值,基于内切-外切区间为可能碰撞区
circumscriber128外切值,基于外切区间为非碰撞区
lowest non-free cost11-127, 虽然认为非碰撞区间,但是cost代表了一定的可能性,距离障碍物越远,值越小
freespace00, 代表完整意义上free, 距离外切圆一个膨胀半径后,cost=0
unknown-1未知区域,默认-1

对于膨胀层,有几个参数很重要

参数含义
robot_radius关系到内切半径和外切半径
footpring同上,alternative parameters
cost_scaling_factor关系到内切到膨胀半径的decay
inflation_radius同上
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值