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

Circular motion. More...

#include <ecEndEffectorMotionMoveCircular.h>

Inheritance diagram for EcEndEffectorMotionMoveCircular:
EcBaseInterpolatedEndEffectorMotion EcBaseEndEffectorMotion EcBaseEndEffectorSetMotion EcBaseManipulatorMotion EcMotionScriptObject

Public Member Functions

void moveCircular (const EcVector &center, const EcVector &normalDirection, const EcReal arcLengthInRadian, const EcOrientation *pGoalOrientation, const EcReal speedFactor)
 Set move circular motion. More...
 
void moveCircular (const EcVector &viaPoint, const EcVector &goalPoint, const EcOrientation *pGoalOrientation, const EcReal speedFactor)
 Set move circular motion. More...
 
void moveCircular (const EcVector &center, const EcVector &normalDirection, const EcReal arcLengthInRadian, const EcOrientation *pGoalOrientation, const EcReal speedFactor, const EcReal accelerationFactor, const EcReal blendRadius)
 Set move circular motion. More...
 
void moveCircular (const EcVector &viaPoint, const EcVector &goalPoint, const EcOrientation *pGoalOrientation, const EcReal speedFactor, const EcReal accelerationFactor, const EcReal blendRadius)
 Set move circular motion. More...
 
virtual const EcStringtoken () const EC_OVERRIDE
 token
 
virtual EcBoolean read (const EcMotionScriptTokenTree &tokenTree, EcString *pErrorMsg) EC_OVERRIDE
 read list More...
 
virtual EcString write () const EC_OVERRIDE
 write to script More...
 
virtual void restart () EC_OVERRIDE
 restart by setting the status to NOT_STARTED More...
 
virtual EcReal calculateTotalTime () const EC_OVERRIDE
 
virtual const EcVectorentryDirection () const EC_OVERRIDE
 gets the entry direction More...
 
virtual const EcVectorexitDirection () const EC_OVERRIDE
 gets the exit direction More...
 
- Public Member Functions inherited from EcBaseInterpolatedEndEffectorMotion
virtual Status run (EcBaseControlSystemModifier &modifier, const EcReal currentTime) EC_OVERRIDE
 run the script More...
 
void setSpeedFactor (const EcMotionScriptRealObjectSharedPtr &speedFactor)
 set speed factor
 
void setAccelerationFactor (const EcMotionScriptRealObjectSharedPtr &accelerationFactor)
 set acceleration factor
 
void setBlendRadius (const EcReal value)
 set blend radius
 
EcReal entrySpeed () const
 gets the entry speed
 
EcReal exitSpeed () const
 gets the exit speed
 
const EcBaseInterpolatedEndEffectorMotionpAfter () const
 gets pAfter
 
- Public Member Functions inherited from EcBaseEndEffectorMotion
void setEeIndex (const EcU32 eeIndex)
 set end effector index
 
void setEeIndex (const EcMotionScriptU32ObjectSharedPtr &pEeIndex)
 set end effector index
 
void setIsBuffered (EcBoolean value)
 set is buffered
 
EcBoolean isBuffered () const
 get is buffered
 
- Public Member Functions inherited from EcBaseEndEffectorSetMotion
void setEeSetIndex (const EcU32 eeSetIndex)
 set end effector set index
 
void setEeSetIndex (const EcMotionScriptU32ObjectSharedPtr &pEeSetIndex)
 set end effector set index
 
- Public Member Functions inherited from EcBaseManipulatorMotion
void setManipulatorIndex (const EcU32 manipIndex)
 set manipulator index
 
void setManipulatorIndex (const EcMotionScriptU32ObjectSharedPtr &pManipIndex)
 set manipulator index
 
- Public Member Functions inherited from EcMotionScriptObject
 EcMotionScriptObject ()
 default constructor
 
virtual ~EcMotionScriptObject ()
 destructor
 
Status status () const
 get status
 
EcReal progress () const
 get progress in [0, 1]
 
virtual void setContainter (EcBaseMotionScriptContainer *pContainer)
 set the container
 
EcBoolean readWithContainer (const EcMotionScriptTokenTree &tokenTree, EcBaseMotionScriptContainer *pContainer, EcString *pErrorMsg)
 read with container
 
virtual void pause ()
 request to pause
 
virtual void resume ()
 request to resume
 
