GT 2005 Software Architecture Study & Analysis. Team Members Ahmad Salam AlRefaiSaif AhmadHusain...

114
GT 2005 Software Architecture Study & Analysis
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of GT 2005 Software Architecture Study & Analysis. Team Members Ahmad Salam AlRefaiSaif AhmadHusain...

GT 2005 Software Architecture

Study & Analysis

Team Members

AHMAD SALAM ALREFAIVision And Localization

Image Processor

• ImageProcessorInterfaces (current image for example) as a parameter to the constructor. It has two virtual methods one called execute which is called on every captured image. And the other called handleMessage which handles an incoming message.

• There are also two private methods that call scan method, namely scan colomns which scan the vertical lines which are more dense near the horizon since objects are further away and hence smaller. The other methods called scan rows which calculate the horizontal lines and call scan.

Image Processor

• static const double minAngleBetweenFlagAndGoal;• double xFactor, /**< Factor to convert the pixel coordinate space to the anglular coordinate space. */• yFactor; /**< Factor to convert the pixel coordinate space to the anglular coordinate space. */• int yThreshold; /**< Brightness increase threshold. */• int vThreshold; /**< Brightness decrease threshold. */• int orangeCount, /**< Number of columns with ball points. */• noOrangeCount, /**< Number of columns without a ball point. */• noRedCount, /**< Number of columns without a red robot point. */• noBlueCount, /**< Number of columns without a blue robot point. */• noGoalCount, /**< Number of columns without a opponent goal seen. */• closestBottom; /**< Closest bottom point on the grid. */• Vector2<int> firstRed, /**< First red robot point in a cluster. */• closestRed, /**< Closest red robot point in a cluster. */• lastRed, /**< Last red robot point in a cluster. */• firstBlue, /**< First blue robot point in a cluster. */• closestBlue, /**< Closest blue robot point in a cluster. */• lastBlue, /**< Last blue robot point in a cluster. */• firstFlag, /**< First flag point in a cluster. */• lastFlag, /**< Last flag point in a cluster. */• lastRedMidPoint, /** Needed for debug drawings */• lastBlueMidPoint; /** Needed for debug drawings */•  • bool goalAtBorder; /**< Is the first goal point at the image border? */

Image Processor

• bool goalAtBorder; /**< Is the first goal point at the image border? */• /** Useful information about the current image that is calculated by the ImageProcessor • object and may be used by the specialist (avoiding recalculation) like the horizon, • etc. */• ImageInfo imageInfo;• int longestBallRun;• Vector2<int> ballCandidate;• GT2005Clustering ballClustering;• GT2005LineFinder_DeterministicApproach lineFinder;• GT20050CenterCircleFinder circleFinder;•  • CameraMatrix cmTricot, /**< Camera matrix without tricot height. */• prevCmTricot; /**< The tricot matrix of the previous image. */• // prevCameraMatrix moved to ImageInfo!•  • ColorCorrector colorCorrector; /**< The color correction tool. */•  • /** Goal specialists to recognize the goals (one for each color). */• GT2005GoalRecognizer goalSpecialistY, goalSpecialistB;•  • /** Other specialists. */• GT2005BeaconDetector beaconDetector; /**< The beacon detector */• GT2005BallSpecialist ballSpecialist; /**< The ball specialist. */• GT2005EdgeSpecialist edgeSpecialist; /**< The edge specialist. */• GT2005PlayerSpecialist playerSpecialist; /**< The player specialist. */

Some functions

• pixelsBelowHorizon() This function to a point to horizon and return true if below horizon.

• filterPercept(); removes potential misreadings of percept

• filterLinesPercept() removes potential misreading for a given line type.

• calcEdgeAngle() calculate an edge at an edge point.

• getCoords() converts an address of an image to pixel coordinates.

Color Corrector Class

• contains a class that represents a table used for color correction, it is a mixture among the BB2004

• DDD2004 and MSH2004 correction, Everything is static so it is loaded only once in the simulator. 

• The function calcRadius it gets the x and y coordinates and returns the distance from the center of the image

• We have three correct functions one returns the correct intensity of a pixel and the other returns the corrected Color of a pixel (both depends on corrected table) and the last correct all pixels of image 

