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

End effector linear motion. More...

#include <ecEndEffectorMotionMoveLinear.h>

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

Public Member Functions

void moveLinear (const EcCoordinateSystemTransformation &waypoint, const EcReal speedFactor)
 linear interpolate More...
 
void moveLinear (const EcCoordinateSystemTransformation &waypoint, const EcReal speedFactor, const EcReal accelerationFactor, const EcReal blendRadius)
 linear interpolate 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 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 setFeedRate (const EcReal value)
 set feed rate
 
void setFeedRate (const EcMotionScriptRealObjectSharedPtr &value)
 set speed factor
 
void setSpeedFactor (const EcReal value)
 set speed factor
 
void setSpeedFactor (const EcMotionScriptRealObjectSharedPtr &value)
 set speed factor
 
void setAccelerationFactor (const EcReal value)
 set acceleration factor
 
void setAccelerationFactor (const EcMotionScriptRealObjectSharedPtr &value)
 set acceleration factor
 
void setBlendRadius (const EcReal value)
 set blend radius
 
void setBlendRadius (const EcMotionScriptRealObjectSharedPtr &value)
 set blend radius
 
void setStaticPcs (const EcCoordinateSystemTransformation &value)
 set static pcs
 
void setStaticPcs (const EcMotionScriptPoseObjectSharedPtr &value)
 set static pcs
 
const EcMotionScriptPoseObjectstaticPcsPtr () const
 get the static PCS
 
const EcCoordinateSystemTransformationgoalPose () const
 Get the goal pose. More...
 
EcReal maxSpeed () const
 gets the max speed
 
EcReal maxAcceleration () const
 gets the max speed
 
EcReal entrySpeed () const
 gets the entry speed
 
EcReal exitSpeed () const
 gets the exit speed
 
EcReal calculateTotalTime () const
 
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 setBufferMode (const EcU32 value)
 Set buffer mode. More...
 
EcU32 bufferMode () const
 Get is buffered. More...
 
- 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
 
const EcMotionScriptU32ObjectSharedPtr & manipulatorIndex () const
 get manipulator index
 
void setMotionId (const EcInt32 id)
 Set the motion ID.
 
EcInt32 motionId () const
 Get the motion ID.
 
- 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 EcBoolean setContainer (EcBaseMotionScriptContainer *pContainer)
 set the container More...
 
virtual EcMotionScriptObjectclone (EcBaseMotionScriptContainer *pContainer) const
 Clone with container. More...
 
EcBoolean readWithContainer (const EcMotionScriptTokenTree &tokenTree, EcBaseMotionScriptContainer *pContainer, EcString *pErrorMsg)
 read with container
 
virtual void pause ()
 request to pause
 
virtual void resume ()
 request to resume
 

Static Public Member Functions

static EcMotionScriptObjectnewObject ()
 motion script object creator
 
static const EcStringscriptToken ()
 script token
 
- 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)
 
static EcStringSet registeredScriptTokens ()
 

Protected Member Functions

virtual EcBoolean calculateGeometry (EcBaseControlSystemModifier &modifier, const EcReal currentTime, const EcCoordinateSystemTransformation &startPose) EC_OVERRIDE
 Calculate geometry. 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 calculateMaxEntrySpeed (const EcBaseInterpolatedEndEffectorMotion *pBefore, const EcReal dt, const EcReal exitSpeed) EC_OVERRIDE
 Calculate max entry speed given the exit speed. More...
 
virtual EcBoolean interpolate (EcBaseControlSystemModifier &modifier, const EcReal currentTime) EC_OVERRIDE
 Path interpolation. More...
 
virtual void calculateBlendingEntry (const EcReal preBlendRadius, EcCoordinateSystemTransformation &entryPose) EC_OVERRIDE
 Calculate entry pose and direction for blending. More...
 
virtual void calculateBlendingExit (EcCoordinateSystemTransformation &exitPose) 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
 
EcU32 calculateVelocityProfile (const EcReal entrySpeed)
 Calculate velocity profile given the entry speed. More...
 
EcBoolean calculateStoppingVelocityProfile ()
 Calculate stopping velocity profile given the entry speed. More...
 
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
virtual 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

EcMotionScriptPoseObjectSharedPtr m_pWaypoint
 
- Protected Attributes inherited from EcBaseInterpolatedEndEffectorMotion
EcMotionScriptRealObjectSharedPtr m_pSpeedFactor
 speed factor
 
EcMotionScriptRealObjectSharedPtr m_pAccelerationFactor
 acceleration factor
 
EcMotionScriptRealObjectSharedPtr m_pBlendRadius
 
EcMotionScriptRealObjectSharedPtr m_pFeedRate
 
EcMotionScriptPoseObjectSharedPtr m_pStaticPcs
 the static PCS
 