virtual void abort ()
 Set the status to ABORTED.
 

Static Public Member Functions

static EcMotionScriptObjectnewObject ()
 motion script object creator
 
static const EcStringscriptToken ()
 script token
 
static EcBoolean calculateBiarc (const EcCoordinateSystemTransformation &entryPose, const EcVector &entryDirection, const EcCoordinateSystemTransformation &exitPose, const EcVector &exitDirection, EcEndEffectorMotionMoveCircular &arc0, EcEndEffectorMotionMoveCircular &arc1)
 Calculate biarc.
 
- Static Public Member Functions inherited from EcBaseInterpolatedEndEffectorMotion
static EcBoolean getEeMotionLimits (const EcBaseControlSystemModifier &modifier, const EcU32 manipIndex, const EcU32 eeSetIndex, const EcU32 eeIndex, EcReal &maxEeSpeed, EcReal &maxEeAcceleration, EcReal &maxAngularSpeed)
 Get end-effector motion limits. More...
 
- Static Public Member Functions inherited from EcBaseEndEffectorSetMotion
static EcReal calculateRealVectorDifference (const EcRealVector &actual, const EcRealVector &desired)
 calculate the difference between two real vectors
 
- Static Public Member Functions inherited from EcMotionScriptObject
static EcMotionScriptSharedPtr parseScript (const EcString &script, EcString *pErrorMsg)
 parse script
 
static EcMotionScriptSharedPtr parseScript (const EcMotionScriptTokenTree &tokenTree, EcBaseMotionScriptContainer *pContainer, EcString *pErrorMsg)
 parse script
 
static EcBoolean isKeyword (const EcString &symbol)
 is keyword
 
static EcBoolean tokenize (const EcString &script, EcStringList &tokens, EcString *pErrorMsg)
 tokenize
 
static EcBoolean readFromTokens (EcStringList &tokens, EcMotionScriptTokenTree &tokenTree, EcString *pErrorMsg)
 read from tokens
 
static EcBoolean registerScript (const EcString &scriptToken, const EcMotionScriptObjectCreator &creator)
 

Protected Types

enum  CircMode {
  CM_CNA,
  CM_BORDER
}
 

Protected Member Functions

virtual EcBoolean calculateGeometry (EcBaseControlSystemModifier &modifier, const EcReal currentTime, const EcCoordinateSystemTransformation &startPose) EC_OVERRIDE
 Calculate geometry. More...
 
virtual const EcCoordinateSystemTransformationgoalPose () const EC_OVERRIDE
 Get the goal pose. More...
 
virtual EcBoolean calculateMotionLimits (EcBaseControlSystemModifier &modifier, const EcReal currentTime, const EcReal maxSpeed, const EcReal maxAcceleration, const EcReal maxAngularSpeed) EC_OVERRIDE
 Calculate speed and acceleration limits. More...
 
virtual EcBoolean isInitialVelocityFeasible (const EcVector &initialVelocity, const EcReal exitSpeed, const EcReal dt) EC_OVERRIDE
 Check if the initial velocity is feasible. More...
 
virtual EcBoolean calculateVelocityProfile (const EcReal entrySpeed) EC_OVERRIDE
 Calculate velocity profile given the entry speed. More...
 
virtual EcBoolean calculateMaxEntrySpeed (const EcVector &entryDirection, const EcReal maxPreSpeed, const EcReal dt, const EcReal exitSpeed) EC_OVERRIDE
 Calculate max entry speed given the exit speed. More...
 
virtual EcBoolean calculateStoppingVelocityProfile (const EcReal entrySpeed) EC_OVERRIDE
 Calculate stopping velocity profile given the entry speed. More...
 
virtual EcBoolean interpolate (EcBaseControlSystemModifier &modifier, const EcReal currentTime) EC_OVERRIDE
 Path interpolation. More...
 
virtual void calculateBlendingEntry (const EcReal preBlendRadius, EcCoordinateSystemTransformation &entryPose, EcVector &entryDirection) EC_OVERRIDE
 Calculate entry pose and direction for blending. More...
 
virtual void calculateBlendingExit (EcCoordinateSystemTransformation &exitPose, EcVector &exitDirection) EC_OVERRIDE
 Calculate exit pose and direction for blending. More...
 
