以下大部分內容參考自
ros_by_example_hydro_volume_1.pdf
local costmap 是怎么生成的?跟三維點雲有什么關系?
global costmap在沒有全局地圖下怎么辦?
要實現標題所述功能:
需要配置local costmap和global costmap
在move_base里默認用到的costmap(這一點在論文:ROS Navigation: Concepts and Tutorial 3.6最后一段節有說到,而且說明了怎么配置layered costmap)
是monolithic costmap這個在論文:
Layered Costmaps for Context-Sensitive Navigation中有詳細描述
layered costmap就是一層層不同地圖重疊在一起
在論文:Layered Costmaps for Context-Sensitive Navigation里描述的很詳細,主要是講了layered costmap這么進行更新和每一層都是什么
包括:
其中master layer是aggregate layer where path planning occurs
對於local costmap, 如voxel layer就是其中一層,他可以判斷比如一個桌子,激光會掃到桌子腿,認為可以過去,但是機器人還是會碰到桌子,因為激光掃不到桌面,
這個例子是在講voxel grid論文里看到的:
The Office Marathon:Robust Navigation in an Indoor Office Environment
然后在layered costmap update時就會在master上三維向二維投影出桌面,讓機器人不走這條路徑。
local costmap和global costmap采用地圖方式不一樣
global costmap采用靜態地圖(通過slam產生的),這里只是涉及避障所以可以將靜態地圖設置為空白地圖,將地圖世界坐標/map和定位采用的坐標系tf通過static_transform固定在一起這個可以看
http://www.cnblogs.com/hong2016/p/6831484.html
如果之后要采用靜態地圖再修改
http://www.cnblogs.com/hong2016/p/6831484.html
中講到的llaunch file就好了
<node name=
"map_server"
pkg=
"map_server"
type=
"map_server"
args=
"$(find pioneer_zed)/maps/blank_map.yaml"
/>
下面這段話摘自ros bt example volume1 8.2 Testing move_base in the ArbotiX Simulator 第二段
Finally, since we are using a blank map and our simulated robot has no sensors, the robot cannot use scan data for localization. Instead, we simply set a static identity
transform to tie the robot's odometry frame to the map frame which essentially assumesthat the odometry is perfect.
local costmap不采用靜態地圖而是采用rolling window
http://answers.ros.org/question/10482/navigation-without-map/
you're right - I figured that out, this thread is a bit outdated. As for your question - the normal trend is to use rolling_window: true for local costmap since by definition that map is used for collision checking with the immediate robot.
For the tutorial, only the global costmap uses an a priori map, so the static_map parameter is set to true. The local costmap, however, only uses local sensor information to build an obstacle map, so static_map is set to false.
rolling window是
http://answers.ros.org/question/223880/what-is-rolling-window-used-for/
"Rolling window" means that you do not use the costmap to represent your complete environment, but only to represent your local surroundings (e.g. 5m x 5m around your robot). The costmap will then move along with your robot and will be updated by incoming sensor data.
http://answers.ros.org/question/39858/costmap-static_map/
You have to make sure that you also set the size of the rolling window appropriately:
rolling_window: true width: 15.0 height: 15.0 resolution: 0.05 origin_x: 0.0 origin_y: 0.0
When using a static map, the width and height are determined using the loaded image. In a rolling window, you must manually specify these parameters for your robot. Just know that it places your robot in the center of the rolling window, so the robot can only see things that are height/2
meters away.