Public Member Functions | Private Member Functions | Private Attributes | List of all members
robot_model_services::MapHelper Class Reference

#include <MapHelper.hpp>

Public Member Functions

bool doRaytracing (const SimpleVector3 &fromPoint, const SimpleVector3 &toPoint)
 
bool doRaytracing (const SimpleVector3 &fromPoint, const SimpleVector3 &toPoint, Ray &ray)
 
int8_t getCollisionThreshold ()
 
int8_t getCostmapOccupancyValue (const SimpleVector3 &position)
 
int8_t getCostmapOccupancyValue (const int32_t &mapX, const int32_t &mapY)
 
int8_t getMapOccupancyValue (const SimpleVector3 &position)
 
int8_t getMapOccupancyValue (const int32_t &mapX, const int32_t &mapY)
 
float getMetricHeight ()
 
float getMetricWidth ()
 
SimpleQuaternion getOrientation ()
 
int8_t getRaytracingMapOccupancyValue (const SimpleVector3 &position)
 
int8_t getRaytracingMapOccupancyValue (const int32_t &mapX, const int32_t &mapY)
 
float getSquaredDistance (const SimpleVector3 &start, const SimpleVector3 &goal)
 
SimpleVector3 getTranslation ()
 
bool isOccupancyValueAcceptable (const int8_t &occupancyValue)
 
 MapHelper (const std::string &mapTopicName="map", const std::string &getPlanServiceName="move_base/make_plan")
 
void mapToWorldCoordinates (const int32_t &x, const int32_t &y, SimpleVector3 &result)
 
void mapToWorldCoordinates (const SimpleVector3 &position, SimpleVector3 &result)
 
void mapToWorldSize (const double &size, double &result)
 
void setCollisionThreshold (int8_t thresholdValue)
 
void worldToMapCoordinates (const SimpleVector3 &position, int32_t &x, int32_t &y)
 
void worldToMapCoordinates (const SimpleVector3 &position, SimpleVector3 &result)
 
void worldToMapSize (const double &size, double &result)
 
virtual ~MapHelper ()
 

Private Member Functions

void aggregateRaytracingMap ()
 
int8_t getOccupancyValue (const nav_msgs::OccupancyGrid &map, const SimpleVector3 &position)
 
int8_t getOccupancyValue (const costmap_2d::Costmap2D &costmap, const SimpleVector3 &position)
 
int8_t getOccupancyValue (const nav_msgs::OccupancyGrid &map, const int32_t &mapX, const int32_t &mapY)
 
int8_t getOccupancyValue (const costmap_2d::Costmap2D &costmap, const int32_t &mapX, const int32_t &mapY)
 
void mapReceived (nav_msgs::OccupancyGrid map)
 
void setCostmap ()
 

Private Attributes

int8_t mCollisionThreshold
 
costmap_2d::Costmap2D mCostmap
 
int8_t mCostTranslationTable [256]
 
DebugHelperPtr mDebugHelperPtr
 
ros::ServiceClient mGetPlanServiceClient
 
ros::NodeHandle mGlobalNodeHandle
 
nav_msgs::OccupancyGrid mMap
 
bool mMapReceived
 
nav_msgs::OccupancyGrid mRaytracingMap
 

Detailed Description

Definition at line 63 of file MapHelper.hpp.

Constructor & Destructor Documentation

◆ MapHelper()

robot_model_services::MapHelper::MapHelper ( const std::string &  mapTopicName = "map",
const std::string &  getPlanServiceName = "move_base/make_plan" 
)
inline

Definition at line 77 of file MapHelper.hpp.

◆ ~MapHelper()

virtual robot_model_services::MapHelper::~MapHelper ( )
inlinevirtual

Definition at line 112 of file MapHelper.hpp.

Member Function Documentation

◆ aggregateRaytracingMap()

void robot_model_services::MapHelper::aggregateRaytracingMap ( )
inlineprivate

Definition at line 153 of file MapHelper.hpp.

