Actin  Version 5.5.5
Software for Robotics Simulation and Control
EcControlExpressionJointRateFilter Class Reference

This caps the weighted infinity norm of the joint rates. More...

#include <ecContExpJointRateFilter.h>

Inheritance diagram for EcControlExpressionJointRateFilter:
[legend]
Collaboration diagram for EcControlExpressionJointRateFilter:
[legend]

Public Member Functions

 EcControlExpressionJointRateFilter ()
 default constructor
 
 EcControlExpressionJointRateFilter (const EcControlExpressionContainer *containerPointer)
 constructor from an EcControlExpressionContainer pointer
 
virtual ~EcControlExpressionJointRateFilter ()
 destructor
 
 EcControlExpressionJointRateFilter (const EcControlExpressionJointRateFilter &orig)
 copy constructor
 
EcControlExpressionJointRateFilteroperator= (const EcControlExpressionJointRateFilter &orig)
 assignment operator
 
EcBoolean operator== (const EcControlExpressionJointRateFilter &orig) const
 equality operator
 
virtual EcXmlObjectclone () const EC_OVERRIDE
 clone - a virtual constructor to an EcXmlObject pointer
 
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 EcVelocityControlDatavalue () const EC_OVERRIDE
 
virtual void registerComponents () EC_OVERRIDE
 registers components with the parent
 
virtual void setContainer (const EcXmlBaseVariableCompoundType *container) EC_OVERRIDE
 
virtual const EcControlExpressionContainerweights () const
 
virtual void setWeightsContainer (const EcControlExpressionContainer &weightsContainer)
 
virtual void setWeightsElement (const EcExpressionElement &weightsElement)
 
virtual EcReal threshold () const
 
virtual void setThreshold (EcReal threshold)
 
virtual EcBoolean applyAccelerationLimits () const
 
virtual void setApplyAccelerationLimits (EcBoolean value)
 
virtual const EcReal singularityProximityThreshold () const
 
virtual void setSingularityProximityThreshold (EcReal value)
 
EcBoolean useControlParameters () const
 gets whether to use joint velocities from control parameters in place of weights and threshold
 
void setUseControlParameters (EcBoolean value)
 gets whether to use joint velocities from control parameters in place of weights and threshold
 
virtual void assignParametersFromManip (const EcIndividualManipulator &manip)
 
virtual const EcTokentoken () const EC_OVERRIDE
 
EcReal scalingFactor () const
 get the scaling factor
 
- Public Member Functions inherited from EcControlExpressionElement
 EcControlExpressionElement (const EcControlExpressionContainer *container)
 constructor from an EcControlExpressionContainer pointer
 
virtual const EcControlExpressionContainerunfilteredRates () const
 
virtual void setUnfilteredRatesContainer (const EcControlExpressionContainer &unfilteredRatesContainer)
 
virtual void setUnfilteredRatesElement (const EcExpressionElement &unfilteredRatesElement)
 
- Public Member Functions inherited from EcExpressionElement
 EcExpressionElement ()
 default constructor - should not be used
 
 EcExpressionElement (const EcExpressionContainer *containerPointer)
 constructor from an EcExpressionContainer pointer
 
virtual ~EcExpressionElement ()
 destructor
 
 EcExpressionElement (const EcExpressionElement &orig)
 copy constructor
 
EcExpressionElementoperator= (const EcExpressionElement &orig)
 assignment operator
 
EcBoolean operator== (const EcExpressionElement &orig) const
 equality operator
 
- Public Member Functions inherited from EcBaseExpressionTreeElement
 EcBaseExpressionTreeElement ()
 default constructor
 
 EcBaseExpressionTreeElement (const EcXmlBaseVariableCompoundType *containerPointer)
 constructor given container pointer
 
virtual ~EcBaseExpressionTreeElement ()
 destructor
 
 EcBaseExpressionTreeElement (const EcBaseExpressionTreeElement &orig)
 copy constructor
 
EcBaseExpressionTreeElementoperator= (const EcBaseExpressionTreeElement &orig)
 assignment operator
 
