7 #ifndef __LASER_SCAN_GRID_WORLD_H 8 #define __LASER_SCAN_GRID_WORLD_H 34 _map(gcs->cell_factory(), init_params) {}
43 for (
const auto &sp : scan.
points) {
45 double x_world = pose.
x + sp.range * std::cos(sp.angle + pose.
theta);
46 double y_world = pose.
y + sp.range * std::sin(sp.angle + pose.
theta);
63 double laser_x,
double laser_y,
64 double beam_end_x,
double beam_end_y,
65 bool is_occ,
double quality) {
73 for (
const auto &pt : pts) {
Tracks a robots perception of an environment. The environment is represented by a GridMap; A laser sc...
virtual const RobotState & pose() const
Returns the robot pose.
An occupancy grid implementation.
void update_cell(const DiscretePoint2D &cell_coord, const Occupancy &new_value, double quality=1.0)
Defines some structures related to data obtained from sensors. There are structures ScanPoint and Tra...
double theta
The position of robot.
Defines a robot position in cartesian coordinates and an angle of rotation.
Defines some classes related to a robot state. There are classes RobotState and World.
const std::vector< Point > & points() const
Returns the line's component points.
virtual const MapType & map() const
Returns the map.
DiscretePoint2D world_to_cell(double x, double y) const
virtual void handle_scan_point(MapType &map, double laser_x, double laser_y, double beam_end_x, double beam_end_y, bool is_occ, double quality)
Defines a line segment on a plane.
Defines a point with integer coordinates on a plane.
LaserScanGridWorld(std::shared_ptr< GridCellStrategy > gcs, const GridMapParams &init_params)
virtual void handle_observation(TransformedLaserScan &scan)