◆ doRaytracing() [1/2]

bool robot_model_services::MapHelper::doRaytracing ( const SimpleVector3 fromPoint,
const SimpleVector3 toPoint 
)
inline

Definition at line 239 of file MapHelper.hpp.

◆ doRaytracing() [2/2]

bool robot_model_services::MapHelper::doRaytracing ( const SimpleVector3 fromPoint,
const SimpleVector3 toPoint,
Ray ray 
)
inline

Definition at line 245 of file MapHelper.hpp.

◆ getCollisionThreshold()

int8_t robot_model_services::MapHelper::getCollisionThreshold ( )
inline

Definition at line 400 of file MapHelper.hpp.

◆ getCostmapOccupancyValue() [1/2]

int8_t robot_model_services::MapHelper::getCostmapOccupancyValue ( const SimpleVector3 position)
inline

Definition at line 222 of file MapHelper.hpp.

◆ getCostmapOccupancyValue() [2/2]

int8_t robot_model_services::MapHelper::getCostmapOccupancyValue ( const int32_t &  mapX,
const int32_t &  mapY 
)
inline

Definition at line 226 of file MapHelper.hpp.

◆ getMapOccupancyValue() [1/2]

int8_t robot_model_services::MapHelper::getMapOccupancyValue ( const SimpleVector3 position)
inline

Definition at line 213 of file MapHelper.hpp.

◆ getMapOccupancyValue() [2/2]

int8_t robot_model_services::MapHelper::getMapOccupancyValue ( const int32_t &  mapX,
const int32_t &  mapY 
)
inline

Definition at line 217 of file MapHelper.hpp.

◆ getMetricHeight()

float robot_model_services::MapHelper::getMetricHeight ( )
inline

Definition at line 344 of file MapHelper.hpp.

◆ getMetricWidth()

float robot_model_services::MapHelper::getMetricWidth ( )
inline

Definition at line 340 of file MapHelper.hpp.

◆ getOccupancyValue() [1/4]

int8_t robot_model_services::MapHelper::getOccupancyValue ( const nav_msgs::OccupancyGrid &  map,
const SimpleVector3 position 
)
inlineprivate

Definition at line 177 of file MapHelper.hpp.

◆ getOccupancyValue() [2/4]

int8_t robot_model_services::MapHelper::getOccupancyValue ( const costmap_2d::Costmap2D costmap,
const SimpleVector3 position 
)
inlineprivate

Definition at line 183 of file MapHelper.hpp.

◆ getOccupancyValue() [3/4]

int8_t robot_model_services::MapHelper::getOccupancyValue ( const nav_msgs::OccupancyGrid &  map,
const int32_t &  mapX,
const int32_t &  mapY 
)
inlineprivate

Definition at line 189 of file MapHelper.hpp.

◆ getOccupancyValue() [4/4]

int8_t robot_model_services::MapHelper::getOccupancyValue ( const costmap_2d::Costmap2D costmap,
const int32_t &  mapX,
const int32_t &  mapY 
)
inlineprivate

Definition at line 200 of file MapHelper.hpp.

◆ getOrientation()

SimpleQuaternion robot_model_services::MapHelper::getOrientation ( )
inline

Definition at line 388 of file MapHelper.hpp.

◆ getRaytracingMapOccupancyValue() [1/2]

int8_t robot_model_services::MapHelper::getRaytracingMapOccupancyValue ( const SimpleVector3 position)
inline

Definition at line 231 of file MapHelper.hpp.

◆ getRaytracingMapOccupancyValue() [2/2]

int8_t robot_model_services::MapHelper::getRaytracingMapOccupancyValue ( const int32_t &  mapX,
const int32_t &  mapY 
)
inline

Definition at line 235 of file MapHelper.hpp.

◆ getSquaredDistance()

float robot_model_services::MapHelper::getSquaredDistance ( const SimpleVector3 start,
const SimpleVector3 goal 
)
inline