EcCoordinateSystemTransformation m_StartPose
 the entry pose
 
EcCoordinateSystemTransformation m_GoalPose
 
EcReal m_CurveLength
 total curve length
 
EcReal m_AngularLength
 
EcVector m_AngularAxis
 
EcBoolean m_IsGeometryValid
 
EcReal m_MaxSpeed
 
EcReal m_MaxAcceleration
 
EcReal m_MaxEeAcceleration
 
EcBoolean m_IsMotionLimitValid
 
EcReal m_BlendRadius
 
EcReal m_PreBlendRadius
 
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
 
EcBoolean m_IsVelocityProfileValid
 
EcBoolean m_CanStopWithin
 only used by stopping
 
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.
 
EcU32 m_BufferMode
 used by the group motion manager
 
- Protected Attributes inherited from EcBaseEndEffectorSetMotion
EcMotionScriptU32ObjectSharedPtr m_pEeSetIndex
 EE set index.
 
- Protected Attributes inherited from EcBaseManipulatorMotion
EcMotionScriptU32ObjectSharedPtr m_pManipIndex
 manipulator index
 
EcInt32 m_MotionId
 the motion ID, currently only used by the group motion manager
 
- 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
 

Additional Inherited Members

- Public Types inherited from EcMotionScriptObject
enum  Status {
  NOT_STARTED,
  IN_PROGRESS,
  STOPPING,
  PAUSED,
  SUCCEEDED,
  FAILED
}
 status
 
- Static Protected Member Functions inherited from EcBaseInterpolatedEndEffectorMotion
static EcBoolean calculateVelocityProfile (EcBaseInterpolatedEndEffectorMotion *pInterp)
 Calculate velocity profile.
 
- 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 EcBoolean parsePostionAndVelocityTolerances (const EcMotionScriptTokenTree &tokenTree, EcBaseMotionScriptContainer *pContainer, EcString *pErrorMsg, EcMotionScriptRealObjectSharedPtr &positionTolerance, EcMotionScriptRealObjectSharedPtr &velocityTolerance)
 parse position and velocity tolerances
 
static EcString writePostionAndVelocityTolerances (const EcMotionScriptRealObjectSharedPtr &positionTolerance, const EcMotionScriptRealObjectSharedPtr &velocityTolerance)
 write position and velocity tolerances
 

Detailed Description

End effector linear motion.

Definition at line 17 of file ecEndEffectorMotionMoveLinear.h.

Member Function Documentation

virtual void EcEndEffectorMotionMoveLinear::calculateBlendingEntry ( const EcReal  preBlendRadius,
EcCoordinateSystemTransformation entryPose 
)
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 EcEndEffectorMotionMoveLinear::calculateBlendingExit ( EcCoordinateSystemTransformation exitPose)
protectedvirtual

Calculate exit pose and direction for blending.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveLinear::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 EcEndEffectorMotionMoveLinear::calculateMaxEntrySpeed ( const EcBaseInterpolatedEndEffectorMotion pBefore,
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]pBeforethe motion before
[in]dtthe time-step
[in]exitSpeedtarget exit speed

Implements EcBaseInterpolatedEndEffectorMotion.

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

Calculate speed and acceleration limits.

Implements EcBaseInterpolatedEndEffectorMotion.

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

gets the entry direction

Implements EcBaseInterpolatedEndEffectorMotion.

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

gets the exit direction

Implements EcBaseInterpolatedEndEffectorMotion.

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

Path interpolation.

Returns
true if interpolation if finished.

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcBoolean EcEndEffectorMotionMoveLinear::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 EcEndEffectorMotionMoveLinear::moveLinear ( const EcCoordinateSystemTransformation waypoint,
const EcReal  speedFactor 
)

linear interpolate

Parameters
[in]waypointthe waypoint
[in]speedFactorthe speed factor in range (0, 1]
void EcEndEffectorMotionMoveLinear::moveLinear ( const EcCoordinateSystemTransformation waypoint,
const EcReal  speedFactor,
const EcReal  accelerationFactor,
const EcReal  blendRadius 
)

linear interpolate

Parameters
[in]waypointthe waypoint
[in]speedFactorthe speed factor in range (0, 1]
[in]accelerationFactorthe acceleration factor in range (0, 1]
[in]blendRadiusthe blend radius
virtual EcBoolean EcEndEffectorMotionMoveLinear::read ( const EcMotionScriptTokenTree tokenTree,
EcString pErrorMsg 
)
virtual

read list

Implements EcMotionScriptObject.

virtual void EcEndEffectorMotionMoveLinear::restart ( )
virtual

restart by setting the status to NOT_STARTED

Implements EcBaseInterpolatedEndEffectorMotion.

virtual EcString EcEndEffectorMotionMoveLinear::write ( ) const
virtual

write to script

Implements EcMotionScriptObject.


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