EcBoolean operator== (const EcBaseExpressionTreeElement &orig) const
 equality operator
 
virtual const EcXmlBaseVariableCompoundTypecontainer () const
 gets the container
 
- Public Member Functions inherited from EcXmlCompoundType
 ECDECLARE_BIGFOUR (EcXmlCompoundType)
 
virtual EcBoolean xmlInit () EC_OVERRIDE
 xmlInitialize
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read object from an XML stream
 
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 write (EcXmlWriter &stream) const EC_OVERRIDE
 write object to 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 EcControlExpressionJointRateFilter nullObject ()
 
static const EcTokenclassToken ()
 
static EcXmlObjectcreator ()
 

Protected Member Functions

virtual EcBoolean filterJointRates (const EcVelocityControlData &origJointRates, EcReal speedFactor, EcVelocityControlData &jointRates) const
 
virtual EcBoolean filterJointRatesForAccelerations (EcReal speedFactor, EcReArray &jointRates) const
 
virtual EcBoolean adjustNullSpaceComponentForAccelerations (EcReal speedFactor, EcBoolean finalPass, EcReArray &jointRates, EcReal &scaleFactor) const
 
virtual EcReal reducedSpeedFactorForJointLimits (EcReal speedFactor, const EcReArray &jointRates) const
 
virtual EcReal reducedSpeedFactorForSingulariy () const
 
virtual EcReal reducedSpeedFactorForAccelerations (EcReal speedFactor, const EcReArray &jointRates) const
 
virtual EcBoolean filterJointRatesInJointGroupWithVelocityLimits (const EcVelocityControlData &origJointRates, const EcJointGroup &jointGroup, const EcRealVector &velocityLimits, EcReal speedFactor, EcVelocityControlData &jointRates, EcBoolean &valuesChanged) const
 
virtual EcBoolean filterJointRatesInJointGroupWithWeights (const EcVelocityControlData &origJointRates, const EcJointGroup &jointGroup, EcReal speedFactor, EcVelocityControlData &jointRates, EcBoolean &valuesChanged) const
 
virtual EcBoolean filterJointRatesForJointLimits (EcReal speedFactor, EcReArray &jointRates) const
 
- 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

EcControlExpressionContainer m_Weights
 the weights
 
EcXmlBoolean m_ApplyAccelerationLimits
 the flag indicating whether to apply acceleration limits
 
EcXmlBoolean m_UseControlParameters
 flag indicating whether to use joint velocities instead of weights and threshold from control parameters
 
EcXmlRealVector m_AccelerationLimits
 
EcXmlReal m_SingularityProximityThreshold
 
EcXmlReal m_Threshold
 
EcSingularityProximityFunction m_SingularityProximityFunction
 the singularity proximity function
 
EcRealVector m_BaseComponent
 base component
 
EcRealVector m_NullSpaceComponent
 null-space component
 
EcReal m_ScalingFactor
 
- Protected Attributes inherited from EcControlExpressionElement
EcControlExpressionContainer m_UnfilteredRates
 the unfiltered joint rates
 
- Protected Attributes inherited from EcExpressionElement
EcVelocityControlData m_Array
 a real array to cache the returned value
 
- Protected Attributes inherited from EcBaseExpressionTreeElement
const EcXmlBaseVariableCompoundTypem_pContainer
 a pointer to the container
 
- 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
 

Additional Inherited Members

- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 
- 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
 

Detailed Description

This caps the weighted infinity norm of the joint rates.

This expression element caps the weighted infinity norm of the joint rates.

Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.

Definition at line 21 of file ecContExpJointRateFilter.h.

Member Function Documentation

virtual EcBoolean EcControlExpressionJointRateFilter::adjustNullSpaceComponentForAccelerations ( EcReal  speedFactor,
EcBoolean  finalPass,
EcReArray jointRates,
EcReal scaleFactor 
) const
protectedvirtual

adjust the null-space component in an attempt to stay within acceleration limits. Only applicable if m_ApplyAccelerationLimits is true.