• The function distort returns a disturbed color of a pixel from distortionTable in YUV format.

• The function load loads the calibration image and computes the lookup table

• The function disable, disables the color correction.

Goal Recognizer

• Contains class EdgeDetector

Function inspectPixel investigates the next pixel and reports, whether and edge or repeated deviation of the pixel cololurs (without the indications of an edge) have detected. It is assumed that the edges are quite sharp and that the color beyond the edge is significantly different to the goal colour. In case of blurred edge or a steady color gradient the method will eventually return deviationWithoutEdge.

• The function getLastPointInClass returns the last point in or near the target colour class. If inspectPixel returned

• The value edge the returned point is located just before the edge.• The function clear() reset the edge detection state while keeping the reference colour • The function reset() reset the reference colour and the ege detector state.• The function setReferenceColor() do so…• The function getReferenceColor() do so…• The function inverseCovarianceMatrix the inverse covariance matrix of the goal color

variance• (needed for the Mahalanobis distance).• The function distance calculates the mahalanobis distance of the given colour to the

reference color.

• The classThreashold is the maximum distance from the reference colour that is tolerated for a pixel

• To be considered in the target colour class• The edgeThreshold is the minimum distance from the reference colour that pixels on the other

side of an edge need to have. This value is greater than classThreshold.• targetColorClass: the colour class of the goal• ignoredClassification: ClourClass that is not considered as an indication for edge.• ReferenceColor: The reference color for distance calculations. It is an average of recent pixels• That were classified in the target colour class• deviationCounter: to detect the end of an area in target color without an edge• edgeCounter: to detect an edge• lastPointInClass: Last pixel in the target colour class (or within tolerable distance).• ConnectedToClass: Current pixel is connected via to a pixel in the target colour class only via

pixels within tolerable distance, i.e. there hasn’t been a pixel with a distance greater than the classDistnace threshold since

• The last pixel classified in the target class (without distance). As long as this variable is true, points with tolerable

