Actin®  Version 5.2.0
Software for Robotics Simulation and Control
EcGeneralMotionFilter Class Reference

Holds a description of a general-motion filter system. More...

#include <ecGenMotionFilter.h>

Inheritance diagram for EcGeneralMotionFilter:
EcBaseMotionFilter EcXmlCompoundType EcXmlObject

Public Member Functions

 EcGeneralMotionFilter ()
 default constructor
 
virtual ~EcGeneralMotionFilter ()
 destructor
 
 EcGeneralMotionFilter (const EcGeneralMotionFilter &orig)
 copy constructor
 
EcGeneralMotionFilteroperator= (const EcGeneralMotionFilter &orig)
 assignment operator
 
EcBoolean operator== (const EcGeneralMotionFilter &orig) const
 equality operator
 
virtual EcBoolean xmlInit () EC_OVERRIDE
 initialize XML components for reading and writing
 
virtual EcXmlObjectclone () const EC_OVERRIDE
 clone - a virtual constructor to an EcXmlObject pointer
 
virtual void registerComponents () EC_OVERRIDE
 register components with the parent
 
virtual EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - virtual equality to an EcXmlObject pointer
 
virtual EcXmlObjectnewObject () const EC_OVERRIDE
 virtual new that returns an EcXmlObject
 
virtual const EcVectoroffset () const
 gets the offset
 
virtual void setOffset (const EcVector &offset)
 sets the offset
 
virtual EcReal angularWeight () const
 
virtual void setAngularWeight (EcReal angularWeight)
 
virtual EcReal threshold () const
 
virtual void setThreshold (EcReal threshold)
 
virtual EcReal linearVelocityThreshold () const
 gets the linear velocity threshold
 
virtual void setLinearVelocityThreshold (EcReal threshold)
 sets the linear velocity threshold.
 
virtual EcReal angularVelocityThreshold () const
 gets the angular velocity threshold
 
virtual void setAngularVelocityThreshold (EcReal threshold)
 sets the angular velocity threshold.
 
virtual EcReal linearAccelerationThreshold () const
 gets the linear acceleration threshold
 
virtual void setLinearAccelerationThreshold (EcReal threshold)
 sets the linear acceleration threshold.
 
virtual EcReal angularAccelerationThreshold () const
 gets the angular acceleration threshold
 
virtual void setAngularAccelerationThreshold (EcReal threshold)
 sets the angular acceleration threshold.
 
virtual EcReal linearDecelerationThreshold () const
 gets the linear deceleration threshold
 
virtual void setLinearDecelerationThreshold (EcReal threshold)
 
virtual EcReal angularDecelerationThreshold () const
 gets the angular deceleration threshold
 
virtual void setAngularDecelerationThreshold (EcReal threshold)
 
virtual EcReal linearGain () const
 gets the linear gain
 
virtual void setLinearGain (EcReal linearGain)
 sets the linear gain
 
virtual EcReal angularGain () const
 gets the angular gain
 
virtual void setAngularGain (EcReal angularGain)
 sets the angular gain
 
virtual EcReal linearJerkThreshold () const
 gets linear jerk threshold
 
virtual EcReal angularJerkThreshold () const
 gets angular jerk threshold
 
virtual void setLinearJerkThreshold (EcReal linearJerkThreshold)
 set linear jerk threshold
 
virtual void setAngularJerkThreshold (EcReal angularJerkThreshold)
 set angular jerk threshold
 
virtual EcBoolean calculateGeneralMotion (const EcCoordinateSystemTransformation &from, const EcCoordinateSystemTransformation &to, const EcGeneralVelocity &desiredVelocity, const EcGeneralVelocity &lastVelocity, const EcGeneralAcceleration &lastAcceleration, EcReal timeStep, EcGeneralVelocity &filteredVelocity, EcGeneralAcceleration &filteredAcceleration, EcBoolean coordinatedMotion=EcTrue, EcBoolean freeSpinInZ=EcFalse, EcBoolean applyFilter=EcTrue) const
 
