Main Page   Class Hierarchy   Compound List   Compound Members  

ArActionDesired Class Reference

Class used to say what movement is desired. More...

#include <ArActionDesired.h>

List of all members.

Public Methods

 ArActionDesired (void)
 Constructor.

virtual ~ArActionDesired (void)
 Destructor.

virtual void setVel (double vel, double strength=MAX_STRENGTH)
 Sets the velocity (mm/sec) and strength. More...

virtual void setDeltaHeading (double deltaHeading, double strength=MAX_STRENGTH)
 Sets the delta heading (deg) and strength. More...

virtual void setHeading (double heading, double strength=MAX_STRENGTH)
 Sets the absolute heading (deg). More...

virtual void setMaxVel (double maxVel, double strength=MAX_STRENGTH)
 Sets the maximum velocity (+mm/sec) and strength. More...

virtual void setMaxNegVel (double maxVel, double strength=MAX_STRENGTH)
 Sets the maximum velocity for going backwards (-mm/sec) and strength. More...

virtual void setMaxRotVel (double maxVel, double strength=MAX_STRENGTH)
 Sets the maximum rotational velocity (deg/sec) and strength. More...

virtual void reset (void)
 Resets the strengths to 0.

virtual double getVel (void)
 Gets the translational velocity desired (mm/sec).

virtual double getVelStrength (void)
 Gets the strength of the translational velocity desired.

virtual double getHeading (void)
 Gets the heading desired (deg).

virtual double getHeadingStrength (void)
 Gets the strength of the heading desired.

virtual double getDeltaHeading (void)
 Gets the delta heading desired (deg).

virtual double getDeltaHeadingStrength (void)
 Gets the strength of the delta heading desired.

virtual double getMaxVel (void)
 Gets the desired maximum velocity (mm/sec).

virtual double getMaxVelStrength (void)
 Gets the maximum velocity strength.

virtual double getMaxNegVel (void)
 Gets the desired maximum negative velocity (-mm/sec).

virtual double getMaxNegVelStrength (void)
 Gets the desired maximum negative velocity strength.

virtual double getMaxRotVel (void)
 Gets the maximum rotational velocity.

virtual double getMaxRotVelStrength (void)
 Gets the maximum rotational velocity strength.

virtual void merge (ArActionDesired *actDesired)
 Merges the given ArActionDesired into this one (this one has precedence), internal. More...

virtual void startAverage (void)
 Starts the process of avereraging together different desireds. More...

virtual void addAverage (ArActionDesired *actDesired)
 Adds another actionDesired into the mix to average. More...

virtual void endAverage (void)
 Ends the process of avereraging together different desireds. More...

virtual void accountForRobotHeading (double robotHeading)
 Accounts for robot heading, mostly internal. More...

ArActionDesiredChannelgetVelDesiredChannel (void)
 Accessor for the channel structor for merge, internal.

ArActionDesiredChannelgetDeltaHeadingDesiredChannel (void)
 Accessor for the channel structor for merge, internal.

ArActionDesiredChannelgetMaxVelDesiredChannel (void)
 Accessor for the channel structor for merge, internal.

ArActionDesiredChannelgetMaxNegVelDesiredChannel (void)
 Accessor for the channel structor for merge, internal.

ArActionDesiredChannelgetMaxRotVelDesiredChannel (void)
 Accessor for the channel structor for merge, internal.


Detailed Description

Class used to say what movement is desired.

This class is use by actions to report what they want to want to do (hence the name).

The way it works, is that translational (front/back) and rotational (right/left) are seperate. Translational movement uses velocity, while rotational movement uses change in heading from current heading. Translational and rotational each have their own strength value. Both translational and rotational movement have maximum velocities as well, that also have their own strengths.

The strength value reflects how strongly an action wants to do the chosen movement command, the resolver (ArResolver) will combine these strengths and figure out what to do based on them.

For all strength values there is a total of 1.0 strength to be had. The range for strength is from 0 to 1. This is simply a convention that ARIA uses by default, if you don't like it, you can override this class and make an ArResolver.


Member Function Documentation

virtual void ArActionDesired::accountForRobotHeading double    robotHeading [inline, virtual]
 

Accounts for robot heading, mostly internal.

This accounts for the robots heading, and transforms the set heading on this actionDesired into a delta heading so it can be merged and averaged and the like

Parameters:
robotHeading  the heading the real actual robot is at now

virtual void ArActionDesired::addAverage ArActionDesired *    actDesired [inline, virtual]
 

Adds another actionDesired into the mix to average.

For a description of how to use this, see startAverage.

Parameters:
actDesired  the actionDesired to add into the average

virtual void ArActionDesired::endAverage void    [inline, virtual]
 

Ends the process of avereraging together different desireds.

For a description of how to use this, see startAverage.

virtual void ArActionDesired::merge ArActionDesired *    actDesired [inline, virtual]
 

Merges the given ArActionDesired into this one (this one has precedence), internal.

This merges in the two different action values, accountForRobotHeading MUST be done before this is called (on both actions), since this merges their delta headings, and the deltas can't be known unless the account for angle is done.

Parameters:
actDesired  the actionDesired to merge with this one

virtual void ArActionDesired::setDeltaHeading double    deltaHeading,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the delta heading (deg) and strength.

Parameters:
deltaHeading  desired change in heading (deg)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::setHeading double    heading,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the absolute heading (deg).

This is a way to set the heading instead of using a delta, there is no get for this, because accountForRobotHeading MUST be called (this should be called by all resolvers, but if you want to call it you can, thats fine).

Parameters:
heading  desired heading (deg)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::setMaxNegVel double    maxVel,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the maximum velocity for going backwards (-mm/sec) and strength.

Parameters:
maxVel  desired maximum velocity for going backwards (-mm/sec)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::setMaxRotVel double    maxVel,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the maximum rotational velocity (deg/sec) and strength.

Parameters:
maxVel  desired maximum rotational velocity (deg/sec)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::setMaxVel double    maxVel,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the maximum velocity (+mm/sec) and strength.

Parameters:
maxVel  desired maximum velocity (+mm/sec)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::setVel double    vel,
double    strength = MAX_STRENGTH
[inline, virtual]
 

Sets the velocity (mm/sec) and strength.

Parameters:
vel  desired vel (mm/sec)
strength  strength given to this, defaults to MAX_STRENGTH (1.0)

virtual void ArActionDesired::startAverage void    [inline, virtual]
 

Starts the process of avereraging together different desireds.

There is a three step process for averaging actionDesireds together, first startAverage must be done to set up the process, then addAverage must be done with each average that is desired, then finally endAverage should be used, after that is done then the normal process of getting the results out should be done.


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:46 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001