• Distance will be stored as lastPointInClass.• EdgePointList: arrays to store the edge points and their type.• GoalPost() constructs an empty goalpost hypothesis (endpoints top bottom, onGreen?, hight,

visibleHieght,• strongEdgeCount,weakEdgeCount,nonexistence?,• color: average color of some pixels near the goalpost. This value is used to detect the free part of

goal (is done in the interpretation after the entire image was scanned) or straightnes check. • GoalHypothesis: Construct empty goalHypothesis with default values• Goalpost[2] left and right goalpost Crossbarendpoint CrossbarEndpointH, witdth, higth,

Goal Recognizer

• GT2005GoalRecognizer(colorClass, ImageProcessorInterfaces, ColorCorrector, ImageInfo)• notifyAboutNewImage(), notifyAboutFlags(), notifyAboutFinish(),• notifyAboutNewScanlin(vector2 scanLinestart)…• inspectPixl(vector2 point, colorClass)• inspectNeigborhood(point)• analyzeGoal(startpoint)• analyzeGoalPost(..), • scanCrossBar(…)• detectEdgeTwice()• detectEdge()• scanAlongLine(..)• scanOnImageBorder(..)• detectGreanBelowGoalPost(..)• nearImageBorder(..)? returns true if the point is within one pixel distance to the image border• mergeFragments(bool * deletedHypothesises)• interprestResults(..)• publishResults(..)• detectFreePartOfGoal(..)• lockArea(…)• calculteLockedPixels(..) check flag intersection, calculate locked pixels…

Goal Recognizer Collaboration

Goal Recognizer Includes

Ball Specialist

• Ball Specialist find a single ball in an image, • searchBall searches for the ball in the image, starting from the

specified point• getSimilarityToOrange returns the similarity of the given color

to orange• contains class BallPoint to represents a ball point • whether this point atBorder, greenClose, yelloClose, hardedge,• contains class BallPointList (list of ball points (maximum

number))• This class has scanforBallPoints which scan for the ball starting

at a• Given trigger point.

Ball Specialist

• Also contains findEndOfBall which finds the end of the ball• Also createBallPerceptLevenbergMarqurdt tries to calculate the ball

Percept by using the Levenberg-Marquardt algorithm. The function fails if less than 3 points are available.

• Also checkIfPointsAreInsideBall checks if a list of points is inside a given circle

• Also calculateDeviationOfBallPoints calculate the deviation of the points from the circle

• The function addBallPercept checks whether a ball percept is plausible and will add it if so.

• It gets as input image, cameraInfo, colorTable, cameraMatrix, prevCameraMatrix, center, radius,

• considerBallPoints this function calculates the factor durabilityOfBallPoints that is needed to calculate reliability for the percept.

• calculateReliablility calculates the reliability of the ball percept.

Ball Specialist

Ball Specialist

Ball Specialist

GT2005BeaconDetector

Beacon Detector

Beacon Detector

Beacon Detector

• Execute() executes the beacon detection• analyzeColorTable() gains information about pink from

the current color table.• Addcandidate() add pink run to the list of current

candidate.• scanForPink() scan along a line• scanForBeaconPart()• clusterPinkBeaconParts() cluster pink elements to find

the pink beacon parts.• analyzeBeancon() tries to detect a beacon near a pink

part• scanForBeaconEdges() looks for the vertical edges and

the color type of a beacon

Beacon Detector

• This class also check from number of scanlines above and below the horizon.

• horizontalOffsetModifier: the growth factor of the distance between two scan lines.

• ClusteringDistanceTolerance: the maximum distance between the merged runs.

• clusteringAspectRatio: The maximum verticalDistance of scanlines to be clustered over the estimated merged horizontal distance (half beacon aspect ratio is 1:1)

• projectionAspectRatio: The minimum value for the ratio of the 2 dimensions of the pink part of the beacon,

• to be used for projection on the unknown colored part.• minFlageConfidence: A confidence threshold used to determine if a

target beacon, whose type is not completely clear, can be accepted or not.

• FlagSpecialist…

Edge Specialist

• The EdgeSpecialist finds a line- and border-edges in an image

• checkpoint(..) check point in camera-coordinates with given color on scanline if interesting changes

• addCandidate(..) add a point in camera-coordinates which is a candidate for an edge point

• getEdgesPercept(...) searches for the edges based on the points and return edge-percepts from those .It gets as input cameraMatrix and prevCameraMatrix and the image, returns the percept.

Edge Specialist

Edge Specialist

Player Specialist

• Execute() executes the specialist.• detectRedRobot(), detectBlueRobots() search for more

robot properties• findRed/BlueFootPointYaxis() finds the foot point of a

robot leg. To compare the results the Y-axis is used.• clusterRobotLinesPercept() clusters the linespercepts in

different robots. Maximum 4 robots and 30 pixel space between them.

• checkForWhiteLineBetweenRed/Blue(..) check if the line between 2 points is mostly white or accepted color

• inspectColorArea(position,direction) inspect a color quad of the color proportion.

Player Specialist

Player Specialist

GT2005LineFinder DeterministicApproach

• considerLinePoint(pointOnline, normalToline) add a linePoint for later consideration• execute(…) calculates lines and crossing out of the given linePoints• the found information are stored in linePercept.• Another overlapped method considered given information about the center circle• getNumberOflines(..) returns the number of found lines.• getLine(..) returns the line by number, • findLineFragments() calculates line fragments out of the given LinePoints.• findLines(..) Calculate lines out of the previously calculated line fragments.• findIntersections(..) Calculates crossings out of the previously calculated lines.• AddCrossingPercept(..) Adds the crossing to the linesPercept including some characteristics

found by additional scanning• handleCenterCircle(…) Filters out some line fragments, that may be caused by a center

circle. • addCenterCirclePercept(…) writes the centerCircle (if found by one of the attempts) to the

linesPercept• linesPerpendicularOnField(..)? Very rough calculation if lines are perpendicular on the field

(used for validating crossing)• calculateLineOnField(…) calculates the projected line on the field• doVerificationScan(..) verify the projected line on the field• doVerificationScanForCircle(..) verifies if the found circle really is one. • LinePoint(pointOnline,normaltoLine,belongsToLineNo) Structure, • LineFragment(base,normal,start,end,avergagestep,numberofPoints) Structure

GT2005CenterCircleFinder

• addCandidate(..) candidates which are inside the are of interest, will be added to the array candidatePoints

• determineCirclePoint(..) uses Hough-Transformation, in order to determine the midpoint of the center-circle

• getCircle(..)?• circle()?• transformArrayToField(...) transforms the indices of the array houghSpace to

corresponding field coordinates.• transformfromFieldToArray(…) transform the field-position inside the area of

interest to the corresponding array-index.• checkCircleMidpoint2(…) same as checkCircleMidpoint, but with more than one

candidate.• scanSurrrounding(…)?• Scan(…)• cameraMatrix and image will only be used in order to transform the results from

field-coordinates to image-coordinates,• which will display the result.

Players Percept

• Contains class SinglePlayersPercept which contains information about a single perceived robot.

• offsetOnField : offset to the robot, relative to own robot• directionOnfield: direction of the perceived robot• positionInImage: position of the robot in the image• orientation• validitiy: The validitiy of this percept.• Class PlayersPercept is a collection of singlePlayerPercept for

red and blue dressed robots• addRedPlayer(…) adds a red player percept• addBluePlayer(…) • redPlayers[], bluePlayers[],

numberOfRedPlayers,numberOfBluePlayers, frameNumber

Players Percept

BallPercept

• Add(…) The function adds a seen ball to the percept• addHighRes(…) adds a seen ball to the percept, specifying its

center and radius in image cords and additionally its reliability• ballWasSean?• OffsetOnField: Ball offset based interpolated between size

based and bearing based.• bearingBasedOffsetOnField: Ball offset based on intersection

with field plan.• sizeBasedOffsetOnField: Ball offset based on the size in the

image.• centerInImage: The center of the ball in image coordinates• radiusInImage: The center of the ball in image coordinates• reliability: The reliability of the percept,, frameNumber• mulitiplePercepts<MultipleBallPerceptList>[] array stores the

multiple ball percepts ordered by reliability.

Ball Percept

Landmarks Percept

• Contains class conditional Boundary: represents a rectangular landmark boundary, it also encodes which edges of the boundary touch the image border.

• addX(),addY()The function adds a point to the boundary

• isOnBorder(..)? return the specified edge touch the image border

• Contains Class Flag which extends conditionalBoundary

• pinkAboveYellow, pinkAboveSkyblue, • yellowAbovePink, skyblueAbovePink

Landmarks Percept

• Type, position, distance, angle, distanceValidity and angle validity.• Contains Class Goal which extends ConditionalBoundary• Color,leftpost, rightpost, distanceValidity• Class LandMarksPercept• Flags[4]• numberofFlags (number of actually stored flag in array)• goals[2]• numberOfGoals• viewAngle: The estimated viewing angle in field cords• viewAngleValid? Tells the self locator if the view angle is valid• cameraOffset relative to position of the robot’s neck• addFlag(..)• estimateOffsetForFlags(.) calculates the distance and angle for each flag• addGoal(..) adds a goal to the goal array• estimateOffsetAndValidatesForGoal(..) calculate distance and angle for

each goal

Lines Percept

• The class represents a percepted line on the field with its type and a Vector of points belon

Obstacle Percept

• The class represents perceived obstacles on the field

• Cotains class FreePartOfGoal– Which has method setFreePartOfGoal(..)

Players Locator

• Contains class PlayerLocatorInterfaces• RobotPose, estimated postion of the robot• teamMessageCollection, teamMessages from the other robots• odemetryData, odometry data that was calculated by the motion

modules• gtCamWorldState, The worldstate generated by the GTCam • ballModel, the ball model of the ball locator, it is used by the particle

system to propagate the players position • PlayersPercept (input)• PlayerPoseCollection The player positions to be calculated• playersModel, • passCorridorCollection, the available pass corridors• playersModel, the players model which hold the

information about the opponent players.• playersPercept, the detected players

Ball Locator

• This class contains a ballLocator implementation using particle filters

• measurementUpdate(…) to update position and velocity separately,

• First the positions are updated and the estimated ball position is calculated

• And this information is used to calculate the velocities.• setBallSymbols() sets the state of the ball in the BallSymbols• timeChange: the time between the last and the current frame (s):• dFieldDiagonalLength: The maximum length possible for two

points on the field• framesNoBallSeenThreshold: Some constant values which might

evolved.

Ball Locator

• ballX/Y/P,ballVX/Y/P, the estimated ball position and velocity with the calculated probability

• getTimeFactor() This functions returns the factor by which the probability of the particle will be decreased depend on the time which the ball was not seen.

• currentSystemTime The current system time: (s)• noNonsenseParticles(): This function eliminates particles with

nonsense ball positions• isNonSensePos: Determine nonsense ball positions• initilizeParticles(..) A function that initializes particles depending on the

position where the ball will be placed at (for example kickoff position).• calculateDistanceValue(…) calculates depending on the distance to a

percept the approximative error.• calculatePanningVelocityValue(..) calculates depending on the panning

velocity the approximative error• calculateRobotSpeedValue(…)

GT2005SelfLocator

• Contains class cell which represents a cell in a cube that is used to to determine the largest sample cluster.

• Count: the number of samples in this cube• First: the first sample in this cube• sampleSet: the sample set• teamColorBlue?• linePointZAngleMotionDependentVarience• Angles Truest, center circle trust, center circle orientation angle trust• Flag angle trust, goal angle trust, all for Y and Z• Last odometry (2): the last odometry, used to calculate the

delta_odometry• Timestamp• ObservationUpdateDone? A flage indicating if an observation update

was done during the• Current run of execute

GT2005SelfLocator

• averagePerceptTypeProb: the average probability for each perceptType and all samples• sampleTempleteGenerator: encapsulates the template generation• lineCrossingTable: • eigenVec0, eigenVec1: eigenvectors of particle distribution covariance matrix• varienceCovarianceMatrix• stdDevRot, averageX/Y/l0/l1, • eigenSwap, averageRot• Gaussian(d) the function distributes the parameter in a Gaussian way• D: is a value that shall be distributed, return a transformation of d according to a

Gaussian• motionUpdate() updates the samples by the odometry offset, • input odometry: the motion since the last call to this function• updateByFlag(flagfieldposition,sideofFlag) the function updtes the samples by a signle

edge of a flag recognized• updateByGoalPost(…) The function updates the samples by a single goal post recognized• landmarksObservationUpdate(landmarkspercept) the function updates the samples by the • recognized landmarks (goal, flags etc…), triggers updateByFlag and

UpdateByGoalPost

GT2005SelfLocator

• updateByCenterCircle(…) observationUpdate by the center circle• updateByPoint(…) observationUpdate using the linecrossing percept• lineObservationUpdate(…) the function updates the samples by recognized lines• calcAveragePerceptTypeProbabilities(…) calculates the average possibility for each perceptType• and all samples and returns the product over all averages, this function return product over• all average perceptype-probabilities• resample() redistribution of the sampelSet according to the probabilities of the samples• calcDistributionValidityBySandardDeviation() calculates the localization validity by• standard deviation.• calcDistributionValidityByEntropy() calculates the localization validiy by entropy.• calcPoseFromSubCube(…) The function calculates a pose by averaging the sample poses in a sub cube of

the• pose-room.• calcPose(…) the function determines the most probable pose from the sample distribution• updteVariancesBySpeed the function calculates the variances and trust values from the current speed.• calculateTrust(…) the function calculates the trust values from variance and weight parameters.• resetSamples(…) reset all samples to random positions (or to a given position!)• resetSamplesWhenPenalized(…) reset all samples when robot is penalized• 25% samples are placed on each side of the field at the center line respectively,• 50% at random positions

Obstacle Locator

• relativeOrientation• obstacles[]• timestamps[]• lastOdometry<OdometryData>• odometry<Pose2D>• headTiltClipPSD: head tilt angle below which psd percepts are

ignored.• Execute(); • usePSD?• useLinesPercept?• useObstaclesPercep?• useAging?• setObstacleMode(…)• moveObstaclesByOdometry()

Obstacle Locator

• addLinesPercept();• addObstaclesPercept();• addPSDPercept();• UpdateMode{overwrite, extend, limit}• addObstaclePoint(..)• determineFreePartsOfGoal();• determineSeenGoals();• determineNextFreeTeammate();• lastTimeFreePartOfGoalWasDetermine[2]• angleToFreePartOfGoal[2]• angleToSeenGoal[2]• distanceToSeenGoal[2]• timeOfSeenGoal[2]• widthOfFreePartOfGoal[2]• distanceToFreePartOfGoal[2]

SAIF AHMADSensor Data Processing

Outline

• SensorDataBuffer

• SensorDataProcessor

• CollisionDetector

• BodyPercept

• PSDPercept

• RobotStateDetector

SensorDataBuffer

SensorDataBuffer• A buffer for sensor data sets, containing all frames received at the same time.

• Maximum number of frames in the buffer (= 16)

• int SensorDataBuffer::numOfFrames Number of frames in the buffer.

• const SensorData& lastFrame() const Returns pointer to the most recent SensorData

SensorDataBuffer (Contd….)

SensorDataProcessorSensorDataProcessor• An abstract class that defines a processor for raw sensor data.• Inputs - ActualJointAngles and ActualSensorData • Outputs – BodyPercept, PSDPercept and CameraMatrix• CameraMatrix - Matrix describing transformation from neck joint to camera• Actions to be taken when one of the switches is pressed.

CollisionDetector

Collision Detector• If a robot collides with an obstacle or other robot, it is stopped

•InterfacesSensorDataBuffer: The SensorDataBuffer

MotionInfo: The motions that are executed by the Motion process

CollisionPercept : The JointState to be generated

CollisionDetector (Contd….)

BodyPercept

BodyPercept• Represents the robots body percept

• The percept consists of current switches and a variable containing whether the robot stands or is crashed.

States current state of robot position, if crashed or standing

Switches value representing pressed switches bits according to switches enum

MouthStates The state of the mouth (open or closed)

bodyPSDHighValue Flag set to true if PSD has a high value indicating something in front of the robot.

bodyPSDDistance The measured distance (0 - 5 cm) of objects in front of the body PSD.

BodyPercept (Contd….)

PSDPercept

PSDPercept• Another interface of the SensorDataProcessor module

• Contains all single PSD spots perceived in one frame

• Checks if the object is more than 90 cm away. If true the measured distance is then clipped to 90 cm.

• The PSDPercept is only valid if motion was stable

RobotStateDetector

• The Base class for robot state detection.

• Robot state detectors detect button messages and whether the robot is crashed.

HASAN AL-AMRIInput to Behavior

Presentation

A short description of the following modules: RobotPose PlayerPoseCollection RobotState ObstaclesModel BallModel

Overview

InOut RobotStateVector3

Common

Debugging ObstaclesModel

Pose2D

RobotPose

Player

PlayerPoseCollection

SystemCall

RobotPose

Uses functions defined in Pose2D, and adds to them functions that test the validity of the robot pose.

Functions in Pose2D: Set rotation angle, generate random poses, translate Return angle of rotation, sine and cosine

Set/Get functions: Frame number, timestamp, position variance, validity Calculate movement, standard deviation, ..

PlayerPose

This class provides functionality for identifying the pose of other robots and not the robot itself. This class makes use of functions defined in Pose2D class. This class offers a low level player pose identification, that are independent of the player's team.

Set/Get functions:

Frame number, timestamp, position variance, validity

Variance in (Major\Minor)direction, speed, player number..

PlayerPoseCollection:

This class provides functionality for identifying the pose of other robots and not the robot itself. This class makes use of functions defined in Pose2D class. This class offers pose info about all the players and classify them by team.

RobotState

A class describing detected button messages and whether robot crashed or not.

Contains two enums: States: undefined, standing, picked up, roll right, roll left

MouthStates: open, closed

Set/Get functions: Frame number, state, button pressed, button time, button duration

Collision, something in front of chest, odometry disturbance, state name

ObstaclesModel

Describes the distance to obstacles around the robot.4 enums:

Direction: (back, front, left, right, ...) SearchDirection: (right, left, right and left) number of sectors and the max distance own goal and opponent goal

Set/Get functions: Angle of sector, angle of next free sector (right/left), minimal distance in range distance in major direction, percentage of low distance obstacles in range the distance to the closest obstacle in the corridor specified by angle and width

BallModel

Contains the modelled knowledge about the ball. If a ball locator calculates a ball position and velocity

probability by itself it can set this variable to true and set the variable positionProb and velocityProb and the functions getPositionValidity and getSpeedValidity will return those values.

Set/Get functions: Frame number: Sets the frame number of the image this model was created

from. Known position: Returns a "known" ball position relative to the field. Known ball state: The state of the ball estimated from own observations. Time since last known: Returns the time since the ball was seen or

communicated.

Overview of how BehaviorControl

communicates with the XABSLEngine

For behavior control the German Team uses the Extensible Agent Behavior Specification Language XABSL.

The goal of this presentation is to show how Bahvior Control interacts with the XABSL Engine.

The Classes involved

•BehaviorControl•BehaviorControlInterfaces•BehaviorControlSelector•Xabsl2BehaviorControl•Xabsl2BehaviorControlAgentInterface•GT2005BehaviorControl

BehaviorControl Class

Defined in BehavoirControl.h

Its constructor interfaces with the modules BehavoirControl includes, and passes them to the Xabsl2BehavoirControl class.

BehaviorControlInterfaces Class

Defined in BehaviorControl.h

Implementation of class BehaviorControl. Interfaces with all modules.

Defines one constructor that interfaces with the input modules (RobotState, ObstaclesModel, RobotPose, BallModel, PlayerPoseCollection) and output modules (SoundRequest, LED Request, HeadControlMode, MotionRequest).

BehaviorControlInterfaces Class

BehaviorControlSelector Class

Defined in BehavoirControlSelector.h

Selects the behavior control module, based on the passed ModuleHandler and BehaviorControlInterfaces parameters, and returns a solution request of type Xabsl2BehaviorControlAgentInterface.

Implements ModuleSelector, which allow to switch between different solutions for a modules.

Xabsl2BehaviorControl Class

Defined in Xabsl2BehavoirControl.h

The base class for all BehavoirControl modules that use the Xabsl2Engine.

Constructor parameters:

interfaces: The paramters of the BehaviorControl module.

Id: The id of the Xabsl2Engine.

Xabsl2BehaviorControlAgentInterface Class

Defined in Xabsl2BehaviorControl.h

Allows to register the same Xabsl2BehaviorControl instance more than once at a ModuleHandler to be able to switch between different agents using the GT Module mechanism.

GT2005BehaviorControl Class

Defined in GT2005BehavoirControl.h

A Behavior based on the Xabsl2Engine that is used by GermanTeam for the RoboCup 2005

Registers symbols and basic behavior at the XABSL Engine, implements GTXabsl2EngineExecutor and executes the modules.

The registered symbols are for all input and output module parameters in the BehaviorControlInterfaces constructor.

GT2005BehaviorControl Class

KHALID AL-HAWAJOutput from Behavior

XABSL Active Model

BehaviorControl

BehaviorControl Interfaces

SoundData MotionRequest

HeadControlModeLEDRequest

Internal Model

BehaviorControl

XABSL

Control

Other Models

BehaviorControlInterfaces

XABSL

XML

.

.

DATA.. XABSL Engine

Control

Efficacy

XML

.

.

.

.

.

DATA......

XABSL for Head

XABSL for LED

XABSL for Motion

.

.

.

.

.

.

Overall Engine

Requests And Modes

BehaviorControl

BehaviorControl Interfaces

SoundData MotionRequest

HeadControlModeLEDRequest

Interaction

MotionRequest

MotionControl

LEDRequest

LEDControl

SoundRequest

SoundData

HeadControlMode

HeadControl

SoundRequest

.

.hurtdog

howl

growl

startMe

ring

space

.

.

HeadControlMode

HeadControlMode

HybridConstantDynamicDirected

BlinkingMode and Commands

LEDRequest

LEDRequest

RedPair TailLED

MotionRequest

MotionRequest

TailRequest SpecialActionRequest WalkRequest

ZUHAIR KHAYYATMotion

HeadControl.h

Module.h

OdometryData.h

RobotConfiguration.h

HeadMotionRequest.h

SensorDataBuffer.h

HeadControlMode.h

PIDData.h

MotionInfo.h

GT2005MotionControl.h

MotionControl.h

MotioStabilizer.h

WakeUpEngine.h

JointDataBuffer.h

BodyPoster.h

GT2004ParameterSet.h

GT2005Parameters.h

DebugData.h InOut.h

Joindata.h Streamble.h

SensorData.h

GT2005DebugData.h

WalkingEngine.h

ModuleHandler.h

InvKinWalkingParametyers.h

Motion Control

Two classes available in MotionControl.h:

1) MotionControlInterfaceso Interface to any module that requests a motion

