#include <ArActionDesired.h>
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... | |
ArActionDesiredChannel * | getVelDesiredChannel (void) |
Accessor for the channel structor for merge, internal. | |
ArActionDesiredChannel * | getDeltaHeadingDesiredChannel (void) |
Accessor for the channel structor for merge, internal. | |
ArActionDesiredChannel * | getMaxVelDesiredChannel (void) |
Accessor for the channel structor for merge, internal. | |
ArActionDesiredChannel * | getMaxNegVelDesiredChannel (void) |
Accessor for the channel structor for merge, internal. | |
ArActionDesiredChannel * | getMaxRotVelDesiredChannel (void) |
Accessor for the channel structor for merge, internal. |
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.
|
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
|
|
Adds another actionDesired into the mix to average. For a description of how to use this, see startAverage.
|
|
Ends the process of avereraging together different desireds. For a description of how to use this, see startAverage. |
|
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.
|
|
Sets the delta heading (deg) and strength.
|
|
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).
|
|
Sets the maximum velocity for going backwards (-mm/sec) and strength.
|
|
Sets the maximum rotational velocity (deg/sec) and strength.
|
|
Sets the maximum velocity (+mm/sec) and strength.
|
|
Sets the velocity (mm/sec) and strength.
|
|
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. |