GT2004BasicBehaviorDirectedScanForLandmarks Class Reference

#include <GT2004HeadControlBasicBehaviors.h>

Inheritance diagram for GT2004BasicBehaviorDirectedScanForLandmarks:

GT2004HeadControlBasicBehavior Xabsl2BasicBehavior HeadControlInterfaces Xabsl2NamedItem List of all members.

Public Member Functions

 GT2004BasicBehaviorDirectedScanForLandmarks (Xabsl2ErrorHandler &errorHandler, HeadControlInterfaces &interfaces, GT2004HeadControl &headControl, GT2004HeadPathPlanner &headPathPlanner, bool &lastScanWasLeft, CameraInfo &cameraInfo)
virtual void execute ()

Public Attributes

bool nextLandmarkIsWithinReach

Private Attributes

double leftOrRight
int currentLandmark
int nextLandmark
int waitSomeBeforeLookingAtNextLandmark

Detailed Description

The basic behavior "look-at-close-landmarks"

Definition at line 110 of file GT2004HeadControlBasicBehaviors.h.


Constructor & Destructor Documentation

GT2004BasicBehaviorDirectedScanForLandmarks::GT2004BasicBehaviorDirectedScanForLandmarks ( Xabsl2ErrorHandler errorHandler,
HeadControlInterfaces interfaces,
GT2004HeadControl headControl,
GT2004HeadPathPlanner headPathPlanner,
bool &  lastScanWasLeft,
CameraInfo cameraInfo 
) [inline]

Constructor

Definition at line 114 of file GT2004HeadControlBasicBehaviors.h.


Member Function Documentation

void GT2004BasicBehaviorDirectedScanForLandmarks::execute (  )  [virtual]

Executes the basic behavior

alternate scan direction whenever basic behavior is called for the first time

The following calculates the closest landmark and compares it to the one that the scan is currently aiming at. If the closest is further in the direction of the scan, it is used as the new target. If it is in the opposite direction, it is not used to guarantee a stable head movement

reset variables when a new scan is started

if a landmark is found to be closest that is not the one the robot is currently aiming at, store the ID in nextLandmark but don't change the target yet.

the following functions as a delay so that the robot continues to look at a landmark for a brief period of time before aiming at the next

calculate the XABSL input symbol "nextLandmarkIsWithinReach"

Implements GT2004HeadControlBasicBehavior.

Definition at line 188 of file GT2004HeadControlBasicBehaviors.cpp.

References GT2004HeadControl::aimAtLandmark(), Geometry::angleTo(), Xabsl2BasicBehavior::basicBehaviorWasActiveDuringLastExecutionOfEngine, GT2004HeadControl::calculateClosestLandmark(), GT2004HeadControlBasicBehavior::cameraInfo, CIRCLE, currentLandmark, DEBUG_DRAWING_FINISHED, GT2004HeadControlBasicBehavior::headControl, GT2004HeadControlBasicBehavior::headPathPlanner, RobotDimensions::jointLimitHeadPanP, GT2004HeadPathPlanner::lastHeadPan, GT2004HeadControlBasicBehavior::lastScanWasLeft, leftOrRight, nextLandmark, nextLandmarkIsWithinReach, CameraInfo::openingAngleWidth, Landmark::position, Drawings::red, HeadControlInterfaces::robotPose, GT2004HeadControl::setJoints(), targetPointOnLandmark, waitSomeBeforeLookingAtNextLandmark, Vector3< V >::y, and Drawings::yellow.


Member Data Documentation

int GT2004BasicBehaviorDirectedScanForLandmarks::currentLandmark [private]

Definition at line 124 of file GT2004HeadControlBasicBehaviors.h.

Referenced by execute().

double GT2004BasicBehaviorDirectedScanForLandmarks::leftOrRight [private]

Definition at line 123 of file GT2004HeadControlBasicBehaviors.h.

Referenced by execute().

int GT2004BasicBehaviorDirectedScanForLandmarks::nextLandmark [private]

Definition at line 125 of file GT2004HeadControlBasicBehaviors.h.

Referenced by execute().

bool GT2004BasicBehaviorDirectedScanForLandmarks::nextLandmarkIsWithinReach

Definition at line 120 of file GT2004HeadControlBasicBehaviors.h.

Referenced by execute(), and GT2004HeadControlSymbols::getNextLandmarkIsWithinReach().

int GT2004BasicBehaviorDirectedScanForLandmarks::waitSomeBeforeLookingAtNextLandmark [private]

Definition at line 126 of file GT2004HeadControlBasicBehaviors.h.

Referenced by execute().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:33:03 2006 for DT2005.panorama by  doxygen 1.4.7