2) MotionControlo General class for all motion control modules.

MotionControlInterfaces class

This class needs the following in its constructor:

1) Frame number in long formato It controls the number of frames taken from the sensors of pushed to

joints in each run.

2) Motion request weapped in MotionRequest object.

3) Head Request wrapped in HeadMotionRequest

4) Instance of SensorDataBuffer object

5) Instance of JointDataBuffer object

6) Instance of BodyPosture objecto class represents the robots body percept if the robot stands or is

crashed

7) Instance of InvKinWalkingParameters object

8) Instance of MotionInfo object

9) Instance of ObstaclesModel object

MotionControl class

The class extends the following classes:o Moduleo MotionControlInterfaceso RobotDimentions

The constructor needs an instance of MotionControlInterfaces.

Each time an instance of the class is created, the dimensions are being passed.

MotionControl is responsible for setting values for the joints of the robot.

Head Control

Two classes available in HeadControl.h

1) HeadControlInterfaceso Interface to HeadControl module

2) HeadControlo General class for all HeadControl modules

HeadControlInterfaces class

This class needs the following in its constructor:

1) Frame number in long formato It controls the number of frames taken from the sensors of pushed to

joints in each run.

2) Instance of SensorDataBuffer object

3) Instance of CameraMatrix object

4) Instance of BodyPosture objecto class represents the robots body percept if the robot stands or is

