AURobotServers  4
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
UObj3dPool Class Reference

#include <uobj3dpool.h>

Inheritance diagram for UObj3dPool:
Inheritance graph

Public Member Functions

void addObstacle (UPolygon *newPoly, UPoseTime odoPose, bool isHuman, bool isGndBased)
 
UObj3dGroupadvanceNewGroup ()
 
void clear ()
 
void clearGrp (int idx)
 
UObj3dGroupgetGroup (int fromNewest)
 
int getGroupsCnt ()
 
virtual void getObstacleGroupSettings (UObj3dGroup *og)
 
UObj3dGroupgetObstGrp (UPoseTime pt)
 
virtual void obstDataUpdated (UTime poseTime)
 
void print (const char *prestr)
 
void setLogFile (FILE *logFile)
 
void setNewGrpDist (double value)
 
void setNewGrpTime (double value)
 
 UObj3dPool ()
 
virtual ~UObj3dPool ()
 

Static Public Attributes

static const int MAX_OBSTACLE_GROUPS = 100
 

Protected Attributes

UObj3dGroupgroups [MAX_OBSTACLE_GROUPS]
 
int groupsCnt
 
FILE * logo
 
int newest
 
double newGroupTime
 
double newGrpDist
 
unsigned long nextSerial
 

Detailed Description

Historic updated obstacles, divided into groups

Author
Christian Andersen

Constructor & Destructor Documentation

UObj3dPool::UObj3dPool ( )

Constructor

UObj3dPool::~UObj3dPool ( )
virtual

Destructor

Member Function Documentation

void UObj3dPool::addObstacle ( UPolygon newPoly,
UPoseTime  odoPose,
bool  isHuman,
bool  isGndBased 
)

Add this polygon as an obstacle. The obstacle can be either a human or a ground based or both. If not ground based, then the obstacle is detected from higher than ground stereo detecttions.

Parameters
newPolyis the new polygon, with positions in robot coordinates.
odoPoseis the robot pose at sensor time
isHumanis detected from above ground and is "human" sized
isGndBasedobstacle is detected as edge of ground plane.

References UObj3dGroup::addObstPoly(), UPolygon::getPoints(), UPolygon::getPointsCnt(), UPose::getPoseToMap(), and UPoseTime::t.

UObj3dGroup * UObj3dPool::advanceNewGroup ( )

Advance to next obstacle group, and return pointer to new cleared group.

References UObstacleGroup::clear(), UObstacleGroup::setSerial(), and UObj3dGroup::UObj3dGroup().

void UObj3dPool::clear ( void  )

Clear all obstacles from obstacle pool, that is remove all obstacles from all groups, but maintain the groups with pose and other informations.

References UObstacleGroup::getPoseLast(), and UObstacleGroup::removeAllObsts().

Referenced by UFuncObj3d::handleCommand().

void UObj3dPool::clearGrp ( int  idx)

Clear all obstacles from obstacle group. The 'idx' is the group to clear, idx = 0 clears the newest group and idx 1..N clears corresponding older groups.

References UObstacleGroup::getPoseLast().

Referenced by UFuncObj3d::handleCommand().

UObj3dGroup * UObj3dPool::getGroup ( int  fromNewest)

Get number of groups in history

Referenced by UFuncObj3d::sendObjects().

int UObj3dPool::getGroupsCnt ( )
inline

Get number of groups in history

Referenced by UFuncObj3d::sendObjects().

void UObj3dPool::getObstacleGroupSettings ( UObj3dGroup og)
virtual

Load parameter values from current settings pool to this obstacle group

Reimplemented in UResObj3d.

UObj3dGroup * UObj3dPool::getObstGrp ( UPoseTime  pt)

Get the obstacle group relevant for this time and robot position. Return pointer to the group.

References UObstacleGroup::getPoseFirst(), UObstacleGroup::logAll(), UObstacleGroup::removeInvalid(), UObstacleGroup::setPoseFirst(), UObj3dGroup::setPosePrev(), UPoseTime::t, UPose::x, and UPose::y.

Referenced by UFuncObj3d::handleCommand().

void UObj3dPool::obstDataUpdated ( UTime  poseTime)
virtual

Obstacle data is updated - tell resource

Reimplemented in UResObj3d.

void UObj3dPool::print ( const char *  prestr)

Print status to console

void UObj3dPool::setLogFile ( FILE *  logFile)

Set obstacle logfile

void UObj3dPool::setNewGrpDist ( double  value)
inline

Set distance traveled by robot before new obstacle group are to be formed (meter).

void UObj3dPool::setNewGrpTime ( double  value)
inline

Set time passed before new obstacle group are to be formed (in seconds).

Member Data Documentation

UObj3dGroup* UObj3dPool::groups[MAX_OBSTACLE_GROUPS]
protected

Obstacle groups, each holding a coordinate-wise coherent set of obstacles - distance less than e.g 25 m from start to end pose.

int UObj3dPool::groupsCnt
protected

Actual used number of obstacle groups

FILE* UObj3dPool::logo
protected

Obstacle logfile

const int UObj3dPool::MAX_OBSTACLE_GROUPS = 100
static

Max number of groups

int UObj3dPool::newest
protected

The most recent obstacle group. When out of groups, then reuse.

double UObj3dPool::newGroupTime
protected

Time passed before new obstacle group are to be formed (in seconds).

double UObj3dPool::newGrpDist
protected

Distance traveled by robot before new obstacle group are to be formed (meter).

unsigned long UObj3dPool::nextSerial
protected

Next serial number to use for obstacle group


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