Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::MotionCommand Class Reference

#include <KoduActionMotion.h>


Detailed Description

Definition at line 21 of file KoduActionMotion.h.

List of all members.

Public Member Functions

 MotionCommand ()
 Constructor #1.
 MotionCommand (const ShapeRoot &kTarget, float fwdSpeed, float trnSpeed)
 Constructor #2.
 MotionCommand (float fwdDist, float trnAngle, float fwdSpeed, float trnSpeed)
 Constructor #3.
 MotionCommand (const ShapeRoot &kTarget, float fwdDist, float trnAngle, float fwdSpeed, float trnSpeed)
 Constructor #4.
 MotionCommand (float fwdDist, float trnAngle, float fwdSpeed, float trnSpeed, bool driven)
 Constructor #5.
 MotionCommand (const MotionCommand &)
 Copy Constructor.
 ~MotionCommand ()
 Destructor.
MotionCommandoperator= (const MotionCommand &)
 Assignment operator.
bool operator== (const MotionCommand &)
 Equals operator.
bool operator!= (const MotionCommand &)
 Not equals operator.
float getForwardSpeed () const
 Returns the forward speed.
float getTurnSpeed () const
 Returns the turning speed.
float getDistanceToTravel () const
 Returns the distance to travel in the x-direction.
float getTurningAngle () const
 Returns the angle to turn (in degrees).
bool isValid () const
 True if this is a feasible motion command.
bool targetObjectIsValid () const
 Returns if the shape reference is valid or not.
bool isDriven () const
const ShapeRoot & getTargetObject () const
 Returns the target object (if available).

Private Attributes

ShapeRoot targetObject
float dx
 How far the robot should move forward (units: mm).
float da
 How much the robot should turn (units: rads).
float forwardSpeed
 How fast the robot should move forward (units: mm/s).
float turnSpeed
 How fast the robot should turn (units: rads/s).
bool cmdDriven

Friends

class KoduActionMotion
std::ostream & operator<< (std::ostream &os, const MotionCommand &cmd)

Constructor & Destructor Documentation

MotionCommand::MotionCommand (  ) 

Constructor #1.

================================= Motion Command ================================= ///

Definition at line 15 of file KoduActionMotion.cc.

MotionCommand::MotionCommand ( const ShapeRoot &  kTarget,
float  fwdSpeed,
float  trnSpeed 
)

Constructor #2.

Definition at line 24 of file KoduActionMotion.cc.

MotionCommand::MotionCommand ( float  fwdDist,
float  trnAngle,
float  fwdSpeed,
float  trnSpeed 
)

Constructor #3.

Definition at line 33 of file KoduActionMotion.cc.

Kodu::MotionCommand::MotionCommand ( const ShapeRoot &  kTarget,
float  fwdDist,
float  trnAngle,
float  fwdSpeed,
float  trnSpeed 
)

Constructor #4.

MotionCommand::MotionCommand ( float  fwdDist,
float  trnAngle,
float  fwdSpeed,
float  trnSpeed,
bool  driven 
)

Constructor #5.

Definition at line 62 of file KoduActionMotion.cc.

MotionCommand::MotionCommand ( const MotionCommand kCommand  ) 

Copy Constructor.

Definition at line 53 of file KoduActionMotion.cc.

MotionCommand::~MotionCommand (  ) 

Destructor.

Definition at line 72 of file KoduActionMotion.cc.


Member Function Documentation

float MotionCommand::getDistanceToTravel (  )  const

Returns the distance to travel in the x-direction.

Definition at line 98 of file KoduActionMotion.cc.

Referenced by KoduInterpreter::MotionActionRunner::ExecuteMotionAction::ExecuteSimpleMotion::ExecuteSimpleWalk::doStart().

float MotionCommand::getForwardSpeed (  )  const

Returns the forward speed.

Definition at line 94 of file KoduActionMotion.cc.

const ShapeRoot & MotionCommand::getTargetObject (  )  const

Returns the target object (if available).

Definition at line 110 of file KoduActionMotion.cc.

Referenced by KoduInterpreter::MotionActionRunner::ExecuteMotionAction::ExecuteSimpleMotion::FindMotionTarget::doStart().

float MotionCommand::getTurningAngle (  )  const

Returns the angle to turn (in degrees).

Definition at line 100 of file KoduActionMotion.cc.

Referenced by KoduInterpreter::MotionActionRunner::ExecuteMotionAction::ExecuteSimpleMotion::ExecuteSimpleTurn::doStart().

float MotionCommand::getTurnSpeed (  )  const

Returns the turning speed.

Definition at line 96 of file KoduActionMotion.cc.

bool MotionCommand::isDriven (  )  const
bool MotionCommand::isValid (  )  const

True if this is a feasible motion command.

Definition at line 102 of file KoduActionMotion.cc.

Referenced by KoduInterpreter::KoduConditionEvaluator::doStart().

bool MotionCommand::operator!= ( const MotionCommand kCommand  ) 

Not equals operator.

Definition at line 92 of file KoduActionMotion.cc.

MotionCommand & MotionCommand::operator= ( const MotionCommand kCommand  ) 

Assignment operator.

Definition at line 74 of file KoduActionMotion.cc.

bool MotionCommand::operator== ( const MotionCommand kCommand  ) 

Equals operator.

Definition at line 86 of file KoduActionMotion.cc.

bool MotionCommand::targetObjectIsValid (  )  const

Returns if the shape reference is valid or not.

Definition at line 106 of file KoduActionMotion.cc.

Referenced by KoduInterpreter::MotionActionRunner::ExecuteMotionAction::ExecuteSimpleMotion::CheckForValidTarget::doStart().


Friends And Related Function Documentation

friend class KoduActionMotion [friend]

Definition at line 76 of file KoduActionMotion.h.

std::ostream& operator<< ( std::ostream &  os,
const MotionCommand cmd 
) [friend]

Member Data Documentation

How much the robot should turn (units: rads).

Definition at line 82 of file KoduActionMotion.h.

Referenced by Kodu::KoduActionMotion::getMotionCommand(), getTurningAngle(), isValid(), operator=(), and operator==().

How far the robot should move forward (units: mm).

Definition at line 81 of file KoduActionMotion.h.

Referenced by getDistanceToTravel(), Kodu::KoduActionMotion::getMotionCommand(), isValid(), operator=(), and operator==().

How fast the robot should move forward (units: mm/s).

Definition at line 83 of file KoduActionMotion.h.

Referenced by getForwardSpeed(), and operator=().

How fast the robot should turn (units: rads/s).

Definition at line 84 of file KoduActionMotion.h.

Referenced by getTurnSpeed(), and operator=().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3