- Protected Member Functions inherited from EcBaseInterpolatedEndEffectorMotion
EcBoolean canDecelerateToExit (const EcReal exitSpeed)
 Can decelerate to the exit speed. More...
 
EcBoolean calculateVelocityProfile (EcBaseControlSystemModifier &modifier, const EcReal currentTime)
 calculate velocity profile
 
virtual void calculateBaseSpeedFactor (const EcBaseControlSystemModifier &modifier)
 calculate base speed factor
 
virtual EcBoolean calculateProgress (EcBaseControlSystemModifier &modifier, const EcReal currentTime)
 calculate progress More...
 
void adjustBlendRadius (const EcReal nextCurveLength, const EcReal nextBlendRadius)
 Adjust the blend radius based on this curve length and next curve length.
 
EcBoolean isConverged () const
 Is converged (path left <= blend radius). More...
 
void setLastTime (const EcReal value, const EcReal baseSpeedFactor)
 set the last time and reset scaled time
 
void runInProgress (EcBaseControlSystemModifier &modifier, const EcReal currentTime)
 run during IN_PROGRESS
 
void runStopping (EcBaseControlSystemModifier &modifier, const EcReal currentTime)
 run during STOPPING
 
- Protected Member Functions inherited from EcBaseEndEffectorMotion
EcBoolean calculatePositionDifference (const EcBaseControlSystemModifier &modifier, const EcEndEffectorPlacement &desired, EcEndEffectorPlacement &actual, EcReal &difference) const
 calculate position difference from desired
 
EcBoolean calculatePositionProgress (const EcBaseControlSystemModifier &modifier, const EcReal initialDifference, const EcReal tolerance, const EcEndEffectorPlacement &desired, EcEndEffectorPlacement &actual, EcReal &progress) const
 
EcBoolean calculateVelocityDifference (const EcBaseControlSystemModifier &modifier, const EcRealVector &desired, EcXmlRealVector &actual, EcReal &difference) const
 calculate current velocity difference from desired
 
EcBoolean calculateVelocityProgress (const EcBaseControlSystemModifier &modifier, const EcReal initialDifference, const EcReal tolerance, const EcRealVector &desired, EcXmlRealVector &actual, EcReal &progress) const
 

Protected Attributes

EcMotionScriptTranslationObjectSharedPtr m_pCenterOrViaPoint
 
EcMotionScriptTranslationObjectSharedPtr m_pNormalDirOrGoalPoint
 
EcMotionScriptRealObjectSharedPtr m_pArcLengthInRadian
 
EcMotionScriptOrientationObjectSharedPtr m_pGoalOrientation
 
enum EcEndEffectorMotionMoveCircular::CircMode m_CircMode
 
EcBoolean m_UseLine
 could only happen when use BORDER
 
- Protected Attributes inherited from EcBaseInterpolatedEndEffectorMotion
EcMotionScriptRealObjectSharedPtr m_pSpeedFactor
 speed factor
 
EcMotionScriptRealObjectSharedPtr m_pAccelerationFactor
 acceleration factor
 
EcMotionScriptRealObjectSharedPtr m_pBlendRadius
 
EcCoordinateSystemTransformation m_StartPose
 the entry pose
 
EcReal m_CurveLength
 total curve length
 
EcReal m_AngularLength
 
EcVector m_AngularAxis
 
EcReal m_BlendRadius
 
EcReal m_PreBlendRadius
 
EcReal m_MaxSpeed
 
EcReal m_MaxAcceleration
 
EcReal m_EntrySpeed
 
EcReal m_ExitSpeed
 
EcReal m_PathTraveled
 
EcEndEffectorMotionMoveCircularSharedPtr m_pArc0
 
EcEndEffectorMotionMoveCircularSharedPtr m_pArc1
 
EcBaseInterpolatedEndEffectorMotionm_pBefore
 
EcBaseInterpolatedEndEffectorMotionm_pAfter
 
EcReal m_AccelTime
 
EcReal m_CruiseTime
 
EcReal m_DecelTime
 
EcReal m_LastTime
 
EcReal m_ScaledTime
 
EcReal m_PathS
 the path parameter
 
EcReal m_PathV
 
EcReal m_BaseSpeedFactor
 current base speed factor
 
EcXmlRealVector m_ActualEeVelocity
 actual end effector velocity
 
