libalmath  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
AL::Math::OccupancyMapParams Struct Reference

Create a OccupancyMapParams. OccupancyMapParams are used used to define occupancy maps and to provide helpers to change from metrical to pixel frames. Maps are squared. More...

#include <occupancymapparams.h>

Public Member Functions

 OccupancyMapParams (int size, float metersPerPixel, const Position2D &mapCenter, float obstacleThreshold=0.25f)
 
void initOriginOffset (const Position2D &mapCenter)
 Set the origin offset accordingly to the given desired metrical position of the central pixel. More...
 
Point2Di getPixelFromPose (const Pose2D &pose) const
 Get the Point2Di in the map corresponding to the given metrical pose. More...
 
Point2Di getPixelFromPosition (const Position2D &position) const
 Get the Point2Di in the map corresponding to the given metrical position. More...
 
Pose2D getPoseFromPixel (const Pose2Di &pixel) const
 Get the Pose2D corresponding to the given pixel pose in the map. More...
 
Position2D getPositionFromPixel (const Point2Di &pixel) const
 Get the Pose2D corresponding to the given pixel pose in the map. More...
 
Point2Di getDeltaPixelFromDeltaPosition (const Position2D &position) const
 Get the Point2Di representing the pixel difference corresponding to the given metrical difference. More...
 
float getObstacleProbabilityThreshold () const
 Get the maximum pixel value of an obstacle in the map. More...
 

Static Public Member Functions

static Point2Di getPixelFromOffsetAndScale (const Math::Pose2D &pose, float metersPerPixel, const Math::Position2D &originOffset)
 

Public Attributes

int size
 Pixel size of the associated squared occupancy map. More...
 
float metersPerPixel
 Factor representing the metrical size of each pixel. More...
 
Position2D originOffset
 Metrical coordinate of the (0, 0) pixel. More...
 
float obstacleProbabilityThreshold
 Maximum pixel value of an obstacle in the map More...
 

Detailed Description

Create a OccupancyMapParams. OccupancyMapParams are used used to define occupancy maps and to provide helpers to change from metrical to pixel frames. Maps are squared.

Definition at line 67 of file occupancymapparams.h.

Constructor & Destructor Documentation

AL::Math::OccupancyMapParams::OccupancyMapParams ( int  size,
float  metersPerPixel,
const Position2D mapCenter,
float  obstacleThreshold = 0.25f 
)
explicit

Member Function Documentation

Point2Di AL::Math::OccupancyMapParams::getDeltaPixelFromDeltaPosition ( const Position2D position) const

Get the Point2Di representing the pixel difference corresponding to the given metrical difference.

Parameters
positionMetrical delta.
Returns
Point2Di of the corresponding pixel difference.
float AL::Math::OccupancyMapParams::getObstacleProbabilityThreshold ( ) const

Get the maximum pixel value of an obstacle in the map.

static Point2Di AL::Math::OccupancyMapParams::getPixelFromOffsetAndScale ( const Math::Pose2D pose,
float  metersPerPixel,
const Math::Position2D originOffset 
)
inlinestatic

Definition at line 78 of file occupancymapparams.h.

Point2Di AL::Math::OccupancyMapParams::getPixelFromPose ( const Pose2D pose) const

Get the Point2Di in the map corresponding to the given metrical pose.

Parameters
posedesired metrical Pose2D.
Returns
Point2Di of the associated pixel.
Point2Di AL::Math::OccupancyMapParams::getPixelFromPosition ( const Position2D position) const

Get the Point2Di in the map corresponding to the given metrical position.

Parameters
positiondesired metrical Position2D.
Returns
Point2Di of the associated pixel.
Pose2D AL::Math::OccupancyMapParams::getPoseFromPixel ( const Pose2Di pixel) const

Get the Pose2D corresponding to the given pixel pose in the map.

Parameters
pixeldesired pixel pose.
Returns
Pose2D of the associated pose.
Position2D AL::Math::OccupancyMapParams::getPositionFromPixel ( const Point2Di pixel) const

Get the Pose2D corresponding to the given pixel pose in the map.

Parameters
pixeldesired pixel pose.
Returns
Position2D of the associated position.
void AL::Math::OccupancyMapParams::initOriginOffset ( const Position2D mapCenter)

Set the origin offset accordingly to the given desired metrical position of the central pixel.

Parameters
mapCenterdesired metrical position of the central pixel.

Member Data Documentation

float AL::Math::OccupancyMapParams::metersPerPixel

Factor representing the metrical size of each pixel.

Definition at line 135 of file occupancymapparams.h.

float AL::Math::OccupancyMapParams::obstacleProbabilityThreshold

Maximum pixel value of an obstacle in the map

Definition at line 139 of file occupancymapparams.h.

Position2D AL::Math::OccupancyMapParams::originOffset

Metrical coordinate of the (0, 0) pixel.

Definition at line 137 of file occupancymapparams.h.

int AL::Math::OccupancyMapParams::size

Pixel size of the associated squared occupancy map.

Definition at line 133 of file occupancymapparams.h.


The documentation for this struct was generated from the following file: