INOS
CINOSMovePathTrajectory Class Referenceabstract
Inheritance diagram for CINOSMovePathTrajectory:

Public Types

enum  { eFlgNone = 0x00000000 , eFlgStopSupported = 0x00000001 , eFlgNeedsInterpolatorSegments = 0x00000002 }
 flags
 

Public Member Functions

virtual uint32 GetMoveTime (double &adMoveTime, double adDelta=0.0)
 Return time [sec] the path needs until End - Delta.
 
virtual uint32 GetMoveTicks (uint64 &adMoveTicks, double arDelta=0.0)
 Return bus ticks the path needs until End - Delta.
 
virtual uint32 GetMoveLength (double &adMoveLength)
 Return the path length [path units].
 
virtual uint32 GetMoveRemaining (double &adMoveRemaining)
 Return the remaining path length [path units]. It can be used to ask for the actual remaining length still needs to move during a running path. At path start it returns adMoveLeft = PathLength, at the end adMoveLeft = 0.0.
 
virtual uint32 GetMaxConstantVelocity (double &adMaxConstantVelocity, CINOSMovePathCurve *apCurve)
 Return the max. allowed constant velocity the path can be run with without violating any axes limits (V, A, B, J).
 
virtual uint32 Prepare ()
 prepare move path
 
virtual uint32 PrepareAppend ()=0
 prepare trajectory of curve to append
 
virtual uint32 Append ()=0
 prepare trajectory of curve to append
 
virtual uint32 PrepareRun ()
 prepare trajectory to run
 
virtual uint32 Run (TINOSMovePathVec &vOffset, bool abDelegate)
 run move path
 
virtual uint32 Stop ()=0
 stop move path
 
virtual uint32 Break ()=0
 break move path
 
virtual uint32 Continue ()=0
 continue move path
 
virtual uint32 Cancel ()
 cancel move path
 
virtual uint32 GetData (TINOSMovePathVec &vPos, TINOSMovePathVec &vVel, TINOSMovePathVec &vAcc, TINOSMovePathVec &vJrk)
 get data from trajectory buffer
 
virtual uint32 GetData (uint32 &ouSegmentId, TINOSMovePathVec &vPos, TINOSMovePathVec &vVel, TINOSMovePathVec &vAcc, TINOSMovePathVec &vJrk)
 get data from trajectory buffer
 
virtual CINOSMovePathSegmentGetActSegment ()
 
virtual uint32 CancelData ()
 cancel trajectory buffer data
 
uint32 GetBufferFillLevel () const
 
virtual uint32 HandleData (CINOSMovePathSegment *apSegment, TINOSMovePathVec &avPos, TINOSMovePathVec &avVel, TINOSMovePathVec &avAcc, TINOSMovePathVec &avJrk)
 handle data of all resources
 
uint32 GetFlags ()
 Returns general trajectory generator flags.
 
void GetActual (SINOSRampData &aActual)
 Get actual path s,v,a,j.
 
 CINOSMovePathTrajectory (class CINOSMovePath *apPath=NULL)
 constructor
 
virtual ~CINOSMovePathTrajectory ()
 destructor
 

Protected Types

enum  { ePutDataFlgNone = 0x00000000 , ePutDataFlgWaitIfFull = 0x00000001 }
 putdata flags
 
enum  { eFlgIntCancelRequest = 0x00000001 }
 internal flags
 
enum  EBufferType { eTypeActive , eTypePassive }
 buffer type
 
enum  {
  eFlgFull = 0x00000001 , eFlgNoMoreData = 0x00000002 , eFlgWrapAround = 0x00000004 , eFlgCalculated = 0x00000008 ,
  eFlgDelegate = 0x00000010 , eFlgFollow = 0x00000020 , eFlgEnd = 0x00000040
}
 buffer flags
 

Protected Member Functions

class CINOSMovePathGetPath ()
 get pointer to my path
 
void SetPath (class CINOSMovePath *apPath)
 set pointer to my path
 
class CINOSMovePathCurveGetPrepareCurve ()
 get pointer to my prepare curve
 
class CINOSMovePathCurveGetRunCurve ()
 get pointer to run curve
 
class CINOSMovePathResourceAxisGetAxis (uint32 auIndex)
 get pointer to axis
 
virtual uint32 iPrepare ()=0
 prepare run
 
virtual uint32 PrepareEvents ()
 prepare events
 
virtual bool GenData (CINOSMovePathSegment *&opSegment, double &adP, TINOSMovePathVec &vPos)=0
 generate data
 
virtual uint32 PutData (CINOSMovePathSegment *apSegment, double adP, TINOSMovePathVec &vPos, uint32 auFlags)
 put data into trajectory buffer
 
uint32 PutCmd (uint32 auCommand)
 put command to command queue
 
uint32 HandleCmd (uint32 auError=INOS_OK)
 check command queue
 
uint32 HandlePrestartEvent ()
 handle prestart event
 
uint32 HandleEvents ()
 handle events
 
void EmitEvent (CINOSMovePathEvent *apEvent, uint64 auTicksStart)
 emit event
 
uint32 WaitCmd (uint32 auCommand, uint32 auError=INOS_MOVEPATH_ERROR_NO_COMMAND_QUEUE)
 wait for either auCommand or eCmdAbort
 
virtual void iActiveHook ()
 active hook
 
virtual uint32 iCancelData ()
 internal cancel data
 
double CalcRotationAngle (TINOSMovePathVec &vUnitVector1, TINOSMovePathVec &vUnitVector2)
 
void CalcFollow (TINOSMovePathVec &vPos, TINOSMovePathVec &vDir)
 calc follow axis
 
void GetPositionLast (TINOSMovePathVec &ovLast)
 get last path position vector
 
virtual CINCOObject * RequestRegister ()
 return pointer to inco registration
 
void ReleaseRegister ()
 release inco registration
 
CINCOObject * GetRegister ()
 get pointer to inco registration (if any)
 
 DECLARE_DYNAMIC (CINOSMovePathTrajectory)
 

Protected Attributes

inosName32 m_cType
 type
 
uint32 m_uFlags
 trajectory generator flags
 
class CINOSMovePathm_pPath
 pointer to my path
 
double m_dCycleTime
 cycle time
 
double m_dCycleTime_1
 inverse cycle time
 
double m_dSlowMotion
 slowmotion factor
 
uint8 m_uMainAxisIndex
 main axis index
 
uint8 m_uMainOversampling = 1
 main axis oversampling
 
inos_std::vector< uint8 > m_uMainCycleDownSampling
 main cycle down sampling
 
inos_std::vector< CINOSMovePathResource * > m_vResources
 
uint32 m_uNoResources = 0
 
char m_cSpeedSet [64] = {0}
 speedset name
 
SINOSRampParam m_sSpeedSet
 speedset
 
uint32 m_uFlagsInternal = 0
 internal flags
 
enum CINOSMovePathTrajectory::EBufferType m_eBufferType
 
uint32 m_uBufferFlags
 buffer flags
 
uint32 m_uBufferSize
 buffer size
 
uint32 m_uBufferReady
 buffer ready level
 
uint32 m_uBufferLow
 buffer low level
 
uint32 m_uBufferWr
 buffer write index
 
uint32 m_uBufferTotalWr
 buffer write total index
 
uint32 m_uBufferRd
 buffer read index
 
uint32 m_uBufferTotalRd
 buffer read total index
 
uint32 m_uBufferCnt
 buffer entries
 
CINOSMovePathSegment ** m_ppBufferSegment
 corresponding segment
 
doublem_pBufferP
 corresponding buffer virtual position P
 
TINOSMovePathVec * m_pBuffer
 the buffer
 
uintid m_uActiveHookId
 active hook id
 
TINOSMovePathVec m_vOffset
 running offset
 
CINOSMovePathSegmentm_pPathSegment
 current segment
 
uint64 m_uTicksStart
 start ticks
 
uint32 m_uTicksCurrent
 current ticks
 
uint8 m_uBusId
 bus id
 
uint32 m_uBusTicksPerMs
 bus ticks per ms
 
uint32 m_uBusTicksPerAxisTick
 bus ticks per axis tick
 
double m_dTime
 current timestamp
 
double m_dP
 current position
 
SINOSMovePathActual m_Actual = {0}
 internal actuals
 
SINOSMovePathActualm_pActual
 actuals (handled over to inco registration of involved axes)
 
double m_dActP = 0.0
 p value
 
TINOSMovePathVec m_vPos
 position
 
TINOSMovePathVec m_vVel
 velocity
 
TINOSMovePathVec m_vAcc
 acceleration
 
TINOSMovePathVec m_vJrk
 jerk
 
uint8 m_uCycleDownSampling [DF_INOS_MOVEPATH_MAX_AXES]
 main cycle down sampling
 
CINOSMovePathSegmentm_pActSegment = nullptr
 current act segment
 
CINOSMovePathSegmentm_pNextSegment = nullptr
 next act segment
 
inos_std::vector< uint8 > m_vCycleDownSampling
 main cycle down sampling
 
uint32 m_uFilterLength
 filter length
 
double m_dFilterFactor
 filter
 
TINOSMovePathVec m_vFilterPos
 filtered position
 
uint32 m_uFollowIndex
 index of axis to follow
 
double m_dFollowFactor
 follow unit factor
 
double m_dFollowAngle
 actual follow angle
 
TINOSMovePathVec m_vFollowDir
 actual direction vector
 
uint32 m_uRegisterCnt = 0
 inco tree registration counter
 
CINCOObject * m_pRegister = nullptr
 pointer to inco registration
 

Friends

class CINOSMovePath
 
class CINOSMcRobot
 