crashed

5) Instance of LandmarksState object

6) Instance of RobotState object

7) Instance of MotionRequest object

8) Instance of MotionInfo object

9) Instance of HeadControlMode

10)Head motion request wrapped in HeadMotionRequest object

HeadControl class

The class extends the following classes:o Moduleo HeadControlInterfaceso RobotDimentions

The constructor needs an instance of HeadControlInterfaces.

Each time an instance of the class is created, the dimensions are being passed.

HeadControl calculates a new head motion which has to be set by the motion module based on the desired head mode and the current collection of percepts stored in the world state as well as the current sensor information .

HeadMotionRequest.h

HeadMotionRequest represents head motion request

Possible head motions are as following:o Tilt heado Pan heado Roll heado Move mouth

InvKinWalkingParameters.h

Walking engine based on calculation of rectangular foot movement and inverse kinematics

Set parameters for: Leg height Leg width Speed in X and Y Maximum step in X and Y

Stores speed of each leg in x-axis and y-axis

Several foot mode: Rectiangle Circle Rounded

InvKinWalkingEngine.h

calculate relative foot position for one leg

calculate current joint data values

When motion is executed, parameters are passed to MotionStabilizer.h for optimizing.

Led Control

Implements an interface for LED control

Parameters:o Frame Numbero LED Requesto Wireless LAN statuso LED Value

Implements also a general class for LED control

Sound Control

Class for interfacing sound control and class for generality

Can play ready stored sounds:o Testo Barko Ring

Sound presentation in PCM which is usually a wav file

Other important files

MotionStabilizer.ho Stabilize Robot by modifying motion values.o Insure that no other force affects the robot rather than the robot

InOut.ho Streaming to jointso Streaimg from sensors

Streamable.h:o Handle direct streeming to joints

OdometryData.h:o Approximate movement of overall robot

Conclusions

• GT2005 has some classes that platform dependent and others are independent

• GT2005 code is huge but well structured

• Vision and localization could be extracted and used separately with not easy work.

• Not every relationship between objects are shown in the main diagram

• There is a lot of unnecessary redundancies for Kondo but might be useful for them.