Only released in EOL distros:  

Package Summary

The map_ray_caster package provides a class for cached ray casting on maps. The origin of all rays is fixed relative to the map, it is the map center.

map_ray_caster provides a cached ray casting on a map, such as those provided by local_map of the Large Maps Framework (LaMa).

Contents

  1. Overview
  2. Usage

Overview

map_ray_caster provides a cached ray casting on a map, such as those provided by local_map. The origin of all rays is fixed relative to the map, it is the map center. It takes as input a costmap (nav_msgs/OccupancyGrid) and returns a laser scan (sensor_msgs/LaserScan). The ray casting will be from scan.angle_min to scan.angle_max. Moreover, other value of the input scan are used so that the scan message must be initialized with non-default values.

Usage

To use the map_ray_caster::MapRayCaster class to compute a fake sensor_msgs/LaserScan from an occupancy grid in C++:

   1 #include <map_ray_caster/map_ray_caster.h>
   2 
   3 map_ray_caster::MapRayCaster ray_caster;  //!> Ray casting with cache to compute a fake LaserScan.
   4 
   5 nav_msgs::OccupancyGrid map;
   6 map.frame_id = "map_frame";
   7 
   8 sensor_msgs::LaserScan scan;
   9 scan.angle_min = -M_PI_2;
  10 scan.angle_max = M_PI_2;
  11 scan.angle_increment = (scan.angle_max - scan.angle_min) / (720 - 1);
  12 scan.range_max = 10;
  13 scan.header = map.header;
  14 scan.header.frame_id = "laser_frame";
  15 ray_caster.laserScanCast(map, scan);

Wiki: map_ray_caster (last edited 2014-12-19 07:33:43 by GaelEcorchard)