EcEndEffectorPlacement m_ActualEePlacement
 actual EE placement
 
EcEndEffectorPlacement m_DesiredEePlacement
 desired EE placement
 
- Protected Attributes inherited from EcBaseEndEffectorMotion
EcMotionScriptU32ObjectSharedPtr m_pEeIndex
 EE index.
 
EcBoolean m_IsBuffered
 used by the group motion manager
 
EcXmlRealVector m_ActualEeVelocity
 actual end effector velocity
 
- Protected Attributes inherited from EcBaseEndEffectorSetMotion
EcMotionScriptU32ObjectSharedPtr m_pEeSetIndex
 EE set index.
 
- Protected Attributes inherited from EcBaseManipulatorMotion
EcMotionScriptU32ObjectSharedPtr m_pManipIndex
 manipulator index
 
- Protected Attributes inherited from EcMotionScriptObject
EcBaseMotionScriptContainerm_pContainer
 the container
 
Status m_Status
 motion status
 
EcReal m_Progress
 motion script progress in [0, 1]
 
EcBoolean m_PauseFlag
 

Friends

class EcGroupMotionManager
 

Additional Inherited Members

- Public Types inherited from EcMotionScriptObject
enum  Status {
  NOT_STARTED,
  IN_PROGRESS,
  STOPPING,
  PAUSED,
  SUCCEEDED,
  FAILED,
  ABORTED
}
 status
 
- Static Protected Member Functions inherited from EcBaseEndEffectorMotion
static EcBoolean parseSpeedAndAccelerationFactors (const EcMotionScriptTokenTree &tokenTree, EcBaseMotionScriptContainer *pContainer, EcString *pErrorMsg, EcMotionScriptRealObjectSharedPtr &speedFactor, EcMotionScriptRealObjectSharedPtr &accelerationFactor)
 parse speed and acceleration factors
 
static EcString writeSpeedAndAccelerationFactors (const EcMotionScriptRealObjectSharedPtr &speedFactor, const EcMotionScriptRealObjectSharedPtr &accelerationFactor)
 write speed and acceleration factors
 
- Static Protected Attributes inherited from EcBaseEndEffectorMotion
static const EcRealVector m_TheNullVelocity
 

Detailed Description

Circular motion.

End effector circular motion.

Definition at line 18 of file ecEndEffectorMotionMoveCircular.h.

Member Enumeration Documentation

Enumerator
CM_CNA 

center-normal-angle mode

CM_BORDER 

border mode

Definition at line 227 of file ecEndEffectorMotionMoveCircular.h.

Member Function Documentation

virtual void EcEndEffectorMotionMoveCircular::calculateBlendingEntry ( const EcReal  preBlendRadius,
EcCoordinateSystemTransformation entryPose,
EcVector entryDirection 
)
protectedvirtual

Calculate entry pose and direction for blending.

Parameters
[in]preBlendRadiusThe blend radius of the previous curve. Must be smaller than the current curve length.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual void EcEndEffectorMotionMoveCircular::calculateBlendingExit ( EcCoordinateSystemTransformation exitPose,
EcVector exitDirection 
)
protectedvirtual

Calculate exit pose and direction for blending.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::calculateGeometry ( EcBaseControlSystemModifier modifier,
const EcReal  currentTime,
const EcCoordinateSystemTransformation startPose 
)
protectedvirtual

Calculate geometry.

Parameters
[in]startPosethe start pose
Returns
True if geometry is valid.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::calculateMaxEntrySpeed ( const EcVector entryDirection,
const EcReal  maxPreSpeed,
const EcReal  dt,
const EcReal  exitSpeed 
)
protectedvirtual

Calculate max entry speed given the exit speed.

The method is only used after the first function block.

Parameters
[in]entryDirectionThe entry direction. Must be a unit vector.
Returns
True if exit speed needs update (call calculateVelocityProfile to lower)

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::calculateMotionLimits ( EcBaseControlSystemModifier modifier,
const EcReal  currentTime,
const EcReal  maxSpeed,
const EcReal  maxAcceleration,
const EcReal  maxAngularSpeed 
)
protectedvirtual

Calculate speed and acceleration limits.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::calculateStoppingVelocityProfile ( const EcReal  entrySpeed)
protectedvirtual

Calculate stopping velocity profile given the entry speed.