Member Function Documentation

◆ Append()

virtual uint32 CINOSMovePathTrajectory::Append ( )
pure virtual

prepare trajectory of curve to append

Implemented in CINOSMovePathTrajectoryConstant, and CINOSMovePathTrajectorySegment.

◆ Break()

virtual uint32 CINOSMovePathTrajectory::Break ( )
pure virtual

◆ CalcRotationAngle()

double CINOSMovePathTrajectory::CalcRotationAngle ( TINOSMovePathVec &  vUnitVector1,
TINOSMovePathVec &  vUnitVector2 
)
protected

calc rotation angle between unit vector1 and unit vector2, assume both vectors lie in the same plane with axes index 0 and 1

◆ Continue()

virtual uint32 CINOSMovePathTrajectory::Continue ( )
pure virtual

continue move path

Implemented in CINOSMovePathTrajectoryConstant, and CINOSMovePathTrajectorySegment.

◆ GenData()

virtual bool CINOSMovePathTrajectory::GenData ( CINOSMovePathSegment *&  opSegment,
double adP,
TINOSMovePathVec &  vPos 
)
protectedpure virtual

◆ GetActual()

void CINOSMovePathTrajectory::GetActual ( SINOSRampData aActual)
inline

Get actual path s,v,a,j.

Parameters
apHandlerThe handler function
apObjectThe handler instance

◆ GetBufferFillLevel()

uint32 CINOSMovePathTrajectory::GetBufferFillLevel ( ) const
Returns
the current count of buffer entries. 0 means 'empty'.

◆ GetFlags()

uint32 CINOSMovePathTrajectory::GetFlags ( )
inline

Returns general trajectory generator flags.

Returns
Returns The flags

◆ GetMaxConstantVelocity()

virtual uint32 CINOSMovePathTrajectory::GetMaxConstantVelocity ( double adMaxConstantVelocity,
CINOSMovePathCurve apCurve 
)
virtual

Return the max. allowed constant velocity the path can be run with without violating any axes limits (V, A, B, J).

Parameters
adMaxConstantVelocityReference to variable where to write the result to
Returns
Returns INOS_OK if successful or an appropriate error code (see INOS_MOVEPATH_ERROR_xxx in inoserror.h).

◆ GetMoveLength()

virtual uint32 CINOSMovePathTrajectory::GetMoveLength ( double adMoveLength)
virtual

Return the path length [path units].

Parameters
adMoveLengthReference to variable where to write the result to
Returns
Returns INOS_OK if successful or an appropriate error code (see INOS_MOVEPATH_ERROR_xxx in inoserror.h).

◆ GetMoveRemaining()

virtual uint32 CINOSMovePathTrajectory::GetMoveRemaining ( double adMoveRemaining)
virtual

Return the remaining path length [path units]. It can be used to ask for the actual remaining length still needs to move during a running path. At path start it returns adMoveLeft = PathLength, at the end adMoveLeft = 0.0.

Parameters
adMoveLeftReference to variable where to write the result to
Returns
Returns INOS_OK if successful or an appropriate error code (see INOS_MOVEPATH_ERROR_xxx in inoserror.h).

◆ GetMoveTicks()

virtual uint32 CINOSMovePathTrajectory::GetMoveTicks ( uint64 adMoveTicks,
double  arDelta = 0.0 
)
virtual

Return bus ticks the path needs until End - Delta.

Parameters
auMoveTicksReference to variable where to write the result to
adDeltaThe requested end delta [path units].
Returns
Returns INOS_OK if successful or an appropriate error code (see INOS_MOVEPATH_ERROR_xxx in inoserror.h).

◆ GetMoveTime()

virtual uint32 CINOSMovePathTrajectory::GetMoveTime ( double adMoveTime,
double  adDelta = 0.0 
)
inlinevirtual

Return time [sec] the path needs until End - Delta.

Parameters
adMoveTimeReference to variable where to write the result to
adDeltaThe requested end delta [path units].
Returns
Returns INOS_OK if successful or an appropriate error code (see INOS_MOVEPATH_ERROR_xxx in inoserror.h).

Reimplemented in CINOSMovePathTrajectoryConstant, and CINOSMovePathTrajectorySegment.

◆ iPrepare()

virtual uint32 CINOSMovePathTrajectory::iPrepare ( )
protectedpure virtual

◆ Prepare()

virtual uint32 CINOSMovePathTrajectory::Prepare ( )
virtual

prepare move path

Reimplemented in CINOSMovePathTrajectorySegment.

◆ PrepareAppend()

virtual uint32 CINOSMovePathTrajectory::PrepareAppend ( )
pure virtual

prepare trajectory of curve to append

Implemented in CINOSMovePathTrajectoryConstant, and CINOSMovePathTrajectorySegment.

◆ Stop()

virtual uint32 CINOSMovePathTrajectory::Stop ( )
pure virtual

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