Definition at line 404 of file MapHelper.hpp.

◆ getTranslation()

SimpleVector3 robot_model_services::MapHelper::getTranslation ( )
inline

Definition at line 384 of file MapHelper.hpp.

◆ isOccupancyValueAcceptable()

bool robot_model_services::MapHelper::isOccupancyValueAcceptable ( const int8_t &  occupancyValue)
inline

Definition at line 392 of file MapHelper.hpp.

◆ mapReceived()

void robot_model_services::MapHelper::mapReceived ( nav_msgs::OccupancyGrid  map)
inlineprivate

Definition at line 114 of file MapHelper.hpp.

◆ mapToWorldCoordinates() [1/2]

void robot_model_services::MapHelper::mapToWorldCoordinates ( const int32_t &  x,
const int32_t &  y,
SimpleVector3 result 
)
inline

Definition at line 366 of file MapHelper.hpp.

◆ mapToWorldCoordinates() [2/2]

void robot_model_services::MapHelper::mapToWorldCoordinates ( const SimpleVector3 position,
SimpleVector3 result 
)
inline

Definition at line 370 of file MapHelper.hpp.

◆ mapToWorldSize()

void robot_model_services::MapHelper::mapToWorldSize ( const double &  size,
double &  result 
)
inline

Definition at line 376 of file MapHelper.hpp.

◆ setCollisionThreshold()

void robot_model_services::MapHelper::setCollisionThreshold ( int8_t  thresholdValue)
inline

Definition at line 396 of file MapHelper.hpp.

◆ setCostmap()

void robot_model_services::MapHelper::setCostmap ( )
inlineprivate

Definition at line 129 of file MapHelper.hpp.

◆ worldToMapCoordinates() [1/2]

void robot_model_services::MapHelper::worldToMapCoordinates ( const SimpleVector3 position,
int32_t &  x,
int32_t &  y 
)
inline

Definition at line 348 of file MapHelper.hpp.

◆ worldToMapCoordinates() [2/2]

void robot_model_services::MapHelper::worldToMapCoordinates ( const SimpleVector3 position,
SimpleVector3 result 
)
inline

Definition at line 357 of file MapHelper.hpp.

◆ worldToMapSize()

void robot_model_services::MapHelper::worldToMapSize ( const double &  size,
double &  result 
)
inline

Definition at line 380 of file MapHelper.hpp.

Member Data Documentation

◆ mCollisionThreshold

int8_t robot_model_services::MapHelper::mCollisionThreshold
private

Definition at line 68 of file MapHelper.hpp.

◆ mCostmap

costmap_2d::Costmap2D robot_model_services::MapHelper::mCostmap
private

Definition at line 72 of file MapHelper.hpp.

◆ mCostTranslationTable

int8_t robot_model_services::MapHelper::mCostTranslationTable[256]
private

Definition at line 75 of file MapHelper.hpp.

◆ mDebugHelperPtr

DebugHelperPtr robot_model_services::MapHelper::mDebugHelperPtr
private

Definition at line 65 of file MapHelper.hpp.

◆ mGetPlanServiceClient

ros::ServiceClient robot_model_services::MapHelper::mGetPlanServiceClient
private

Definition at line 70 of file MapHelper.hpp.

◆ mGlobalNodeHandle

ros::NodeHandle robot_model_services::MapHelper::mGlobalNodeHandle
private

Definition at line 69 of file MapHelper.hpp.

◆ mMap

nav_msgs::OccupancyGrid robot_model_services::MapHelper::mMap
private

Definition at line 71 of file MapHelper.hpp.

◆ mMapReceived

bool robot_model_services::MapHelper::mMapReceived
private

Definition at line 67 of file MapHelper.hpp.

◆ mRaytracingMap

nav_msgs::OccupancyGrid robot_model_services::MapHelper::mRaytracingMap
private

Definition at line 73 of file MapHelper.hpp.


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


asr_robot_model_services
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Mon Feb 28 2022 21:56:02