virtual EcBoolean calculateGeneralMotionGS (const EcCoordinateSystemTransformation &from, const EcCoordinateSystemTransformation &to, const EcGeneralVelocity &desiredVelocity, const EcGeneralVelocity &lastVelocity, const EcGeneralAcceleration &lastAcceleration, EcReal timeStep, EcGeneralVelocity &filteredVelocity, EcGeneralAcceleration &filteredAcceleration, const EcBoolean coordinatedMotion, const EcBoolean applyFilter, const EcBoolean systemOrEE, const EcXmlBooleanVector &flags, const EcBoolean &fixedGuideFrame, EcVector &pe, const EcBoolean &changed) const
 
virtual EcBoolean calculateDeltasGS (const EcCoordinateSystemTransformation &from, const EcCoordinateSystemTransformation &to, const EcBoolean systemOrEE, const EcXmlBooleanVector &flags, const EcBoolean &fixedGuideFrame, EcVector &deltaPosition, EcVector &angleTimesAxis, EcVector &positionError) const
 calculate the linear and angular deltas used to move from "from" to "to".
 
virtual EcBoolean filterVelocity (const EcGeneralVelocity &desiredVelocity, const EcGeneralVelocity &lastVelocity, const EcGeneralAcceleration &lastGeneralAcceleration, EcReal timeStep, EcGeneralVelocity &filteredVelocity, EcGeneralAcceleration &filteredGeneralAcceleration) const
 fitler the desired velocity by applying velocity and acceleration thresholds
 
virtual const EcTokentoken () const EC_OVERRIDE
 the token
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read this object from an XML stream
 
virtual EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
 write this object to an XML stream
 
- Public Member Functions inherited from EcBaseMotionFilter
 EcBaseMotionFilter ()
 default constructor
 
virtual ~EcBaseMotionFilter ()
 destructor
 
 EcBaseMotionFilter (const EcBaseMotionFilter &orig)
 copy constructor
 
EcBaseMotionFilteroperator= (const EcBaseMotionFilter &orig)
 assignment operator
 
EcBoolean operator== (const EcBaseMotionFilter &orig) const
 equality operator
 
virtual EcU32 filteringMode () const
 
virtual void setFilteringMode (EcU32 filteringMode)
 
virtual EcReal exponent () const
 
virtual void setExponent (EcReal exponent)
 
virtual EcReal speedFactor () const
 
virtual void setSpeedFactor (EcReal value)
 
virtual EcReal accelerationFactor () const
 
virtual void setAccelerationFactor (EcReal value)
 
virtual EcBoolean filteringActive () const
 
virtual void setFilteringActive (EcBoolean value)
 returns whether filtering is active.
 
- Public Member Functions inherited from EcXmlCompoundType
 ECDECLARE_BIGFOUR (EcXmlCompoundType)
 
virtual EcBoolean readAttributes (EcXmlReader &stream)
 read object attributes from an XML stream
 
virtual EcBoolean readElements (EcXmlReader &stream)
 read object elements from an XML stream
 
virtual EcBoolean writeAttributes (EcXmlWriter &stream) const
 write object attributes to an XML stream
 
virtual EcBoolean writeElements (EcXmlWriter &stream) const
 write object elements to an XML stream
 
virtual EcBoolean writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
 write schema
 
virtual EcBoolean writeSchemaAttributes (EcXmlSchema &stream) const
 write schema attributes
 
virtual EcBoolean writeSchemaElements (EcXmlSchema &stream) const
 write schema elements
 
