turtlebot3-burger_150.png
turtlebot3-waffle-pi_150.png
turtlebot3-arm_150.png
walking-y2_150.png
turbot3-multi_150.png
turbot3-dl-ros1_150.png
turbot3-ai.png
turbot3-dl-ros2_150.png
turbot3-slam_150.png
turbot3-arm_150.png
turtlebot4-lite_150.png
turtlebot4-pro_150.png
turbot4-dl_150.png
turbot4-ai_150.png
aidriving-racebot_150.png
aidriving-autodrive_150.png
turtlebot-arm_150.png
openmanipulator-x_150.png
Home » ROS与navigation教程 » ROS与navigation教程-Configuring Layered Costmaps

ROS与navigation教程-Configuring Layered Costmaps

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号

ROS与navigation教程-Configuring Layered Costmaps

说明:

  • 本教程旨在指导您在代价地图中创建自定义的一组图层。

  • This will be accomplished using the costmap_2d_node executable, although the parameters can be ported into move_base.

Step 1: Transforms

  • One basic thing that the costmap requires is a transformation from the frame of the costmap to the frame of the robot. For this purpose, one solution is to create a static transform publisher in a launch file.
<node name="static_tf0" pkg="tf" type="static_transform_publisher" args="2 0 0 0 0 0 /map /base_link 100"/>

Step 2: Basic Parameters

  • 接下来,需要指定costmap的行为。

  • 创建一个将被加载到参数空间中的minimal.yaml文件。

plugins: []
publish_frequency: 1.0
footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]]
  • We start out with no layers for simplicity.

  • 为了方便进行调试,publish_frequency为1.0Hz,我们指定了一个简单的脚本,因为costmap需要定义一些footprint。

  • 这些参数可以通过配置以下启动文件来加载

<rosparam file="$(find simple_costmap_configuration)/params/minimal.yaml" command="load" ns="/costmap_node/costmap" />
  • 注意:如果您在没有插件参数的情况下运行costmap,则将采用预先配置的参数配置方式,并根据使用的代价地图自动创建图层。

Step 3: Plugins Specification

  • 如果要指定图层,其需要将字典存储在插件数组中。 例如:
plugins: 
- {name: static_map,       type: "costmap_2d::StaticLayer"}
  • 假设要发布一个类似以下内容的静态地图。
<node name="map_server" pkg="map_server" type="map_server" args="$(find simple_costmap_configuration)/realmap.yaml"/>
  • 可以在数组中添加额外的字典。
plugins: 
- {name: static_map,       type: "costmap_2d::StaticLayer"}
- {name: obstacles,        type: "costmap_2d::VoxelLayer"}
  • The namespace for each of the layers is one level down from where the plugins are specified.

  • 因此,需要扩展参数文件来指定障碍层的内容。

plugins: 
- {name: static_map,       type: "costmap_2d::StaticLayer"}
- {name: obstacles,        type: "costmap_2d::VoxelLayer"}
publish_frequency: 1.0
obstacles:
observation_sources: base_scan
base_scan: {data_type: LaserScan, sensor_frame: /base_laser_link,  clearing: true, marking: true, topic: /base_scan}

参考资料

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号


标签: ros与navigation教程