Returns
True if can be stopped within.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcReal EcEndEffectorMotionMoveCircular::calculateTotalTime ( ) const
virtual

Calculate total time.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::calculateVelocityProfile ( const EcReal  entrySpeed)
protectedvirtual

Calculate velocity profile given the entry speed.

Returns
True if the exit speed can be reached, otherwise needs update (lower).

Implements EcBaseInterpolatedEndEffectorMotion.

virtual const EcVector& EcEndEffectorMotionMoveCircular::entryDirection ( ) const
virtual

gets the entry direction

Implements EcBaseInterpolatedEndEffectorMotion.

virtual const EcVector& EcEndEffectorMotionMoveCircular::exitDirection ( ) const
virtual

gets the exit direction

Implements EcBaseInterpolatedEndEffectorMotion.

virtual const EcCoordinateSystemTransformation& EcEndEffectorMotionMoveCircular::goalPose ( ) const
protectedvirtual

Get the goal pose.

Returns
The exit pose may not be valid before calling calculateGeometry.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::interpolate ( EcBaseControlSystemModifier modifier,
const EcReal  currentTime 
)
protectedvirtual

Path interpolation.

Returns
true if interpolation if finished.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveCircular::isInitialVelocityFeasible ( const EcVector initialVelocity,
const EcReal  exitSpeed,
const EcReal  dt 
)
protectedvirtual

Check if the initial velocity is feasible.

The method is only used for the first function block. The method does not check if the exit speed can be reached by acceleration.

Implements EcBaseInterpolatedEndEffectorMotion.

void EcEndEffectorMotionMoveCircular::moveCircular ( const EcVector center,
const EcVector normalDirection,
const EcReal  arcLengthInRadian,
const EcOrientation pGoalOrientation,
const EcReal  speedFactor 
)

Set move circular motion.

Parameters
[in]centerthe 3D circle center
[in]normalDirectionthe normal direction of the circle plane
[in]arcLengthInRadianthe arc length in radian. 2pi defines a full circle.
[in]pGoalOrientationthe goal orientation. If NULL, will use the Frenet frame.
[in]speedFactorthe speed factor
void EcEndEffectorMotionMoveCircular::moveCircular ( const EcVector viaPoint,
const EcVector goalPoint,
const EcOrientation pGoalOrientation,
const EcReal  speedFactor 
)

Set move circular motion.

Parameters
[in]viaPointthe via point
[in]goalPointthe goal point
[in]pGoalOrientationthe goal orientation. If NULL, will use the Frenet frame.
[in]speedFactorthe speed factor
void EcEndEffectorMotionMoveCircular::moveCircular ( const EcVector center,
const EcVector normalDirection,
const EcReal  arcLengthInRadian,
const EcOrientation pGoalOrientation,
const EcReal  speedFactor,
const EcReal  accelerationFactor,
const EcReal  blendRadius 
)

Set move circular motion.

Parameters
[in]centerthe 3D circle center
[in]normalDirectionthe normal direction of the circle plane
[in]arcLengthInRadianthe arc length in radian. 2pi defines a full circle.
[in]pGoalOrientationthe goal orientation. If NULL, will use the Frenet frame.
[in]speedFactorthe speed factor in range (0, 1]
[in]accelerationFactorthe acceleration factor in range (0, 1]
void EcEndEffectorMotionMoveCircular::moveCircular ( const EcVector viaPoint,
const EcVector goalPoint,
const EcOrientation pGoalOrientation,
const EcReal  speedFactor,
const EcReal  accelerationFactor,
const EcReal  blendRadius 
)

Set move circular motion.

Parameters
[in]viaPointthe via point
[in]goalPointthe goal point
[in]pGoalOrientationthe goal orientation. If NULL, will use the Frenet frame.
[in]speedFactorthe speed factor in range (0, 1]
[in]accelerationFactorthe acceleration factor in range (0, 1]
virtual EcBoolean EcEndEffectorMotionMoveCircular::read ( const EcMotionScriptTokenTree tokenTree,
EcString pErrorMsg 
)
virtual

read list

Implements EcMotionScriptObject.

virtual void EcEndEffectorMotionMoveCircular::restart ( )
virtual

restart by setting the status to NOT_STARTED

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcString EcEndEffectorMotionMoveCircular::write ( ) const
virtual

write to script

Implements EcMotionScriptObject.


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.