zoukankan      html  css  js  c++  java
  • ROS中local costmap的原点坐标系

    local costmap是一个依赖于其他坐标系存在的坐标系统,它并不维护自己的坐标系,而是在另一个坐标系中设定坐标原点,然后记下自己的宽与高。它使用数据结构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

    值得注意的是,对于local costmap,这个数据结构中的position坐标指的是costmap的右下角的点在配置的frame中的坐标。

    配置的示例如下:

    local_costmap:
      #We'll publish the voxel grid used by this costmap
      publish_voxel_map: true
    
      #Set the global and robot frames for the costmap
      global_frame: odom
      robot_base_frame: base_link
    
      #Set the update and publish frequency of the costmap
      update_frequency: 5.0
      publish_frequency: 2.0
    
      #We'll configure this costmap to be a rolling window... meaning it is always
      #centered at the robot
      static_map: false
      rolling_window: true
       6.0
      height: 6.0
      resolution: 0.025
      origin_x: 0.0
      origin_y: 0.0

    其中,global_frame即是依赖的坐标系的配置,默认是“odom”,但推荐改为“map”,因为可以方便的用于各种自定义的运算。

  • 相关阅读:
    路飞学城Python-Day48
    路飞学城Python-Day46
    路飞学城Python-Day43
    路飞学城Python-Day42
    路飞学城Python-Day40(第四模块复习题)
    路飞学城Python-Day39(第四模块复习题)
    python小练习
    微信小程序常见错误及基本排除方法
    CSS文本样式
    小程序-广告轮播/控制属性
  • 原文地址:https://www.cnblogs.com/qyit/p/11326176.html
Copyright © 2011-2022 走看看