Parameters
[in]speedFactorThe speed factor
[in]finalPassFlag indicating if this is a final pass for the call to this method. If so, it will compute jointRates and not compute scaleFactor even if the jointRates may still be violating the acceleration limits
[in,out]jointRatesThe resulting joint rates
[out]scaleFactorThe scaling factor, which is the inverse of the max deviation from acceleration limit. This can be used to modify the scalar value in the control core and recompute the joint rates
virtual EcBoolean EcControlExpressionJointRateFilter::applyAccelerationLimits ( ) const
virtual

gets the flag indicating whether to apply acceleration limits

Returns
The flag indicating whether to apply acceleration limits
virtual void EcControlExpressionJointRateFilter::assignParametersFromManip ( const EcIndividualManipulator manip)
virtual

Use joint rate information in manipulator to automaticaly assign appropriate values for weights and threshold.

Parameters
[in]manip(EcIndividualManipulator&) TODO
static const EcToken& EcControlExpressionJointRateFilter::classToken ( )
static

token for this class

Returns
(EcToken&) The class token
static EcXmlObject* EcControlExpressionJointRateFilter::creator ( )
static

static creator function

Returns
(EcXmlObject*) The xml objecct pointer
virtual EcBoolean EcControlExpressionJointRateFilter::filterJointRates ( const EcVelocityControlData origJointRates,
EcReal  speedFactor,
EcVelocityControlData jointRates 
) const
protectedvirtual

filter the joint rates

Parameters
[in]origJointRatesThe input joint rates
[in]speedFactorThe speed factor
[out]jointRatesThe joint rates after filtering
virtual EcBoolean EcControlExpressionJointRateFilter::filterJointRatesForAccelerations ( EcReal  speedFactor,
EcReArray jointRates 
) const
protectedvirtual

filter the joint velocities by reducing them further so joint accelerations will potentially be within the acceleration limits

Parameters
[in]speedFactorThe speed factor
[in,out]jointRatesThe joint rates
virtual EcBoolean EcControlExpressionJointRateFilter::filterJointRatesForJointLimits ( EcReal  speedFactor,
EcReArray jointRates 
) const
protectedvirtual

filter the joint velocities by reducing them further to allow arm to stop with acceleration limits before hitting joint limits for all joints

Parameters
[in]speedFactorThe speed factor
[in,out]jointRatesThe joint rates
virtual EcBoolean EcControlExpressionJointRateFilter::filterJointRatesInJointGroupWithVelocityLimits ( const EcVelocityControlData origJointRates,
const EcJointGroup jointGroup,
const EcRealVector velocityLimits,
EcReal  speedFactor,
EcVelocityControlData jointRates,
EcBoolean valuesChanged 
) const
protectedvirtual

filter the joint rates

Parameters
[in]origJointRatesThe input joint rates
[in]jointGroupThe group of joints
[in]velocityLimitsThe velocity limits
[in]speedFactorThe speed factor
[out]jointRatesThe joint rates after filtering
[out]valuesChangedReturn whether any joint rate has been scaled from the original
virtual EcBoolean EcControlExpressionJointRateFilter::filterJointRatesInJointGroupWithWeights ( const EcVelocityControlData origJointRates,
const EcJointGroup jointGroup,
EcReal  speedFactor,
EcVelocityControlData jointRates,
EcBoolean valuesChanged 
) const
protectedvirtual

filter the joint rates

Parameters
[in]origJointRatesThe input joint rates
[in]jointGroupThe group of joints
[in]speedFactorThe speed factor
[out]jointRatesThe joint rates after filtering
[out]valuesChangedReturn whether any joint rate has been scaled from the original
static EcControlExpressionJointRateFilter EcControlExpressionJointRateFilter::nullObject ( )
static

get a null object

Returns
(EcControlExpressionJointRateFilter) The null object
virtual EcReal EcControlExpressionJointRateFilter::reducedSpeedFactorForAccelerations ( EcReal  speedFactor,
const EcReArray jointRates 
) const
protectedvirtual

