Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

PanTiltEffector Class Reference

#include <pantilteffector.h>

Inheritance diagram for PanTiltEffector:

Inheritance graph
[legend]
Collaboration diagram for PanTiltEffector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PanTiltEffector ()
virtual ~PanTiltEffector ()
virtual bool Realize (boost::shared_ptr< oxygen::ActionObject > action)
 realizes the action described by the ActionObject
virtual std::string GetPredicate ()
 returns the name of the predicate this effector implements.
virtual boost::shared_ptr<
oxygen::ActionObject
GetActionObject (const oxygen::Predicate &predicate)
 constructs an Actionobject, describing a predicate
void SetMaxPanAngleDelta (unsigned char max_pan_angle)
 Set the maximum pan angle change.
void SetMaxTiltAngleDelta (unsigned char max_tilt_angle)
 Set the maximum tilt angle change.
void SetSigma (float sigma)
 Set the angle error parameter.

Protected Types

typedef boost::shared_ptr<
salt::NormalRNG<> > 
NormalRngPtr

Protected Member Functions

virtual void OnLink ()
 setup the reference to the agents body node
virtual void OnUnlink ()
 remove the reference to the agents body node

Protected Attributes

boost::shared_ptr< oxygen::TransformmTransformParent
 the reference to the parent transform node
boost::shared_ptr< oxygen::BodymBody
 the reference to the parents body node
boost::shared_ptr< AgentStatemAgentState
 a reference to the agent state
NormalRngPtr mActuatorErrorRNG
 random number generator for the error distribution of pan/tilt actions
unsigned char mMaxPanAngleDelta
 The maximum absolute value of the pan angle change.
unsigned char mMaxTiltAngleDelta
 The maximum absolute value of the tilt angle change.

Detailed Description

Definition at line 30 of file pantilteffector.h.


Member Typedef Documentation

typedef boost::shared_ptr<salt::NormalRNG<> > PanTiltEffector::NormalRngPtr [protected]
 

Definition at line 75 of file pantilteffector.h.


Constructor & Destructor Documentation

PanTiltEffector::PanTiltEffector  ) 
 

Definition at line 33 of file pantilteffector.cpp.

References SetSigma().

Here is the call graph for this function:

PanTiltEffector::~PanTiltEffector  )  [virtual]
 

Definition at line 40 of file pantilteffector.cpp.


Member Function Documentation

shared_ptr< ActionObject > PanTiltEffector::GetActionObject const oxygen::Predicate predicate  )  [virtual]
 

constructs an Actionobject, describing a predicate

Implements oxygen::Effector.

Definition at line 108 of file pantilteffector.cpp.

References oxygen::Predicate::AdvanceValue(), oxygen::Predicate::begin(), zeitgeist::Object::GetLog(), GetPredicate(), and oxygen::Predicate::name.

Here is the call graph for this function:

virtual std::string PanTiltEffector::GetPredicate  )  [inline, virtual]
 

returns the name of the predicate this effector implements.

Implements oxygen::Effector.

Definition at line 40 of file pantilteffector.h.

Referenced by GetActionObject().

void PanTiltEffector::OnLink  )  [protected, virtual]
 

setup the reference to the agents body node

Reimplemented from zeitgeist::Leaf.

Definition at line 135 of file pantilteffector.cpp.

References SoccerBase::GetAgentState(), SoccerBase::GetBody(), SoccerBase::GetTransformParent(), mAgentState, mBody, and mTransformParent.

Here is the call graph for this function:

void PanTiltEffector::OnUnlink  )  [protected, virtual]
 

remove the reference to the agents body node

Reimplemented from zeitgeist::Leaf.

Definition at line 143 of file pantilteffector.cpp.

References mActuatorErrorRNG, mBody, and mTransformParent.

bool PanTiltEffector::Realize boost::shared_ptr< oxygen::ActionObject action  )  [virtual]
 

realizes the action described by the ActionObject

Implements oxygen::Effector.

Definition at line 45 of file pantilteffector.cpp.

References salt::gAbs(), zeitgeist::Object::GetLog(), zeitgeist::Leaf::GetParent(), salt::gSign(), mActuatorErrorRNG, mBody, mMaxPanAngleDelta, and mMaxTiltAngleDelta.

Here is the call graph for this function:

void PanTiltEffector::SetMaxPanAngleDelta unsigned char  max_pan_angle  ) 
 

Set the maximum pan angle change.

The camera can pan to any angle, but the absolute pan angle used for one 'pan' action may be restricted. A maximum pan angle of 0 effectively disables panning, a value of 360 (or greater) means no restriction.

Parameters:
max_pan_angle the maximum pan angle (in degrees) for one action

Definition at line 151 of file pantilteffector.cpp.

References mMaxPanAngleDelta.

void PanTiltEffector::SetMaxTiltAngleDelta unsigned char  max_tilt_angle  ) 
 

Set the maximum tilt angle change.

Set the maximum absolute tilt angle change for one 'tilt' action.

Parameters:
max_tilt_angle the maximum tilt angle (in degrees) for one action

Definition at line 157 of file pantilteffector.cpp.

References mMaxTiltAngleDelta.

void PanTiltEffector::SetSigma float  sigma  ) 
 

Set the angle error parameter.

The error is normally distributed around zero.

Parameters:
sigma the sigma for the random number distribution

Definition at line 163 of file pantilteffector.cpp.

References mActuatorErrorRNG.

Referenced by PanTiltEffector().


Member Data Documentation

NormalRngPtr PanTiltEffector::mActuatorErrorRNG [protected]
 

random number generator for the error distribution of pan/tilt actions

Definition at line 85 of file pantilteffector.h.

Referenced by OnUnlink(), Realize(), and SetSigma().

boost::shared_ptr<AgentState> PanTiltEffector::mAgentState [protected]
 

a reference to the agent state

Definition at line 82 of file pantilteffector.h.

Referenced by OnLink().

boost::shared_ptr<oxygen::Body> PanTiltEffector::mBody [protected]
 

the reference to the parents body node

Definition at line 80 of file pantilteffector.h.

Referenced by OnLink(), OnUnlink(), and Realize().

unsigned char PanTiltEffector::mMaxPanAngleDelta [protected]
 

The maximum absolute value of the pan angle change.

Definition at line 88 of file pantilteffector.h.

Referenced by Realize(), and SetMaxPanAngleDelta().

unsigned char PanTiltEffector::mMaxTiltAngleDelta [protected]
 

The maximum absolute value of the tilt angle change.

Definition at line 91 of file pantilteffector.h.

Referenced by Realize(), and SetMaxTiltAngleDelta().

boost::shared_ptr<oxygen::Transform> PanTiltEffector::mTransformParent [protected]
 

the reference to the parent transform node

Definition at line 78 of file pantilteffector.h.

Referenced by OnLink(), and OnUnlink().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:39:42 2006 for rcssserver3d by  doxygen 1.4.4