virtual void registerComponent (const EcToken &token, EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponent (EcXmlObject *obj)
 register a single component More...
 
virtual void registerComponentReadOnly (const EcToken &token, EcXmlObject *obj)
 register a single component as read-only More...
 
virtual const EcXmlComponentMapcomponentMap () const
 get a reference to the component map
 
virtual void registerAttributeComponent (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component More...
 
virtual void registerAttributeComponentReadOnly (const EcToken &AttribToken, EcXmlObject *Obj)
 register a single attribute component read-only More...
 
virtual const EcXmlComponentMapattributeComponentMap ()
 get a reference to the component attribute map
 
virtual const EcXmlSpecialDescriptorMapspecialDescriptorMap ()
 get a reference to the special-descriptor map
 
virtual void registerComponentDescriptor (const EcToken &xmlToken, const EcToken &descriptorToken, const EcString &descriptorString)
 register an XML token-string descriptor More...
 
virtual const EcXmlTokenStringDescriptorMapMaptokenStringDescriptorMap ()
 get a reference to the XML token-string descriptor map
 
virtual EcBoolean hasChildren () const
 return EcTrue if there are children components or EcFalse if an empty element.
 
virtual EcBoolean hasAttributes () const
 return EcTrue if there are attributes in the element.
 
- Public Member Functions inherited from EcXmlObject
 ECDECLARE_BIGFOUR (EcXmlObject)
 
virtual EcBoolean readAttribute (EcXmlReader &stream)
 read this attribute from an XML stream
 
virtual EcBoolean createSchema (const EcString &filename, const EcToken &objectName=EcXml::EcDefaultToken) const
 create schema
 
virtual EcBoolean xmlInitialized () const
 get XML initialized flag. This bit is set on initialization.
 
virtual void setXmlInitialized (EcBoolean val=EcTrue)
 set XML initialized flag. This bit is set on initialization.
 
virtual EcBoolean specified () const
 get specified flag. This bit is set upon reading from an XML file.
 
virtual void setSpecified (EcBoolean val=EcTrue)
 set specified flag. This bit is set upon reading from an XML file.
 
virtual EcBoolean isBasicType () const
 Return true/false for basic type.
 
virtual EcBoolean equalsDefault () const
 tests equality of XML object with default
 

Static Public Member Functions

static EcGeneralMotionFilter nullObject ()
 get a null object
 

Protected Member Functions

virtual EcReal applyFilter (const EcVector &delta, EcReal gain, EcReal velocityThreshold, EcReal decelerationThreshold, EcReal timeStep, EcVector &filteredVelocity) const
 apply the filter
 
void imposeVelocityThresholds (EcReal linearVelThreshold, EcReal angularVelThreshold, EcVector &linearVelocity, EcVector &angularVelocity) const
 impose the linear/angular velocity thresholds
 
void imposeAccelerationThresholds (const EcGeneralMotion &lastVelocity, const EcGeneralMotion &lastAcceleration, EcReal linearAccThreshold, EcReal angularAccThreshold, EcReal integratedMaxDeltaLinearVelocity, EcReal integratedMaxDeltaAngularVelocity, EcReal timeStep, EcVector &linearVelocity, EcVector &angularVelocity, EcVector &linearAcceleration, EcVector &angularAcceleration) const
 impose the linear/angular acceleration thresholds
 
- Protected Member Functions inherited from EcXmlCompoundType
virtual EcBoolean readValueFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcBoolean readValueFromSpecialToken (const EcToken &token, EcXmlReader &stream)
 read value from unregistered token
 
virtual EcBoolean readAttributeFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcXmlComponentMapnewComponentMap () const
 allocate a new componentMap
 
virtual EcXmlSpecialDescriptorMapnewSpecialDescriptorMap ()
 allocate a new specialDescriptorsMap
 
virtual EcXmlTokenStringDescriptorMapMapnewTokenStringDescriptorMap ()
 allocate a new tokenStringDescriptorsMap
 
virtual void createComponentMap () const
 create component map
 
virtual void createAttributeComponentMap ()
 create attribute component map
 
virtual void createSpecialDescriptorMap ()
 create special-descriptors map
 
virtual void createTokenStringDescriptorMap ()
 create token-string descriptor map
 
virtual EcBoolean isReadOnlyComponent (const EcToken token) const
 check to see if the token corresponds to a read-only component
 
virtual EcBoolean isReadOnlyAttribute (const EcToken token) const
 check to see if the token corresponds to a read-only attribute
 
virtual EcXmlObjectlibraryAttribute ()
 

Protected Attributes

EcXmlVector m_Offset
 
EcXmlReal m_LinearVelocityThreshold
 the linear velocity threshold
 
EcXmlReal m_AngularVelocityThreshold
 the angular velocity threshold
 
EcXmlReal m_LinearAccelerationThreshold
 the linear acceleration threshold
 
EcXmlReal m_AngularAccelerationThreshold
 the angular acceleration threshold
 
EcXmlReal m_LinearDecelerationThreshold
 the linear deceleration threshold
 
EcXmlReal m_AngularDecelerationThreshold
 the angular deceleration threshold
 
EcXmlReal m_LinearGain
 
EcXmlReal m_AngularGain
 
EcXmlReal m_AngularWeight
 
EcXmlReal m_Threshold
 
EcJerkLimitMotionFilter m_LinearJerkFilter
 pointer to jerk limit filter
 
EcJerkLimitMotionFilter m_AngularJerkFilter
 
EcXmlReal m_LinearJerkThreshold
 jerk threshold
 
EcXmlReal m_AngularJerkThreshold
 
- Protected Attributes inherited from EcBaseMotionFilter
EcXmlEnumU32 m_FilteringMode
 the filtering mode
 
EcXmlReal m_Exponent
 the exponent
 
EcReal m_SpeedFactor
 the speed factor
 
EcReal m_AccelerationFactor
 the acceleration factor, also used for deceleration and jerk
 
EcBoolean m_FilteringActive
 Flag indicating whether filtering is actvie.
 
- Protected Attributes inherited from EcXmlCompoundType
EcXmlComponentMapm_pComponentMap
 
EcXmlComponentMapm_pAttributeComponentMap
 
EcXmlSpecialDescriptorMapm_pSpecialDescriptorMap
 
EcXmlTokenStringDescriptorMapMapm_pComponentMapTokenStringDescriptor
 
- Protected Attributes inherited from EcXmlObject
EcU8 m_State
 the state of the object - eight boolean flags
 

Static Protected Attributes

static const EcReal m_theCosThreshold
 
- Static Protected Attributes inherited from EcXmlObject
static const EcU8 m_theXmlInitializedBit
 the bit used to describe xml initialization
 
static const EcU8 m_theSpecifiedBit
 the bit used to describe specification
 

Additional Inherited Members

- Public Types inherited from EcBaseMotionFilter
enum  FilteringMode {
  PROPORTIONAL = 0,
  TRAPEZOIDAL = 1,
  THREEHALVES = 2,
  SCURVE = 3
}
 enumerations for the filtering mode
 
- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 

Detailed Description

Holds a description of a general-motion filter system.

Holds a description of a general-motion filter system. Given an existing frame, a desired frame, a desired frame (or point) velocity, what is the best overall general velocity (or point velocity). This uses proportional scaling with capping.

Given an existing frame, a desired frame, a desired frame (or point) velocity, what is the best overall general velocity (or point velocity). This uses proportional scaling with capping.

Definition at line 32 of file ecGenMotionFilter.h.

Member Function Documentation

virtual EcReal EcGeneralMotionFilter::angularWeight ( ) const
virtual
virtual EcBoolean EcGeneralMotionFilter::calculateGeneralMotion ( const EcCoordinateSystemTransformation from,
const EcCoordinateSystemTransformation to,
const EcGeneralVelocity desiredVelocity,
const EcGeneralVelocity lastVelocity,
const EcGeneralAcceleration lastAcceleration,
EcReal  timeStep,
EcGeneralVelocity filteredVelocity,
EcGeneralAcceleration filteredAcceleration,
EcBoolean  coordinatedMotion = EcTrue,
EcBoolean  freeSpinInZ = EcFalse,
EcBoolean  applyFilter = EcTrue 
) const
virtual

calculate a general motion that will make a tradeoff between driving the first frame to the second and achieving the desired general motion.

Parameters
[in]from
[in]to
[in]desiredVelocity
[in]lastVelocity
[in]timeStep
[in]filteredVelocity
[in]coordinatedMotionIf true, the linear and angular motions will be time scaled so they complete approximately at the same time.
[in]freeSpinInZ
[in]applyFilter
virtual EcBoolean EcGeneralMotionFilter::calculateGeneralMotionGS ( const EcCoordinateSystemTransformation from,
const EcCoordinateSystemTransformation to,
const EcGeneralVelocity desiredVelocity,
const EcGeneralVelocity lastVelocity,
const EcGeneralAcceleration lastAcceleration,
EcReal  timeStep,
EcGeneralVelocity filteredVelocity,
EcGeneralAcceleration filteredAcceleration,
const EcBoolean  coordinatedMotion,
const EcBoolean  applyFilter,
const EcBoolean  systemOrEE,
const EcXmlBooleanVector flags,
const EcBoolean fixedGuideFrame,
EcVector pe,
const EcBoolean changed 
) const
virtual

calculate a general motion that will make a tradeoff between driving the first frame to the second and achieving the desired general motion.

Parameters
[in]from
[in]to
[in]desiredVelocity
[in]lastVelocity
[in]timeStep
[in]filteredVelocity
[in]coordinatedMotionIf true, the linear and angular motions will be time scaled so they complete approximately at the same time.
[in]applyFilter
[in]systemOrEE
[in]flags
[in]fixedGuideFrameif true, position error will be ignored
virtual void EcGeneralMotionFilter::setAngularDecelerationThreshold ( EcReal  threshold)
virtual

sets an additional angular deceleration threshold. This threshold is used to further limit the velocity such that deceleration when approaching a destination point doesn't exceed this value. If it is larger than the angular acceleration threshold, the angular acceleration threshold is used.

virtual void EcGeneralMotionFilter::setAngularWeight ( EcReal  angularWeight)
virtual
virtual void EcGeneralMotionFilter::setLinearDecelerationThreshold ( EcReal  threshold)
virtual

sets an additional linear deceleration threshold. This threshold is used to further limit the velocity such that deceleration when approaching a destination point doesn't exceed this value. If it is larger than the linear acceleration threshold, the linear acceleration threshold is used.

virtual void EcGeneralMotionFilter::setThreshold ( EcReal  threshold)
virtual
virtual EcReal EcGeneralMotionFilter::threshold ( ) const
virtual

Member Data Documentation

EcXmlReal EcGeneralMotionFilter::m_AngularGain
protected

an angular gain factor. The angular velocity, when there is no explicit desired velocity and it doesn't exceed the threshold will be v=gain*offset.

Definition at line 413 of file ecGenMotionFilter.h.

EcXmlReal EcGeneralMotionFilter::m_AngularWeight
protected

the following members are deprecated. a weight for the angular velocity, used in assessing threshold exceedance.

Definition at line 422 of file ecGenMotionFilter.h.

EcXmlReal EcGeneralMotionFilter::m_LinearGain
protected

a linear gain factor. The linear velocity, when there is no explicit desired velocity and it doesn't exceed the threshold will be v=gain*offset.

Definition at line 408 of file ecGenMotionFilter.h.

EcXmlVector EcGeneralMotionFilter::m_Offset
protected

an offset vector. This point in one frame will move directly toward the same point in another frame.

Definition at line 388 of file ecGenMotionFilter.h.

const EcReal EcGeneralMotionFilter::m_theCosThreshold
staticprotected

the cosine threshold. When cos(theta) is larger than this, sin(theta) is assumed to be approximately equal to theta

Definition at line 417 of file ecGenMotionFilter.h.

EcXmlReal EcGeneralMotionFilter::m_Threshold
protected

a not-to-exceed threshold. The function of the difference between the returned and the desired general velocity, Sqrt[v.v + m_AngularWeight^2*w.w], will not exceed this.

Definition at line 427 of file ecGenMotionFilter.h.


The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.