compute the reduced speed factor so the joint rates are within the acceleration limits if possible

Parameters
[in]speedFactorThe speed factor
[in]jointRatesThe joint rates
virtual EcReal EcControlExpressionJointRateFilter::reducedSpeedFactorForJointLimits ( EcReal  speedFactor,
const EcReArray jointRates 
) const
protectedvirtual

compute the reduced speed factor to slow down the robot when joints approach joint limits so they do not violate acceleration limits when they need to stop at joint limits

Parameters
[in]speedFactorThe speed factor
[in]jointRatesThe joint rates
virtual EcReal EcControlExpressionJointRateFilter::reducedSpeedFactorForSingulariy ( ) const
protectedvirtual

compute the reduced speed factor to slow down the robot when it approaches a singularity so the joints could be kept within acceleration limits when they need to stop at a singularity

virtual void EcControlExpressionJointRateFilter::setApplyAccelerationLimits ( EcBoolean  value)
virtual

sets the flag indicating whether to apply acceleration limits

Parameters
[in]valueThe flag indicating whether to apply acceleration limits
virtual void EcControlExpressionJointRateFilter::setContainer ( const EcXmlBaseVariableCompoundType container)
virtual

sets the container

Parameters
[in]container(EcXmlBaseVariableCompoundType*) value to set the container

Reimplemented from EcControlExpressionElement.

virtual void EcControlExpressionJointRateFilter::setSingularityProximityThreshold ( EcReal  value)
virtual

sets the singularity proximity threshold used to reduce the speed when close to a singularity This is so that the robot won't suddenly stop at a singularity from a high speed. This is only active if applyAccelerationLimits() is true

Parameters
[in]valueThe threshold When the singularity proximity measure gets below this threshold, the robot will start to slow down. The closer it is to a singularity (the measure would be zero at singularity), the slower the robot gets. Set the threshold to <= 0 if it's desired not to have the robot slowing down close to singularity.
virtual void EcControlExpressionJointRateFilter::setThreshold ( EcReal  threshold)
virtual

sets the threshold

Parameters
[in]threshold(EcReal) value to set the the threshold
virtual void EcControlExpressionJointRateFilter::setWeightsContainer ( const EcControlExpressionContainer weightsContainer)
virtual

sets the weights container

Parameters
[in]weightsContainer(EcControlExpressionContainer&) set the weights into the container
virtual void EcControlExpressionJointRateFilter::setWeightsElement ( const EcExpressionElement weightsElement)
virtual

sets the weights element

Parameters
[in]weightsElement(EcExpressionElement&) value to set each element of weights
Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.
virtual const EcReal EcControlExpressionJointRateFilter::singularityProximityThreshold ( ) const
virtual

gets the singularity proximity threshold used to reduce the speed when close to a singularity.

virtual EcReal EcControlExpressionJointRateFilter::threshold ( ) const
virtual

gets the threshold

virtual const EcToken& EcControlExpressionJointRateFilter::token ( ) const
virtual

return a token

Returns
(EcToken&) The xml token

Implements EcXmlObject.

virtual const EcVelocityControlData& EcControlExpressionJointRateFilter::value ( ) const
virtual

return the value

Returns
(EcVelocityControlData&) The velocity control data

Implements EcExpressionElement.

virtual const EcControlExpressionContainer& EcControlExpressionJointRateFilter::weights ( ) const
virtual

gets the weights

Returns
(EcControlExpressionContainer&) The weights of the control expression container

Member Data Documentation

EcXmlRealVector EcControlExpressionJointRateFilter::m_AccelerationLimits
protected

Definition at line 322 of file ecContExpJointRateFilter.h.

EcXmlReal EcControlExpressionJointRateFilter::m_SingularityProximityThreshold
protected

Definition at line 325 of file ecContExpJointRateFilter.h.

EcXmlReal EcControlExpressionJointRateFilter::m_Threshold
protected

Definition at line 328 of file ecContExpJointRateFilter.h.


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