#include <kickeffector.h>
Inheritance diagram for KickEffector:
Public Member Functions | |
KickEffector () | |
virtual | ~KickEffector () |
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 | |
virtual void | OnLink () |
setup the reference to the ball body node | |
virtual void | OnUnlink () |
remove the reference to the ball body node | |
void | SetKickMargin (float margin) |
set the kick margin (the area within objects are kickable) | |
void | SetForceFactor (float force_factor) |
Set the force factor. | |
void | SetTorqueFactor (float torque_factor) |
Set the torque factor. | |
void | SetSteps (int steps) |
Set the number of steps the force is applied. | |
void | SetNoiseParams (double sigma_force, double sigma_theta, double sigma_phi_end, double sigma_phi_mid) |
Set the noise parameters. | |
void | SetMaxPower (float max_power) |
Set the maximum kick power. | |
void | SetAngleRange (float min, float max) |
Set the latitudal angle range. | |
Protected Types | |
typedef boost::shared_ptr< salt::NormalRNG<> > | NormalRngPtr |
Protected Attributes | |
boost::shared_ptr< oxygen::Body > | mBallBody |
reference to the body node of the ball | |
boost::shared_ptr< Ball > | mBall |
reference to the body node of the ball | |
boost::shared_ptr< oxygen::AgentAspect > | mAgent |
reference to the agent aspect | |
NormalRngPtr | mForceErrorRNG |
random number generator for the error distribution of the applied force | |
NormalRngPtr | mThetaErrorRNG |
random number generator for the error distribution of the theta | |
Private Attributes | |
float | mKickMargin |
the margin where objects can be kicked | |
float | mPlayerRadius |
radius of the player | |
float | mBallRadius |
radius of the ball | |
float | mForceFactor |
force factor | |
float | mTorqueFactor |
force factor | |
float | mMaxPower |
the maximum kick power | |
float | mMinAngle |
the minimal kick angle | |
float | mMaxAngle |
the maximum kick angle | |
int | mSteps |
number of simulation steps for applying kick force | |
double | mSigmaPhiEnd |
sigma for angle error at the end of the range (latitudal angle) | |
double | mSigmaPhiMid |
sigma for angle error in the middle of the range (latitudal angle) |
Definition at line 32 of file kickeffector.h.
|
Definition at line 101 of file kickeffector.h. |
|
Definition at line 35 of file kickeffector.cpp. |
|
Definition at line 45 of file kickeffector.cpp. |
|
constructs an Actionobject, describing a predicate
Implements oxygen::Effector. Definition at line 137 of file kickeffector.cpp. References oxygen::Predicate::AdvanceValue(), oxygen::Predicate::begin(), zeitgeist::Object::GetLog(), GetPredicate(), and oxygen::Predicate::name. Here is the call graph for this function: ![]() |
|
returns the name of the predicate this effector implements.
Implements oxygen::Effector. Definition at line 42 of file kickeffector.h. Referenced by GetActionObject(). |
|
setup the reference to the ball body node
Reimplemented from zeitgeist::Leaf. Definition at line 176 of file kickeffector.cpp. References SoccerBase::GetBall(), SoccerBase::GetBallBody(), SoccerBase::GetBallCollider(), zeitgeist::Object::GetLog(), zeitgeist::Leaf::GetParent(), mAgent, mBall, mBallBody, mBallRadius, and mPlayerRadius. Here is the call graph for this function: ![]() |
|
remove the reference to the ball body node
Reimplemented from zeitgeist::Leaf. Definition at line 212 of file kickeffector.cpp. References mAgent, mBallBody, mForceErrorRNG, and mThetaErrorRNG. |
|
realizes the action described by the ActionObject
Implements oxygen::Effector. Definition at line 50 of file kickeffector.cpp. References salt::g2PI, salt::gAbs(), salt::gArcTan2(), salt::gCos(), salt::gDegToRad(), zeitgeist::Object::GetLog(), salt::gMax(), salt::gMin(), salt::gSin(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Length(), mAgent, mBall, mBallBody, mBallRadius, mForceErrorRNG, mForceFactor, mKickMargin, mMaxAngle, mMaxPower, mMinAngle, mPlayerRadius, mSigmaPhiEnd, mSigmaPhiMid, mSteps, mThetaErrorRNG, and mTorqueFactor. Here is the call graph for this function: ![]() |
|
Set the latitudal angle range.
Definition at line 263 of file kickeffector.cpp. References zeitgeist::Object::GetLog(), mMaxAngle, and mMinAngle. Here is the call graph for this function: ![]() |
|
Set the force factor. The kick power vector is multiplied by this factor. Definition at line 239 of file kickeffector.cpp. References mForceFactor. |
|
set the kick margin (the area within objects are kickable)
Definition at line 221 of file kickeffector.cpp. References mKickMargin. |
|
Set the maximum kick power.
Definition at line 257 of file kickeffector.cpp. References mMaxPower. |
|
Set the noise parameters. If used, the noise values are normally distributed around 0.0. Using this method, the sigmas of the distributions can be set. Values <= 0 mean that no noise will be added.
Definition at line 227 of file kickeffector.cpp. References mForceErrorRNG, mSigmaPhiEnd, mSigmaPhiMid, and mThetaErrorRNG. |
|
Set the number of steps the force is applied.
Definition at line 251 of file kickeffector.cpp. References mSteps. |
|
Set the torque factor. The kick torque vector is multiplied by this factor. Definition at line 245 of file kickeffector.cpp. References mTorqueFactor. |
|
reference to the agent aspect
Definition at line 108 of file kickeffector.h. Referenced by OnLink(), OnUnlink(), and Realize(). |
|
reference to the body node of the ball
Definition at line 106 of file kickeffector.h. |
|
reference to the body node of the ball
Definition at line 104 of file kickeffector.h. Referenced by OnLink(), OnUnlink(), and Realize(). |
|
radius of the ball
Definition at line 121 of file kickeffector.h. |
|
random number generator for the error distribution of the applied force
Definition at line 111 of file kickeffector.h. Referenced by OnUnlink(), Realize(), and SetNoiseParams(). |
|
force factor
Definition at line 123 of file kickeffector.h. Referenced by Realize(), and SetForceFactor(). |
|
the margin where objects can be kicked
Definition at line 117 of file kickeffector.h. Referenced by Realize(), and SetKickMargin(). |
|
the maximum kick angle
Definition at line 131 of file kickeffector.h. Referenced by Realize(), and SetAngleRange(). |
|
the maximum kick power
Definition at line 127 of file kickeffector.h. Referenced by Realize(), and SetMaxPower(). |
|
the minimal kick angle
Definition at line 129 of file kickeffector.h. Referenced by Realize(), and SetAngleRange(). |
|
radius of the player
Definition at line 119 of file kickeffector.h. |
|
sigma for angle error at the end of the range (latitudal angle)
Definition at line 135 of file kickeffector.h. Referenced by Realize(), and SetNoiseParams(). |
|
sigma for angle error in the middle of the range (latitudal angle)
Definition at line 137 of file kickeffector.h. Referenced by Realize(), and SetNoiseParams(). |
|
number of simulation steps for applying kick force
Definition at line 133 of file kickeffector.h. Referenced by Realize(), and SetSteps(). |
|
random number generator for the error distribution of the theta
Definition at line 113 of file kickeffector.h. Referenced by OnUnlink(), Realize(), and SetNoiseParams(). |
|
force factor
Definition at line 125 of file kickeffector.h. Referenced by Realize(), and SetTorqueFactor(). |