栅格地图转代价地图,栅格地图转cv::mat图片,代价地图转换为cv::Mat

     栅格地图转代价地图,栅格地图转cv::mat图片,代价地图转换为cv::Mat

//订阅一个全局大地图,做障碍和珊格地图的提取
costmap_sub_ = private_nh.subscribe("move_base/global_costmap/costmap", 1,
                                                             &global_planner::grid_callback, this);
costmap_updated_sub_ = private_nh.subscribe(
                "move_base/global_costmap/costmap_updates", 1,&global_planner::grid_updated_callback, this);

订阅栅格地图:

    //订阅一个全局大地图,做障碍和珊格地图的提取
    void global_planner::grid_callback(nav_msgs::OccupancyGridConstPtr const& msg) {
        grid_ready_ = false;
        grid_ = *msg;
        frame_id_ = msg->header.frame_id;
        std::cout << "1.订阅一个全局大地图,做障碍和珊格地图的提取 frame_id_: " <

你可能感兴趣的:(新ros专栏,栅格地图,costmap,mat,opecncv,occupancyGrid)