Turtlebot 2e 导航之 move_base
参数详解: 社会活动导航层social_navigation_layers
初探
文章目录
Wiki: http://wiki.ros.org/social_navigation_layers
github: https://github.com/DLu/navigation_layers
Wiki介绍:
social_navigation_layers
是用于导航功能包的基于插件实现的cost map,代码实现过程中考虑了人类各种社交活动的约束,例如空间距离约束(proxemic distance)。
社会活动导航层(Social Navigation Layers)
目前存在两种以考虑人类社会活动为对象的导航代价层。虽然名字不同,但它们却拥有共同的功能:共同订阅人在何处的消息,用高斯分布调节人群周围的通行代价。两者皆从SocialLayer
类继承而来。
可在costmap的配置中用下列类型指定Social Navigation Layers的类型。
- social_navigation_layers::ProxemicLayer
- social_navigation_layers::PassingLayer
ProxemicLayer/PassingLayer
两层的接口一致,介绍如下。
订阅的topic
/people (people_msgs/People)
表示机器人周围的人
参数
enabled
(bool, default: True)
是否启用该层cutoff
(double, default: 10.0)
调节代价地图时发布行人位置的最小值amplitude
(double, default: 77.0)
峰值调整幅度covariance
(double, default: 0.25)
调整方差factor
(double, default: 5.0)
用于缩放速度的因子keep_time
(double, default: 0.75)
清除行人足迹前的暂停时间
代价图会发生什么变化
Proxemic 层
Proxemic层使用上面定义的参数在检测到的人附近增加一个高斯状的通行代价。如果行人静止,则高斯分布将是完美的帽子形。但若行人在移动,则代价值将沿行人行走的方向增加。行人前面的代价值增加的幅度与定义的缩放因子成正比。
当行人静止时:
当行人走动时:
(注意到行人前面的部分其代价值发生了变化!)
Passing 层
该层旨在使机器人始终在人的左侧通过,因此仅在行人的一侧增大其通行成本。
social_navigation_layers
的启用
启用很方便,仅需要下载github的代码到src
目录,然后catkin_make
后:
- 修改
global_costmap_params.yaml
:
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: social_layer, type: "social_navigation_layers::ProxemicLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
# - {name: voxel_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
注意:
obstacle_layer
设置为costmap_2d::ObstacleLayer
将不利于调试- 这里启用的是
ProxemicLayer
, 类似也可启用PassingLayer
- 修改
local_costmap_params.yaml
, 启用行人检测插件。
plugins:
- {name: social_layer, type: "social_navigation_layers::ProxemicLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
参数设置
在costmap_common_params.yaml
增加social_layer
的参数:
social_layer:
enabled: true
cutoff: 10.0 # double, default: 10.0 - Smallest value to publish on costmap adjustments
amplitude: 77.0 # double, default: 77.0 - Amplitude of adjustments at peak
covariance: 0.25 # double, default: 0.25 - Covariance of adjustments
factor: 5.0 # double, default: 5.0 - Factor with which to scale the velocity
keep_time: 0.75 # double, default: 0.75
根据David V. Lu的讨论(https://github.com/DLu/navigation_layers/issues/34),能否成功检测出人的关键参数主要有:
cutoff
: 126.0amplitude
: 254covariance
: 1.35factor
: 5.0
这些参数的数值需要根据采用的雷达数据进行调节。参数意义见上面介绍。
其他资源
- 使用基于HMM结合Bayesian Human motion Intentionalitiy prediction( BHMIP)预测行人位置的功能包:
- github: https://github.com/akhil22/intention_modelling
- paper: http://www.sciencedirect.com/science/article/pii/S0167865513003176
-
编写自己的cost map layer:
请参考: http://wiki.ros.org/costmap_2d/Tutorials/Creating a New Layer -
ROS导航:向cost-map中添加超声波障碍图层
https://blog.csdn.net/qq_25241325/article/details/83824504