INOS
cinosmovepath.h
Go to the documentation of this file.
1 //******************************************************************************
26 //******************************************************************************
27 #ifndef INC_CINOSMOVEPATH_H
28 #define INC_CINOSMOVEPATH_H
29 //------------------------------------------------------------------------------
30 // defines
31 //------------------------------------------------------------------------------
32 //
33 // --- general -----------------------------------------------------------------
34 //
39 #define DF_INOS_MOVEPATH_ID_DEFAULT 0xffffffff
40 
43 #define DF_INOS_MOVEPATH_TOLERANCE_DEFAULT -1.0
44 
47 #define DF_INOS_MOVEPATH_TOLERANCE_MIN 1.0e-4
48 
51 #define DF_INOS_MOVEPATH_VELOCITY_DEFAULT -1.0
52 
55 #define DF_INOS_MOVEPATH_FLAG_NO 0x00000000
56 
59 #define DF_INOS_MOVEPATH_FLAG_ABS 0x00000001
60 
63 #define DF_INOS_MOVEPATH_FLAG_INC 0x00000002
64 
69 #define DF_INOS_MOVEPATH_FLAG_NLG 0x00000004
70 
74 #define DF_INOS_MOVEPATH_FLAG_RAW 0x00000008
75 
78 #define DF_INOS_MOVEPATH_THE_END 1
79 
80 //------------------------------------------------------------------------------
81 // Curve flags
82 
86 #define DF_INOS_MOVEPATH_FLAG_CURVE_OWNED 0x01000000
87 
90 #define DF_INOS_MOVEPATH_FLAG_CONTINUATION 0x02000000
91 
94 #define DF_INOS_MOVEPATH_FLAG_INCOMPLETE 0x04000000
95 
100 #define DF_INOS_MOVEPATH_FLAG_OFFSET_ZERO 0x40000000
101 
105 #define DF_INOS_MOVEPATH_FLAG_RELOCATABLE 0x80000000
106 //
107 
108 //------------------------------------------------------------------------------
109 // Segment flags
110 #define DF_INOS_MOVEPATH_FLAG_SHORT 0x10000000 // segment is too short
111 #define DF_INOS_MOVEPATH_FLAG_PURE_LINEAR 0x20000000 // segment is pure linear
112 #define DF_INOS_MOVEPATH_FLAG_PURE_RAPID 0x40000000 // segment is pure rapid
113 
117 #define DF_INOS_MOVEPATH_OPTION_NONE uint32(0x00000000)
118 
121 #define DF_INOS_MOVEPATH_OPTION_EXCEPTION_SUPPORT uint32(0x00000001)
122 
125 #define DF_INOS_MOVEPATH_OPTION_REGISTER_INCO uint32(0x00000004)
126 
129 #define DF_INOS_MOVEPATH_OPTION_ALL \
130  (DF_INOS_MOVEPATH_OPTION_EXCEPTION_SUPPORT| \
131  DF_INOS_MOVEPATH_OPTION_REGISTER_INCO)
132 
133 #define DF_INOS_MOVEPATH_OPTION_DEFAULT DF_INOS_MOVEPATH_OPTION_NONE
134 
135 // --- helper ------------------------------------------------------------------
136 //
140 #define DF_INOS_MOVEPATH_HELPER_CORE_NAME "Helper.Core"
141 #define DF_INOS_MOVEPATH_HELPER_CORE_DEFAULT -1
142 //
146 #define DF_INOS_MOVEPATH_HELPER_PRIORITY_NAME "Helper.Priority"
147 #define DF_INOS_MOVEPATH_HELPER_PRIORITY_DEFAULT DF_INOS_TASK_PRIO_REALTIME_LOWEST
148 
152 #define DF_INOS_MOVEPATH_PREPARE_HELPER_CORE_NAME "PrepareHelper.Core"
153 #define DF_INOS_MOVEPATH_PREPARE_HELPER_CORE_DEFAULT -1
154 //
158 #define DF_INOS_MOVEPATH_PREPARE_HELPER_PRIORITY_NAME "PrepareHelper.Priority"
159 #define DF_INOS_MOVEPATH_PREPARE_HELPER_PRIORITY_DEFAULT DF_INOS_TASK_PRIO_BACKGROUND
160 
163 #define DF_INOS_MOVEPATH_RUN_HELPER_CORE_NAME "RunHelper.Core"
164 #define DF_INOS_MOVEPATH_RUN_HELPER_CORE_DEFAULT -1
165 //
169 #define DF_INOS_MOVEPATH_RUN_HELPER_PRIORITY_NAME "RunHelper.Priority"
170 #define DF_INOS_MOVEPATH_RUN_HELPER_PRIORITY_DEFAULT DF_INOS_TASK_PRIO_REALTIME_LOWEST
171 //
172 // --- mcrobot -----------------------------------------------------------------
173 //
180 #define DF_INOS_MOVEPATH_MCROBOT_PREPAREPATH_NAME "McRobot.PreparePath"
181 #define DF_INOS_MOVEPATH_MCROBOT_PREPAREPATH_DEFAULT 0
182 #define DF_INOS_MOVEPATH_MCROBOT_PREPAREPATH_NOTHING 0
183 #define DF_INOS_MOVEPATH_MCROBOT_PREPAREPATH_ERROR 1
184 //
185 // --- interpolator ------------------------------------------------------------
186 //
195 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_NAME "Shape.OnShrink"
196 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_DEFAULT 1
197 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_LIMIT_AMAX 0
198 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_STOP 1
199 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_ERROR 2
200 #define DF_INOS_MOVEPATH_INTERPOLATOR_SHAPE_ON_SHRINK_LIMIT_JMAX 3
201 
207 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_MAX_ANGLE "Nurbs.MaxAngle"
208 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_MAX_ANGLE_DEFAULT 20.0
209 
216 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_MAX_LENGTH "Nurbs.MaxLength"
217 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_MAX_LENGTH_DEFAULT 0.0
218 
226 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_OVERLAP "Nurbs.Overlap"
227 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_OVERLAP_DEFAULT 0.2
228 
233 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_VECTORIZE_FACTOR "Nurbs.Vectorize"
234 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_VECTORIZE_FACTOR_DEFAULT 0.1
235 
240 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_INTERPOLATION_POINTS "Nurbs.InterpolationPoints"
241 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_INTERPOLATION_POINTS_DEFAULT DF_INOS_NURBSCURVE_INTERPOLATION_POINTS
242 
248 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_D3_FACTOR "Nurbs.D3Factor"
249 #define DF_INOS_MOVEPATH_INTERPOLATOR_NURBS_D3_FACTOR_DEFAULT 20.0
250 
257 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_PURE "Clothoid.Pure"
258 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_PURE_DEFAULT 1.0
259 
266 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_REDUCE "Clothoid.Reduce"
267 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_REDUCE_DEFAULT 1.0
268 
275 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_R "Clothoid.R"
276 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_L "Clothoid.L"
277 #define DF_INOS_MOVEPATH_INTERPOLATOR_CLOTHOID_A "Clothoid.A"
278 
279 // --- trajectory --------------------------------------------------------------
280 //
284 #define DF_INOS_MOVEPATH_TRAJECTORY_MAIN_AXIS_NAME "Trajectory.MainAxis"
285 #define DF_INOS_MOVEPATH_TRAJECTORY_MAIN_AXIS_DEFAULT 0
286 
292 #define DF_INOS_MOVEPATH_TRAJECTORY_LOGGING_MASK "Trajectory.Logging.Mask"
293 #define DF_INOS_MOVEPATH_TRAJECTORY_LOGGING_MASK_DEFAULT 0x00000001
294 #define DF_INOS_MOVEPATH_TRAJECTORY_LOGGING_MASK_NONE 0.0
295 #define DF_INOS_MOVEPATH_TRAJECTORY_LOGGING_MASK_PATHS 0x00000001
296 
307 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_TYPE_NAME "Trajectory.Buffer.Type"
308 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_TYPE_DEFAULT "active"
309 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_TYPE_NONE "none"
310 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_TYPE_ACTIVE "active"
311 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_TYPE_PASSIVE "passive"
312 
315 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_SIZE_NAME "Trajectory.Buffer.Size"
316 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_SIZE_DEFAULT 256
317 
320 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_READY_NAME "Trajectory.Buffer.Ready"
321 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_READY_DEFAULT 16
322 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_READY_FULL_PATH 0xffffffff
323 
326 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_LOW_NAME "Trajectory.Buffer.Low"
327 #define DF_INOS_MOVEPATH_TRAJECTORY_BUFFER_LOW_DEFAULT 192
328 
331 #define DF_INOS_MOVEPATH_TRAJECTORY_FILTER_LENGTH_NAME "Trajectory.Filter.Length"
332 #define DF_INOS_MOVEPATH_TRAJECTORY_FILTER_LENGTH_DEFAULT 0
333 
345 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_ENABLE_NAME "Trajectory.Follow.Enable"
346 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_ENABLE_DEFAULT 0
347 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_INDEX_NAME "Trajectory.Follow.Index"
348 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_INDEX_DEFAULT 3
349 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_UNIT_NAME "Trajectory.Follow.Unit"
350 #define DF_INOS_MOVEPATH_TRAJECTORY_FOLLOW_UNIT_DEFAULT 0
351 
360 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY "Trajectory.Constant.CheckVelocity"
361 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_NONE 0.0
362 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_DEFAULT 0.0
363 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_REDUCE 2.0
364 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_ONLY 1.0
365 
374 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_OVERSAMPLING "Trajectory.Constant.CheckVelocity.Oversampling"
375 #define DF_INOS_MOVEPATH_TRAJECTORY_CONSTANT_CHECK_VELOCITY_OVERSAMPLING_DEFAULT 1.0
376 
379 #define DF_INOS_MOVEPATH_TRAJECTORY_SEGMENT_CUBIC_REDUCTION_NAME "Trajectory.Segment.CubicReduction"
380 #define DF_INOS_MOVEPATH_TRAJECTORY_SEGMENT_CUBIC_REDUCTION_DEFAULT 1.0
381 //
382 //------------------------------------------------------------------------------
383 // param names
384 //------------------------------------------------------------------------------
385 //
389 #define DF_INOS_MOVEPATH_PARAM_SPEEDSET "SpeedSet"
390 
393 #define DF_INOS_MOVEPATH_PARAM_SLOWMOTION "SlowMotion"
394 
397 #define DF_INOS_MOVEPATH_PARAM_TOLERANCE "Tolerance"
398 
401 #define DF_INOS_MOVEPATH_PARAM_VMAX "Vmax"
402 
405 #define DF_INOS_MOVEPATH_PARAM_VTRQ "Vtrq"
406 
409 #define DF_INOS_MOVEPATH_PARAM_AMAX "Amax"
410 
413 #define DF_INOS_MOVEPATH_PARAM_ATRQ "Atrq"
414 
417 #define DF_INOS_MOVEPATH_PARAM_BMAX "Bmax"
418 
421 #define DF_INOS_MOVEPATH_PARAM_BTRQ "Btrq"
422 
425 #define DF_INOS_MOVEPATH_PARAM_JMAX "Jmax"
426 //
430 #define DF_INOS_MOVEPATH_APPROACH_NAME "Approach"
431 #define DF_INOS_MOVEPATH_APPROACH_DEFAULT 0
432 
435 #define DF_INOS_MOVEPATH_APPROACH_DISTANCE_NAME "Approach.Distance"
436 #define DF_INOS_MOVEPATH_APPROACH_DISTANCE_DEFAULT 5.0
437 
440 #define DF_INOS_MOVEPATH_APPROACH_VELOCITY_NAME "Approach.Velocity"
441 #define DF_INOS_MOVEPATH_APPROACH_VELOCITY_DEFAULT 1.0
442 
446 #define DF_INOS_MOVEPATH_RAPID_GATE_INVERT_NAME "RapidGateInverted"
447 #define DF_INOS_MOVEPATH_RAPID_GATE_INVERT_DEFAULT 0.0
448 
449 
450 //------------------------------------------------------------------------------
451 // includes
452 //------------------------------------------------------------------------------
453 //
454 // system
455 #include <inos.h>
456 #include <cinostaskexdef.h>
457 #include <cinosvector.h>
458 #include <cinosmotionframe.h>
459 
460 //------------------------------------------------------------------------------
461 // type definitions
462 //------------------------------------------------------------------------------
463 //
464 typedef TINOSVector<DF_INOS_MOVEPATH_MAX_AXES> TINOSMovePathVec;
465 
466 
467 #include <cinosmovepathparam.h>
468 #include <cinosmovepathevent.h>
469 #include <cinosmovepathsegment.h>
472 #include <cinosmovepathresource.h>
473 #include <cinosmovepathresourceposaxis.h>
474 #include <cinosmovepathresourcespeedaxis.h>
475 #include <cinosmovepathresourcerapidgate.h>
476 #include <cinosmovepathpart.h>
477 #include <cinosmovepathpartlinear.h>
479 #include <cinosmovepathpartcircle.h>
481 #include <cinosmovepathcurve.h>
483 #include <cinosmovepathinterpolatorsegment.h>
484 #include <cinosmovepathtrajectory.h>
487 #include <cinosmovepathtrajectorylookahead.h>
488 
489 #ifdef INOS_MOVEPATH_SKYWRITING_SUPPORT
490 #include <cinosmovepathsegmentrapid.h>
491 #include <cinosmovepathpartrapid.h>
492 #include <cinosmovepathtrajectoryskywriting.h>
493 #endif
494 
495 //
496 // C++
497 //
498 // project
499 //
500 //------------------------------------------------------------------------------
501 // trace macros
502 //------------------------------------------------------------------------------
503 //
504 #define DF_INOS_EVENT_LOGGER_FONT_COLOR_MOVEPATH_CREATE 0x00808000
505 #define DF_INOS_EVENT_LOGGER_FONT_COLOR_MOVEPATH_RUN 0x00008080
506 //
507 #ifdef INOS_MOVEPATH_TRACE_SUPPORT
508 #define MOVEPATH_TRACE_CREATE( path, apFormat, aArgs... ) \
509  if( CINOSEventLogger::Instance().IsLevelActive(DF_INOS_EVENT_LOGGER_LEVEL_MOVEPATH_CREATE) ) {\
510  char cBuffer[256]; \
511  inos_strncpy(cBuffer, "MOVEPATH[%s] : ", sizeof(cBuffer)); \
512  inos_strcat(cBuffer, apFormat, sizeof(cBuffer)); \
513  CINOSEventLogger::Instance().EvtLog( \
514  DF_INOS_EVENT_LOGGER_LEVEL_MOVEPATH_CREATE, \
515  __PRETTY_FUNCTION__, \
516  __FILE__, \
517  __LINE__, \
518  DF_INOS_EVENT_LOGGER_FONT_COLOR_MOVEPATH_CREATE, \
519  cBuffer, path->GetName(), \
520  ##aArgs ); \
521  }
522 #define MOVEPATH_TRACE_RUN( path, apFormat, aArgs... ) \
523  if( CINOSEventLogger::Instance().IsLevelActive(DF_INOS_EVENT_LOGGER_LEVEL_MOVEPATH_RUN) ) {\
524  char cBuffer[256]; \
525  inos_strncpy(cBuffer, "MOVEPATH[%s] : ", sizeof(cBuffer)); \
526  inos_strcat(cBuffer, apFormat, sizeof(cBuffer)); \
527  CINOSEventLogger::Instance().EvtLog( \
528  DF_INOS_EVENT_LOGGER_LEVEL_MOVEPATH_RUN, \
529  __PRETTY_FUNCTION__, \
530  __FILE__, \
531  __LINE__, \
532  DF_INOS_EVENT_LOGGER_FONT_COLOR_MOVEPATH_RUN, \
533  cBuffer, path->GetName(), \
534  ##aArgs ); \
535  }
536 #else
537 #if defined(_MSC_VER)
538 #define MOVEPATH_TRACE_CREATE( path, apFormat, ... )
539 #define MOVEPATH_TRACE_RUN( path, apFormat, ... )
540 #else
541 #define MOVEPATH_TRACE_CREATE( path, apFormat, aArgs... )
542 #define MOVEPATH_TRACE_RUN( path, apFormat, aArgs... )
543 #endif
544 #endif
545 //------------------------------------------------------------------------------
546 // class definition
547 //------------------------------------------------------------------------------
548 //
550 {
551  //--- user interface ---------------------------------------------------
552 
553  // public member functions
554  public :
556  enum EState {
557  eStaVirgin = 0,
558  eStaEdit = 1,
559  eStaRaw = 2,
560  eStaReady = 3,
561  eStaRunning = 4,
562  eStaStopping = 5,
563  eStaBreaking = 6,
564  eStaCanceling = 7,
565  eStaSettling = 8,
566  eStaTransient = 9,
567  eStaPaused = 10,
568  eStaDone = 11,
569  eStaLast = 12
570  };
571 
574  EState GetState() const
575  {
576  // return actual state
577  return m_eState;
578  }
585  bool IsMoving() const;
586 
589  uint32 GetError() const
590  {
591  // return actual error
592  return m_uError;
593  }
594 
597  virtual uint32 AcceptError()
598  {
599  // save pending error
600  uint32 uError = m_uError;
601  // clear error
602  m_uError = 0;
603  // return pending error
604  return uError;
605  }
606 
609  const char* GetName() const
610  {
611  // return name
612  return &m_cName[0];
613  }
614 
617  uint32 GetOptions() const
618  {
619  // return options
620  return m_uOptions;
621  }
622 
623  // --- creation and destruction ---------------------------------------
624 
642  static uint32 Create(CINOSMovePath*& apPath,
643  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
644 
663  static uint32 Create(CINOSMovePath*& apPath, const char* apName,
664  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
665 
684  static uint32 Create(CINOSMovePath*& apPath,
685  const char* apCurveType, const char* apInterpolatorType, const char* apTrajectoryType,
686  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
687 
707  static uint32 Create(CINOSMovePath*& apPath, const char* apName,
708  const char* apCurveType, const char* apInterpolatorType, const char* apTrajectoryType,
709  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
710 
732  static uint32 Create(CINOSMovePath*& apPath, const char* apName,
733  const char* apCurveType, const char* apInterpolatorType, const char* apTrajectoryType,
734  const char* apParam, uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
735 
742  static uint32 Destroy(CINOSMovePath* apPath);
743 
744  // --- static global methods ------------------------------------------
745 
756  static uint32 glbSetAxis(const char* apName, uint8 auIndex,
757  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO,
758  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
759 
766  static CINOSBaseAxis* glbGetAxis(uint8 auIndex);
767 
777  static uint32 glbGetActPosition(const char* apName, double& adPosition,
778  uint32 auOptions = DF_INOS_MOVEPATH_OPTION_DEFAULT);
779 
780  // --- edit mode ------------------------------------------------------
781 
793  virtual uint32 SetAxis(const char* apName, uint8 auIndex,
794  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO,
795  const char* apType = "PosAxis");
796 
808  virtual uint32 AddResource(const char* apName,
809  uint8& auIndex,
810  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO,
811  const char* apType = "PosAxis");
812 
830  virtual uint32 EditBegin(uint32 auFlags = DF_INOS_MOVEPATH_FLAG_INC,
831  double adTolerance = DF_INOS_MOVEPATH_TOLERANCE_DEFAULT,
832  double adVelocity = DF_INOS_MOVEPATH_VELOCITY_DEFAULT);
833 
839  virtual uint32 EditEnd(bool abIncomplete = false);
840 
857  virtual uint32 SegBegin(uint32 auId = DF_INOS_MOVEPATH_ID_DEFAULT,
858  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO,
859  double adTolerance = DF_INOS_MOVEPATH_TOLERANCE_DEFAULT,
860  double adVelocity = DF_INOS_MOVEPATH_VELOCITY_DEFAULT);
861 
867  virtual uint32 SegEnd();
868 
880  virtual uint32 Start(uint8 auIndex, double adPosition);
881 
882  // --- base curve methods ---------------------------------------------
883 
895  virtual uint32 Linear(uint8 auIndex, double adPosition, uint32 auFlags = 0);
896 
913  virtual uint32 LinearBay(uint8 auIndex1, uint8 auIndex2, double adPosition1,
914  double adPosition2, double adLength, uint32 auFlags = 0);
915 
933  virtual uint32 CircleCW(uint8 auIndex1, uint8 auIndex2,
934  double adEnd1, double adEnd2, double adMid1, double adMid2,
935  uint32 auFlags=0);
936 
954  virtual uint32 CircleCC(uint8 auIndex1, uint8 auIndex2,
955  double adEnd1, double adEnd2, double adMid1, double adMid2,
956  uint32 auFlags=0);
957 
976  virtual uint32 CircleCW(uint8 auIndex1, uint8 auIndex2,
977  double adMid1, double adMid2, double adAngle, bool abAngleAbsolute,
978  uint32 auFlags=0);
979 
998  virtual uint32 CircleCC(uint8 auIndex1, uint8 auIndex2,
999  double adMid1, double adMid2, double adAngle, bool abAngleAbsolute,
1000  uint32 auFlags=0);
1001 
1019  virtual uint32 CircleCW(uint8 auIndex1, uint8 auIndex2,
1020  double adEnd1, double adEnd2, double adRadius, uint32 auFlags=0);
1021 
1039  virtual uint32 CircleCC(uint8 auIndex1, uint8 auIndex2,
1040  double adEnd1, double adEnd2, double adRadius, uint32 auFlags=0);
1041 
1042  // --- rapid segment methods -------------------------------------------
1043 #ifdef INOS_MOVEPATH_SKYWRITING_SUPPORT
1044 
1056  virtual uint32 RapidBegin(uint32 auId = DF_INOS_MOVEPATH_ID_DEFAULT,
1057  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO);
1058 
1064  virtual uint32 RapidEnd();
1065 
1077  virtual uint32 Rapid(uint8 auIndex, double adPosition, uint32 auFlags = 0);
1078 #endif
1079 
1080  // --- nurbs curve methods -------------------------------------------
1081 
1096  virtual uint32 NrbBegin(uint32 auId = DF_INOS_MOVEPATH_ID_DEFAULT,
1097  uint32 auFlags = DF_INOS_MOVEPATH_FLAG_NO,
1098  uint32 auDegree = 3,
1099  uint32 auInterpolationPoints = DF_INOS_NURBSCURVE_INTERPOLATION_POINTS,
1100  double adVelocity = DF_INOS_MOVEPATH_VELOCITY_DEFAULT);
1101 
1107  virtual uint32 NrbEnd();
1108 
1118  virtual uint32 NrbPoint(double adP0, double adP1, double adWeight = 1.0);
1119 
1130  #if DF_INOS_MOVEPATH_MAX_AXES > 2
1131  virtual uint32 NrbPoint(double adP0, double adP1, double adP2, double adWeight);
1132  #endif
1133 
1145  #if DF_INOS_MOVEPATH_MAX_AXES > 3
1146  virtual uint32 NrbPoint(double adP0, double adP1, double adP2, double adP3,
1147  double adWeight);
1148  #endif
1149 
1162  #if DF_INOS_MOVEPATH_MAX_AXES > 4
1163  virtual uint32 NrbPoint(double adP0, double adP1, double adP2, double adP3,
1164  double adP4, double adWeight);
1165  #endif
1166 
1177  virtual uint32 NrbKnot(double adValue, uint32 auMultiplicity = 1);
1178 
1179  // --- general methods -----------------------------------------
1180 
1188  virtual uint32 Reset();
1189 
1190  // --- general setter/getter -----------------------------------------
1191 
1199  virtual uint32 SetParam(const char* apName, double adValue);
1200 
1210  virtual uint32 SetParam(uint8 auIndex, const char* apName, double adValue);
1211 
1219  virtual uint32 SetParam(const char* apName, const char* apValue);
1220 
1230  virtual uint32 SetParam(uint8 auIndex, const char* apName, const char* apValue);
1231 
1240  virtual uint32 GetParam(const char* apName, double& adValue, double adDefault = 0.0);
1241 
1251  virtual uint32 GetParam(uint8 auIndex, const char* apName, double& adValue, double adDefault = 0.0);
1252 
1262  virtual uint32 GetParam(const char* apName, char* apBuffer, uint32 auSize, const char* apDefault = "");
1263 
1274  virtual uint32 GetParam(uint8 auIndex, const char* apName, char* apBuffer, uint32 auSize, const char* apDefault = "");
1275 
1276  // --- timing --------------------------------------------------------
1277 
1283  virtual uint32 GetCycleTime(double& adCycleTime);
1284 
1293  virtual uint32 GetCycleData(double& adMainCycleTime, uint8& auMainAxisIndex,
1294  inos_std::vector<uint8>& auMainCycleDownSampling, uint8& auMainOversampling);
1295 
1302  virtual uint32 GetMoveTime(double& adMoveTime, double adDelta = 0.0);
1303 
1310  virtual uint32 GetMoveTicks(uint64& adMoveTicks, double arDelta = 0.0);
1311 
1317  virtual uint32 GetMoveLength(double& adMoveLength);
1318 
1326  virtual uint32 GetMoveRemaining(double& adMoveRemaining);
1327 
1338  virtual uint32 GetMaxConstantVelocity(double& adMaxConstantVelocity);
1339 
1340  // --- event handling ------------------------------------------------
1341 
1347  virtual uint32 AddEvent(const char* apName, double adValue, uint32 auType);
1348 
1354  virtual uint32 SetEventDescriptor(struct SINOSMovePathEventDesc* apDesc);
1355 
1356  // --- running -------------------------------------------------------
1357 
1368  virtual CMcResult Prepare(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1369 
1381  virtual CMcResult Prepare(const char* apSpeedset, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1382 
1392  virtual CMcResult Run(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1393 
1404  virtual CMcResult Run(const char* apSpeedset, CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1405 
1414  virtual uint32 Append(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1415 
1422  virtual uint32 Stop(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1423 
1430  virtual uint32 Break(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1431 
1438  virtual uint32 Continue(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1439 
1446  virtual CMcResult Cancel(CINOSSync* apSync = DF_INOS_SYNCHRONOUS);
1447 
1448  // --- misc ----------------------------------------------------------
1449 
1463  virtual uint32 GetData(
1464  TINOSMovePathVec& vPos,
1465  TINOSMovePathVec& vVel,
1466  TINOSMovePathVec& vAcc,
1467  TINOSMovePathVec& vJrk)
1468  {
1469  // FIXME : ensure a valid trajectory generator
1471  // handle request over to trajectory generator
1472  return m_pTrajectory->GetData(vPos, vVel, vAcc, vJrk);
1473  }
1474 
1489  virtual uint32 GetData(
1490  uint32& auSegmentId,
1491  TINOSMovePathVec& vPos,
1492  TINOSMovePathVec& vVel,
1493  TINOSMovePathVec& vAcc,
1494  TINOSMovePathVec& vJrk)
1495  {
1496  // FIXME : ensure a valid trajectory generator
1498  // handle request over to trajectory generator
1499  return m_pTrajectory->GetData(auSegmentId, vPos, vVel, vAcc, vJrk);
1500  }
1501 
1502  virtual CINOSMovePathSegment* GetActSegment()
1503  {
1504  // FIXME : ensure a valid trajectory generator
1506  // handle request over to trajectory generator
1507  return m_pTrajectory->GetActSegment();
1508  }
1509 
1510 
1511 
1517  virtual uint32 CancelData()
1518  {
1519  // FIXME : ensure a valid trajectory generator
1521  // handle request over to trajectory generator
1522  return m_pTrajectory->CancelData();
1523  }
1524 
1529  virtual uint32 Fail(uint32 auError);
1530 
1540  virtual uint32 GetPositionDelta(TINOSMovePathVec& vDelta);
1541 
1543  virtual bool GetPosition(uint32 auIndex, TINOSMovePathVec& ovPos)
1544  {
1545  if(m_pMainCurve == nullptr) {
1546  return false;
1547  }
1548  // get it from curve
1549  return m_pMainCurve->GetPosition(auIndex, ovPos);
1550  }
1551 
1553  virtual uint32 GetTorqueLimit()
1554  {
1555  return m_uTorqueLimit;
1556  }
1558  virtual double GetEpsilon()
1559  {
1560  return m_dEpsilon;
1561  }
1562 
1564  virtual double GetTolerance()
1565  {
1566  return m_dTolerance;
1567  }
1568 
1570  virtual uint32 GetVmax(TINOSMovePathVec& aVmax)
1571  {
1572  aVmax = vVmax;
1573  return 0;
1574  }
1576  virtual uint32 GetVtrq(TINOSMovePathVec& aVtrq)
1577  {
1578  aVtrq = vVtrq;
1579  return 0;
1580  }
1582  virtual uint32 GetAmax(TINOSMovePathVec& aAmax)
1583  {
1584  aAmax = vAmax;
1585  return 0;
1586  }
1588  virtual uint32 GetAtrq(TINOSMovePathVec& aAtrq)
1589  {
1590  aAtrq = vAtrq;
1591  return 0;
1592  }
1594  virtual uint32 GetBmax(TINOSMovePathVec& aBmax)
1595  {
1596  aBmax = vBmax;
1597  return 0;
1598  }
1600  virtual uint32 GetBtrq(TINOSMovePathVec& aBtrq)
1601  {
1602  aBtrq = vBtrq;
1603  return 0;
1604  }
1606  virtual uint32 GetJmax(TINOSMovePathVec& aJmax)
1607  {
1608  aJmax = vJmax;
1609  return 0;
1610  }
1611 
1613  uint32 SetCurve(CINOSMovePathCurve* apCurve);
1614 
1617  { return m_pMainCurve; };
1618 
1619 
1622  { return m_pEditCurve; };
1625  { return m_pPrepareCurve; };
1628  { return m_pRunCurve; };
1629 
1630 
1633  { return m_pTrajectory; };
1635  void SetTrajectory(CINOSMovePathTrajectory* apTrajectory);
1636 
1638  class CINOSMovePathResourceAxis* GetAxis(uint32 auIndex)
1639  { return m_pAxis[auIndex]; };
1640 
1641  class CINOSMovePathResource* GetResource(uint32 auIndex);
1642 
1644  void GetActPosition(TINOSMovePathVec& ovAct);
1646  void GetPositionFirst(TINOSMovePathVec& ovFirst);
1648  void GetPositionLast(TINOSMovePathVec& ovLast);
1649 
1658  bool GetBufferFillLevel(uint32& auBufferFillLevel) const;
1659 
1666  uint32 SetMapping(class CINOSMatrix* apMapping);
1667 
1674  uint32 GetAxesErrorMask();
1675 
1681  typedef std::function<uint32(CINOSMovePath*,uint32,TINOSMovePathVec&,TINOSMovePathVec&,TINOSMovePathVec&,TINOSMovePathVec&)> tpActiveCallback;
1682 
1683  void SetActiveCallback(tpActiveCallback aCallback)
1684  {
1685  m_ActiveCallback = aCallback;
1686  }
1687 
1692  void GetActual(SINOSRampData& aActual)
1693  {
1694  // trajectory available ?
1695  if (nullptr != m_pTrajectory) {
1696  // yes
1697  m_pTrajectory->GetActual(aActual);
1698  }
1699  else {
1700  // not available
1701  aActual.m_rS = 0.0;
1702  aActual.m_rV = 0.0;
1703  aActual.m_rA = 0.0;
1704  aActual.m_rJ = 0.0;
1705  }
1706  }
1707 
1708  //--- internals --------------------------------------------------------
1709 
1710  // my friends
1711  friend class CINOSMovePathHelper;
1712  friend class CINOSMovePathInterpolator;
1713  friend class CINOSMovePathInterpolatorBlend;
1714  friend class CINOSMovePathInterpolatorClothoid;
1715  friend class CINOSMovePathInterpolatorPolynom;
1716  friend class CINOSMovePathTrajectory;
1717  template <typename CINOSMovePath> friend class CINOSTaskExMsgParam::CPtrContainer;
1718  friend class CINOSMcTargetMovePath;
1719  friend void _INI_0300_CINOSMovePath();
1720 
1721  // testing friends
1722  friend class CINOSMovePathHelperTest;
1723 
1724 
1725  // protected methods
1726  protected :
1727 
1728  // constructor / destructor
1730  CINOSMovePath (
1731  const char* apName,
1732  const char* apCurveType,
1733  const char* apInterpolatorType,
1734  const char* apTrajectoryType,
1735  uint32 auOptions);
1737  virtual ~CINOSMovePath ();
1738 
1739  virtual uint32 iCircle(bool abCw, uint8 auIndex1, uint8 auIndex2,
1740  double adEnd1, double adEnd2, double adMid1, double adMid2,
1741  uint32 auFlags);
1743  virtual uint32 iCircleAngle(bool abCw, uint8 auIndex1, uint8 auIndex2,
1744  double adMid1, double adMid2, double adAngle, bool abAngleAbsolute,
1745  uint32 auFlags);
1747  virtual uint32 iCircleRadius(bool abCw, uint8 auIndex1, uint8 auIndex2,
1748  double adEnd1, double adEnd2, double adRadius, uint32 auFlags);
1749 
1751  virtual uint32 iPrepare(class CINOSTaskExMsg* apMsg);
1752  virtual uint32 iPrepare(const char* apSpeedSet);
1753 
1755  virtual uint32 iStartRun(class CINOSTaskExMsg* apMsg);
1756  virtual uint32 iStartRun(const char* apSpeedSet, CINOSSync* apSync);
1757 
1758  virtual uint32 iRun(class CINOSTaskExMsg* apMsg);
1759  virtual uint32 iRun(const char* apSpeedSet, CINOSSync* apSync);
1760 
1762  virtual uint32 iPrepareAppend(class CINOSTaskExMsg* apMsg);
1763  virtual uint32 iPrepareAppend(CINOSSync* apSync);
1764 
1766  virtual uint32 iAppend(class CINOSTaskExMsg* apMsg);
1767  virtual uint32 iAppend(CINOSMovePathCurve* apCurve, CINOSSync* apSync);
1768 
1770  virtual uint32 iStop(class CINOSTaskExMsg* apMsg);
1772  virtual uint32 iBreak(class CINOSTaskExMsg* apMsg);
1774  virtual uint32 iContinue(class CINOSTaskExMsg* apMsg);
1776  virtual uint32 iCancel(class CINOSTaskExMsg* apMsg);
1778  virtual uint32 iCancelData(class CINOSTaskExMsg* apMsg);
1780  virtual uint32 iSetParam(uint8 auIndex, const char* apName, double adValue);
1782  virtual uint32 iSetParam(uint8 auIndex, const char* apName, const char* apValue);
1784  virtual uint32 iGetParam(uint8 auIndex, const char* apName, double* adValue, double adDefault);
1786  virtual uint32 iGetParam(uint8 auIndex, const char* apName, char* apValue, uint32 auSize, const char* apDefault);
1787 
1788 
1789 
1791  CMcResult PutMsg(CINOSTaskExMsg* apMsg);
1793  CMcResult PutCmd(uint32 auCommand, CINOSSync* apSync = DF_INOS_ASYNCHRONOUS);
1795  uint32 HandleCmd(uint32 auError = INOS_OK);
1797  uint32 WaitCmd(uint32 auCommand, uint32 auError = INOS_MOVEPATH_ERROR_NO_COMMAND_QUEUE);
1798 
1800  CINOSTaskQueue* GetCmdQueue();
1802  uint32 DispatchCmd(CINOSTaskExMsg* apCmd);
1803 
1804 
1806  uint32 AddPart(CINOSMovePathPart* apPart, uint32 auFlags);
1807 
1809  virtual void SetState(EState aeState)
1810  {
1811  // set actual state
1812  m_eState = aeState;
1813  }
1814 
1816  virtual void SetError(uint32 auError)
1817  {
1818  // set error
1819  m_uError = auError;
1820  }
1821 
1823  class TINOSMotionFrame<DF_INOS_MOVEPATH_MAX_AXES>* GetFrame()
1824  {
1825  // return frame
1826  return m_pFrame;
1827  }
1828 
1830  struct SINOSMovePathEventDesc* GetEventDescriptor()
1831  {
1832  // return event descriptor
1833  return m_pEventDesc;
1834  }
1835 
1837  CINCOObject* RequestRegister();
1839  void ReleaseRegister();
1840 
1841  // private methods
1842  private:
1843  // ! check validity of speedset values if speedset is defined global
1844  static uint32 CheckSpeedSetValues(const char* apSpeedSet);
1845 
1846  // protected members
1847  protected :
1848 
1849  // commands
1850  public:
1851  enum {
1852  eCmdAttach = 256,
1853  eCmdDetach = 257,
1854  // state dependent commands
1855  eCmdFirst = 258,
1856  eCmdSetAxis,
1857  eCmdSetCurve,
1858  eCmdReset,
1859  eCmdSetMapping,
1860  eCmdGetMoveTime,
1861  eCmdGetMoveTicks,
1862  eCmdGetMoveLength,
1863  eCmdGetPositionDelta,
1864  eCmdGetMaxConstantVelocity,
1865  eCmdAddEvent,
1866  eCmdSetEventDescriptor,
1867  eCmdPrepare,
1868  eCmdStartRun,
1869  eCmdRun,
1870  eCmdPrepareAppend,
1871  eCmdAppend,
1872  eCmdBufferLow,
1873  eCmdBufferEmpty,
1874  eCmdStop,
1875  eCmdBreak,
1876  eCmdContinue,
1877  eCmdCancel,
1878  eCmdCancelData,
1879  eCmdLast
1880  };
1881 
1883  enum {
1884  eParamIndexGlobalInternal = 0,
1885  eParamIndexGlobal = 0xff,
1886  eParamIndexMask = 0x0000ffff,
1887  eParamTypeNumber = 0x00010000,
1888  eParamTypeString = 0x00020000,
1889  };
1890 
1892  enum {
1893  eFlgOwnerInterpolator = 0x00000001,
1894  eFlgOwnerTrajectory = 0x00000002,
1895  eFlgHasRapidSegments = 0x00000004,
1896  };
1897 
1901  uint32 m_uFlags;
1903  uint32 m_uOptions;
1905  uint32 m_uError;
1906 
1909 
1912 
1919 
1924 
1927 
1931  class CINOSMovePathHelper* m_pPrepareHelper;
1933  class CINOSMovePathHelper* m_pRunHelper;
1934 
1937 
1938  private:
1939 
1941  uint32 m_uId;
1942 
1944  char m_cName[256];
1945 
1947  char m_cInterpolatorType[32];
1948 
1950  CINOSTaskQueue* m_pCmdQueue;
1951 
1953  class TINOSMotionFrame<DF_INOS_MOVEPATH_MAX_AXES>* m_pFrame;
1955  class TINOSMotionFrame<DF_INOS_MOVEPATH_MAX_AXES>* m_pFrame_1;
1956 
1957 
1959  inos_std::vector<
1960  TINOSNameBalancedBinaryTree<SINOSMovePathParam>*> m_vParams;
1961 
1963  CINOSMovePathResourceAxis* m_pAxis[DF_INOS_MOVEPATH_MAX_AXES];
1965  inos_std::vector<CINOSMovePathResource*> m_vAdditionalResources;
1966 
1967  // misc properties
1968 
1970  double m_dTolerance;
1972  double m_dEpsilon;
1973 
1974  // max vectors
1975 
1977  uint32 m_uTorqueLimit;
1979  TINOSMovePathVec vVmax;
1981  TINOSMovePathVec vVtrq;
1983  TINOSMovePathVec vAmax;
1985  TINOSMovePathVec vAtrq;
1987  TINOSMovePathVec vBmax;
1989  TINOSMovePathVec vBtrq;
1991  TINOSMovePathVec vJmax;
1992 
1993  // edit helpers
1994 
1996  CINOSMovePathSegmentBase* m_pActSegmentBase;
1998  CINOSMovePathSegmentNurbs* m_pActSegmentNurbs;
2000  TINOSMovePathVec m_vEditBegPos;
2001 
2002  // internals
2003 
2005  // used for run helper if core id is -1.
2006  int8 m_iCallerCore = -1;
2007 
2008 
2009 
2010  // event handling
2011 
2013  struct SINOSMovePathEventDesc* m_pEventDesc;
2015  CINOSMovePathEvent* m_pFstEvent;
2016 
2017  // active callback
2018 
2020  tpActiveCallback m_ActiveCallback;
2021 
2022  // inco registration
2023 
2025  uint32 m_uRegisterCnt = 0;
2027  CINCOObject* m_pRegister = nullptr;
2028 
2029  // static members
2030 
2032  static uint32 m_PathId;
2034  static const char* m_pCurveType;
2036  static const char* m_pInterpolatorType;
2038  static const char* m_pTrajectoryType;
2040  static uint32 m_uGlbLengthMask;
2042  static class CINOSBaseAxis* m_pGlbAxis[DF_INOS_MOVEPATH_MAX_AXES];
2043 
2044  // dynamic
2045  DECLARE_DYNAMIC(CINOSMovePath);
2046 };
2047 
2048 //------------------------------------------------------------------------------
2049 // end of file
2050 //------------------------------------------------------------------------------
2051 
2052 #endif // INC_CINOSMOVEPATH_H
CINOSMutex
Definition: cinosmutex.h:35
CINOSMovePath::DispatchCmd
uint32 DispatchCmd(CINOSTaskExMsg *apCmd)
dispatch command
CINOSMovePath::GetMaxConstantVelocity
virtual uint32 GetMaxConstantVelocity(double &adMaxConstantVelocity)
Return the max. allowed constant velocity the path can be run with without violating any axes limits ...
DF_INOS_NURBSCURVE_INTERPOLATION_POINTS
#define DF_INOS_NURBSCURVE_INTERPOLATION_POINTS
Definition: inosdefault.h:196
CINOSMovePath::iStartRun
virtual uint32 iStartRun(class CINOSTaskExMsg *apMsg)
internal run
CINOSMovePathCurve::GetPosition
bool GetPosition(uint32 auIndex, TINOSMovePathVec &ovPos)
get position vector auIndex
CINOSMovePathInterpolatorBlend
Definition: cinosmovepathinterpolatorblend.h:70
cinosmovepathsegmentbase.h
The CINOSMovePathSegment class.
cinosmovepathsegment.h
The CINOSMovePathSegment class.
DF_INOS_MOVEPATH_ID_DEFAULT
#define DF_INOS_MOVEPATH_ID_DEFAULT
Definition: cinosmovepath.h:39
CINOSMovePath::AddPart
uint32 AddPart(CINOSMovePathPart *apPart, uint32 auFlags)
add part to actual segment
CINOSMovePath::Stop
virtual uint32 Stop(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Stop the running path.
CINOSMovePath::GetPosition
virtual bool GetPosition(uint32 auIndex, TINOSMovePathVec &ovPos)
get position vector at index auIndex
Definition: cinosmovepath.h:1543
CINOSMovePath::GetFrame
class TINOSMotionFrame< DF_INOS_MOVEPATH_MAX_AXES > * GetFrame()
get currently selected frame
Definition: cinosmovepath.h:1823
CINOSMovePath::EditBegin
virtual uint32 EditBegin(uint32 auFlags=0x00000002, double adTolerance=-1.0, double adVelocity=-1.0)
Enter into edit mode.
CINOSMovePath::iBreak
virtual uint32 iBreak(class CINOSTaskExMsg *apMsg)
internal break
CINOSMovePath::GetPrepareCurve
CINOSMovePathCurve * GetPrepareCurve()
get pointer to path prepare curve
Definition: cinosmovepath.h:1624
CINOSMovePath::NrbEnd
virtual uint32 NrbEnd()
End of nurbs curve segment.
CINOSMovePath::GetCycleData
virtual uint32 GetCycleData(double &adMainCycleTime, uint8 &auMainAxisIndex, inos_std::vector< uint8 > &auMainCycleDownSampling, uint8 &auMainOversampling)
Return path cycle data.
CINOSMovePath::AddEvent
virtual uint32 AddEvent(const char *apName, double adValue, uint32 auType)
Return the path cycle time [sec].
CINOSMovePathSegmentNurbs
Definition: cinosmovepathsegmentnurbs.h:46
CINOSMovePath::PutMsg
CMcResult PutMsg(CINOSTaskExMsg *apMsg)
put message into helpers queue
CINOSMovePath::Continue
virtual uint32 Continue(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Continue paused path.
CINOSMovePath::iPrepareAppend
virtual uint32 iPrepareAppend(class CINOSTaskExMsg *apMsg)
internal prepare append
CINOSBaseAxis
Provides axis functionality.
Definition: cinosbaseaxis.h:679
CINOSMovePath::Cancel
virtual CMcResult Cancel(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Cancel the running path.
CINOSMovePath::iPrepare
virtual uint32 iPrepare(class CINOSTaskExMsg *apMsg)
internal prepare
CINOSMovePath::GetAmax
virtual uint32 GetAmax(TINOSMovePathVec &aAmax)
get Amax vector
Definition: cinosmovepath.h:1582
CINOSMovePath::NrbBegin
virtual uint32 NrbBegin(uint32 auId=0xffffffff, uint32 auFlags=0x00000000, uint32 auDegree=3, uint32 auInterpolationPoints=DF_INOS_NURBSCURVE_INTERPOLATION_POINTS, double adVelocity=-1.0)
Mark the begin of a nurbs curve segment.
CINOSMovePath::GetPositionDelta
virtual uint32 GetPositionDelta(TINOSMovePathVec &vDelta)
Get position delta between end and start of path.
CINOSMovePath::glbGetAxis
static CINOSBaseAxis * glbGetAxis(uint8 auIndex)
Get pointer to globally mapped axis with given index.
CINOSMovePath::GetTolerance
virtual double GetTolerance()
get path tolerance
Definition: cinosmovepath.h:1564
CINOSMovePath::GetAtrq
virtual uint32 GetAtrq(TINOSMovePathVec &aAtrq)
get Atrq vector
Definition: cinosmovepath.h:1588
SINOSRampData
ramp data
Definition: cinosbaseramp.h:601
CINOSMovePath::GetState
EState GetState() const
Get move path state.
Definition: cinosmovepath.h:574
CINOSMovePath::GetCurve
CINOSMovePathCurve * GetCurve()
get pointer to maincurve
Definition: cinosmovepath.h:1616
CINOSMovePath::m_pRunCurve
CINOSMovePathCurve * m_pRunCurve
pointer to run curve
Definition: cinosmovepath.h:1923
CINOSMovePath::iStop
virtual uint32 iStop(class CINOSTaskExMsg *apMsg)
internal stop
CINOSMovePath::iSetParam
virtual uint32 iSetParam(uint8 auIndex, const char *apName, double adValue)
internal set param
CINOSMovePath::EState
EState
move path states
Definition: cinosmovepath.h:556
CINOSMovePath::GetMoveTime
virtual uint32 GetMoveTime(double &adMoveTime, double adDelta=0.0)
Return time [sec] the path needs until End - Delta.
CINOSMovePath::GetBtrq
virtual uint32 GetBtrq(TINOSMovePathVec &aBtrq)
get Btrq vector
Definition: cinosmovepath.h:1600
CINOSMovePath::m_uFlags
uint32 m_uFlags
flags
Definition: cinosmovepath.h:1901
CINOSMovePath::GetTrajectory
CINOSMovePathTrajectory * GetTrajectory()
get pointer to path trajectory
Definition: cinosmovepath.h:1632
CINOSMovePathInterpolatorClothoid
Definition: cinosmovepathinterpolatorclothoid.h:49
CINOSMovePath::LinearBay
virtual uint32 LinearBay(uint8 auIndex1, uint8 auIndex2, double adPosition1, double adPosition2, double adLength, uint32 auFlags=0)
Add a linear bay part to the current segment.
CINOSMovePath::GetEditCurve
CINOSMovePathCurve * GetEditCurve()
get pointer to path edit curve
Definition: cinosmovepath.h:1621
CINOSMovePath::CircleCC
virtual uint32 CircleCC(uint8 auIndex1, uint8 auIndex2, double adEnd1, double adEnd2, double adMid1, double adMid2, uint32 auFlags=0)
Add a counter clock wise circle part to the current segment.
CINOSMovePath::iCancelData
virtual uint32 iCancelData(class CINOSTaskExMsg *apMsg)
internal cancel data
DF_INOS_ASYNCHRONOUS
#define DF_INOS_ASYNCHRONOUS
Definition: inosmacro.h:337
CINOSMovePath::GetActual
void GetActual(SINOSRampData &aActual)
Get actual path s,v,a,j.
Definition: cinosmovepath.h:1692
CINOSMovePath::iGetParam
virtual uint32 iGetParam(uint8 auIndex, const char *apName, double *adValue, double adDefault)
internal get param
CINOSMovePath::SetParam
virtual uint32 SetParam(const char *apName, double adValue)
Set movepath parameter to given value.
CINOSMovePathTrajectory::GetActual
void GetActual(SINOSRampData &aActual)
Get actual path s,v,a,j.
Definition: cinosmovepathtrajectory.h:200
CINOSMovePath::AcceptError
virtual uint32 AcceptError()
Accept pending error and return its code, see also INOS_MOVEPATH_ERROR_GENERAL.
Definition: cinosmovepath.h:597
CINOSMovePath::m_eState
EState m_eState
state
Definition: cinosmovepath.h:1899
CINOSMovePath::GetPositionLast
void GetPositionLast(TINOSMovePathVec &ovLast)
get last path position vector
CINOSMovePath::SetEventDescriptor
virtual uint32 SetEventDescriptor(struct SINOSMovePathEventDesc *apDesc)
Set event receiver.
CINOSMovePath::m_pRawCurve
CINOSMovePathCurve * m_pRawCurve
pointer to raw curve
Definition: cinosmovepath.h:1916
CINOSMovePath::Run
virtual CMcResult Run(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Run the path.
cinosmovepathpartcircle.h
The CINOSMovePathPartCircle class.
cinosmovepathcurve.h
The CINOSMovePath class.
DF_INOS_MOVEPATH_FLAG_NO
#define DF_INOS_MOVEPATH_FLAG_NO
Definition: cinosmovepath.h:55
CINOSMovePath::GetActPosition
void GetActPosition(TINOSMovePathVec &ovAct)
get actual axes position vector
CINOSMovePath::m_pEditCurve
CINOSMovePathCurve * m_pEditCurve
pointer to edit curve
Definition: cinosmovepath.h:1914
CINOSMovePathInterpolator
Definition: cinosmovepathinterpolator.h:81
CINOSMovePath::SegBegin
virtual uint32 SegBegin(uint32 auId=0xffffffff, uint32 auFlags=0x00000000, double adTolerance=-1.0, double adVelocity=-1.0)
Mark the begin of a movepath segment.
CINOSMovePath::Start
virtual uint32 Start(uint8 auIndex, double adPosition)
Set curve start position of given axis.
CINOSMovePath::iAppend
virtual uint32 iAppend(class CINOSTaskExMsg *apMsg)
internal append
CINOSMovePath::m_pMainCurve
CINOSMovePathCurve * m_pMainCurve
pointer to main curve
Definition: cinosmovepath.h:1926
CINOSMovePath::GetEventDescriptor
struct SINOSMovePathEventDesc * GetEventDescriptor()
get event receiver
Definition: cinosmovepath.h:1830
CINOSMovePath::Prepare
virtual CMcResult Prepare(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Precalculate the path.
CINOSMovePath::SegEnd
virtual uint32 SegEnd()
Exit segment mode.
INOS_OK
uint32 INOS_OK
Definition: inoserror.h:1680
CINOSMovePath::SetTrajectory
void SetTrajectory(CINOSMovePathTrajectory *apTrajectory)
set pointer to path trajectory
CINOSMovePath::PutCmd
CMcResult PutCmd(uint32 auCommand, CINOSSync *apSync=DF_INOS_ASYNCHRONOUS)
put command to queue
DF_INOS_MOVEPATH_FLAG_INC
#define DF_INOS_MOVEPATH_FLAG_INC
Definition: cinosmovepath.h:63
CINOSMovePath::iCircleRadius
virtual uint32 iCircleRadius(bool abCw, uint8 auIndex1, uint8 auIndex2, double adEnd1, double adEnd2, double adRadius, uint32 auFlags)
internal circle radius
cinosmovepathsegmentnurbs.h
The CINOSMovePathSegmentNurbs class.
cinosmovepathpartclothoid.h
The CINOSMovePathPartClothoid class.
cinostaskexdef.h
CINOSMovePath::GetRunCurve
CINOSMovePathCurve * GetRunCurve()
get pointer to path run curve
Definition: cinosmovepath.h:1627
CINOSMovePath::Break
virtual uint32 Break(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Break the running path.
CINOSMovePath::GetName
const char * GetName() const
Get move path name.
Definition: cinosmovepath.h:609
CINOSMovePath::m_uActInvolved
uint32 m_uActInvolved
temporary segment involved
Definition: cinosmovepath.h:1908
CINOSMovePath::GetData
virtual uint32 GetData(uint32 &auSegmentId, TINOSMovePathVec &vPos, TINOSMovePathVec &vVel, TINOSMovePathVec &vAcc, TINOSMovePathVec &vJrk)
Get actual path data.
Definition: cinosmovepath.h:1489
cinosmovepathtrajectorysegment.h
The CINOSMovePathTrajectorySegment class.
CINOSMovePath::m_pAppendCurve
CINOSMovePathCurve * m_pAppendCurve
pointer to curve to append
Definition: cinosmovepath.h:1918
CINOSMovePath
Definition: cinosmovepath.h:549
CINOSMovePath::SetState
virtual void SetState(EState aeState)
set move path state
Definition: cinosmovepath.h:1809
CINOSMovePath::GetVtrq
virtual uint32 GetVtrq(TINOSMovePathVec &aVtrq)
get Vtrq vector
Definition: cinosmovepath.h:1576
CINOSMovePath::GetMoveLength
virtual uint32 GetMoveLength(double &adMoveLength)
Return the path length [path units].
CINOSMovePath::GetAxesErrorMask
uint32 GetAxesErrorMask()
Get axes error mask. Returns an axis on error pattern (bit set means, the corresponding axis is on er...
cinosmovepathpartlinearbay.h
The CINOSMovePathPartLinearBay class.
cinosmovepathpartlinear.h
The CINOSMovePathPartLinear class.
CINOSMovePath::IsMoving
bool IsMoving() const
CINOSMovePath::m_MainMutex
CINOSMutex m_MainMutex
the main mutex
Definition: cinosmovepath.h:1911
CINOSMovePathSegment
Definition: cinosmovepathsegment.h:44
CINOSMovePath::GetTorqueLimit
virtual uint32 GetTorqueLimit()
get torque limit
Definition: cinosmovepath.h:1553
CINOSMovePathCurve
Definition: cinosmovepathcurve.h:55
CINOSMovePath::GetJmax
virtual uint32 GetJmax(TINOSMovePathVec &aJmax)
get Jmax vector
Definition: cinosmovepath.h:1606
CINOSMovePathTrajectory::GetData
virtual uint32 GetData(TINOSMovePathVec &vPos, TINOSMovePathVec &vVel, TINOSMovePathVec &vAcc, TINOSMovePathVec &vJrk)
get data from trajectory buffer
CINOSMovePath::CircleCW
virtual uint32 CircleCW(uint8 auIndex1, uint8 auIndex2, double adEnd1, double adEnd2, double adMid1, double adMid2, uint32 auFlags=0)
Add a clock wise circle part to the current segment.
CINOSMovePath::GetVmax
virtual uint32 GetVmax(TINOSMovePathVec &aVmax)
get Vmax vector
Definition: cinosmovepath.h:1570
CINOSMovePath::m_pPrepareCurve
CINOSMovePathCurve * m_pPrepareCurve
pointer to prepare curve
Definition: cinosmovepath.h:1921
CINOSMovePathSegmentBase
Definition: cinosmovepathsegmentbase.h:47
CINOSMovePath::glbSetAxis
static uint32 glbSetAxis(const char *apName, uint8 auIndex, uint32 auFlags=0x00000000, uint32 auOptions=uint32(0x00000000))
Globally map given axis name to given index.
CINOSMovePath::GetAxis
class CINOSMovePathResourceAxis * GetAxis(uint32 auIndex)
get pointer to axis
Definition: cinosmovepath.h:1638
CINOSMovePathPart
Definition: cinosmovepathpart.h:44
CINOSMovePath::tpActiveCallback
std::function< uint32(CINOSMovePath *, uint32, TINOSMovePathVec &, TINOSMovePathVec &, TINOSMovePathVec &, TINOSMovePathVec &)> tpActiveCallback
Set callback method used for active trajectory handling. This callback is called on every sample and ...
Definition: cinosmovepath.h:1681
cinosmovepathinterpolator.h
The CINOSMovePathInterpolator class.
CINOSMovePath::NrbPoint
virtual uint32 NrbPoint(double adP0, double adP1, double adWeight=1.0)
Add a control point to the nurbs curve.
CINOSMovePath::CancelData
virtual uint32 CancelData()
Cancel data from running path (inform trajectory generator, that we don't need data anymore.
Definition: cinosmovepath.h:1517
CINOSMovePath::GetError
uint32 GetError() const
Return current pending movepath error, see also INOS_MOVEPATH_ERROR_GENERAL.
Definition: cinosmovepath.h:589
CINOSMovePath::glbGetActPosition
static uint32 glbGetActPosition(const char *apName, double &adPosition, uint32 auOptions=uint32(0x00000000))
Get actual commanded position of given axis.
CINOSMovePath::GetOptions
uint32 GetOptions() const
Get move path options.
Definition: cinosmovepath.h:617
CINOSMovePath::iCancel
virtual uint32 iCancel(class CINOSTaskExMsg *apMsg)
internal cancel
CINOSMovePath::GetMoveTicks
virtual uint32 GetMoveTicks(uint64 &adMoveTicks, double arDelta=0.0)
Return bus ticks the path needs until End - Delta.
CINOSMovePath::m_uLengthMask
uint32 m_uLengthMask
axes flags
Definition: cinosmovepath.h:1936
CINOSMovePathTrajectory::CancelData
virtual uint32 CancelData()
cancel trajectory buffer data
INOS_MOVEPATH_ERROR_NO_COMMAND_QUEUE
uint32 INOS_MOVEPATH_ERROR_NO_COMMAND_QUEUE
Definition: inoserror.h:1680
CINOSMovePath::GetBufferFillLevel
bool GetBufferFillLevel(uint32 &auBufferFillLevel) const
CINOSMovePath::m_pPrepareHelper
class CINOSMovePathHelper * m_pPrepareHelper
pointer to prepare helper thread
Definition: cinosmovepath.h:1931
SINOSRampData::m_rJ
real64 m_rJ
jerk
Definition: cinosbaseramp.h:610
cinosmovepathpart.h
The CINOSMovePathPart class.
CINOSMovePath::CINOSMovePath
CINOSMovePath(const char *apName, const char *apCurveType, const char *apInterpolatorType, const char *apTrajectoryType, uint32 auOptions)
constructor (application should use CINOSMovePath::Create)
CINOSMovePath::RequestRegister
CINCOObject * RequestRegister()
return inco registration of path
CINOSMovePath::GetBmax
virtual uint32 GetBmax(TINOSMovePathVec &aBmax)
get Bmax vector
Definition: cinosmovepath.h:1594
DF_INOS_MOVEPATH_VELOCITY_DEFAULT
#define DF_INOS_MOVEPATH_VELOCITY_DEFAULT
Definition: cinosmovepath.h:51
CINOSMovePath::SetMapping
uint32 SetMapping(class CINOSMatrix *apMapping)
Set a virtual to physical axis mapping.
CINOSMovePath::GetData
virtual uint32 GetData(TINOSMovePathVec &vPos, TINOSMovePathVec &vVel, TINOSMovePathVec &vAcc, TINOSMovePathVec &vJrk)
Get actual path data.
Definition: cinosmovepath.h:1463
DF_INOS_SYNCHRONOUS
#define DF_INOS_SYNCHRONOUS
Definition: inosmacro.h:332
CINOSMovePath::Destroy
static uint32 Destroy(CINOSMovePath *apPath)
Destroy given movepath.
DF_INOS_MOVEPATH_TOLERANCE_DEFAULT
#define DF_INOS_MOVEPATH_TOLERANCE_DEFAULT
Definition: cinosmovepath.h:43
cinosmovepathtrajectoryconstant.h
The CINOSMovePathTrajectoryConstant class.
CINOSMovePath::m_pTrajectory
CINOSMovePathTrajectory * m_pTrajectory
pointer to trajectory
Definition: cinosmovepath.h:1929
CINOSMovePath::GetCycleTime
virtual uint32 GetCycleTime(double &adCycleTime)
Return the path cycle time [sec].
CINOSMovePath::GetEpsilon
virtual double GetEpsilon()
get path epsilon
Definition: cinosmovepath.h:1558
CINOSMovePath::m_uError
uint32 m_uError
error
Definition: cinosmovepath.h:1905
CINOSMovePathTrajectory
Definition: cinosmovepathtrajectory.h:80
CINOSMovePath::Reset
virtual uint32 Reset()
Reset the path, resets curves, interpolators and trajectories does not reset parameters of the movepa...
CINOSMovePath::SetCurve
uint32 SetCurve(CINOSMovePathCurve *apCurve)
set pointer to path curve (deprecated)
CINOSMovePath::m_pRunHelper
class CINOSMovePathHelper * m_pRunHelper
pointer to run helper thread
Definition: cinosmovepath.h:1933
CINOSMovePath::WaitCmd
uint32 WaitCmd(uint32 auCommand, uint32 auError=INOS_MOVEPATH_ERROR_NO_COMMAND_QUEUE)
wait for auCommand or eCmdAbort (return auError if no command queue available)
CINOSMovePath::~CINOSMovePath
virtual ~CINOSMovePath()
destructor (application should use CINOSMovePath::Destroy)
CINOSMovePath::EditEnd
virtual uint32 EditEnd(bool abIncomplete=false)
Exit edit mode.
cinosmovepathtrajectory.h
The CINOSMovePathTrajectors class.
CINOSMovePath::NrbKnot
virtual uint32 NrbKnot(double adValue, uint32 auMultiplicity=1)
Add a control point to the nurbs curve.
CINOSMovePath::GetCmdQueue
CINOSTaskQueue * GetCmdQueue()
get pointer to command queue
CINOSSync
Definition: inos_syn.h:66
DF_INOS_MOVEPATH_MAX_AXES
#define DF_INOS_MOVEPATH_MAX_AXES
Definition: inosdefault.h:152
CINOSTaskExMsg
Definition: cinostaskex.h:395
CINOSMovePath::GetMoveRemaining
virtual uint32 GetMoveRemaining(double &adMoveRemaining)
Return the remaining path length [path units]. It can be used to ask for the actual remaining length ...
CINOSMovePath::SetAxis
virtual uint32 SetAxis(const char *apName, uint8 auIndex, uint32 auFlags=0x00000000, const char *apType="PosAxis")
Map given axis name to given index.
CINOSMovePath::SetError
virtual void SetError(uint32 auError)
set move path error
Definition: cinosmovepath.h:1816
CINOSMovePath::AddResource
virtual uint32 AddResource(const char *apName, uint8 &auIndex, uint32 auFlags=0x00000000, const char *apType="PosAxis")
Add recource with given recource name and type.
CINOSMovePath::GetPositionFirst
void GetPositionFirst(TINOSMovePathVec &ovFirst)
get first path position vector
CINOSMovePath::Linear
virtual uint32 Linear(uint8 auIndex, double adPosition, uint32 auFlags=0)
Add a linear part to the current segment.
CINOSMovePath::ReleaseRegister
void ReleaseRegister()
release inco registration of path
CINOSMovePath::Append
virtual uint32 Append(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Appends curves that have been edited to the path.
SINOSRampData::m_rV
real64 m_rV
velocity
Definition: cinosbaseramp.h:606
CINOSMovePath::iCircleAngle
virtual uint32 iCircleAngle(bool abCw, uint8 auIndex1, uint8 auIndex2, double adMid1, double adMid2, double adAngle, bool abAngleAbsolute, uint32 auFlags)
internal circle angle
CINOSMovePath::m_uOptions
uint32 m_uOptions
options
Definition: cinosmovepath.h:1903
CINOSMovePath::Fail
virtual uint32 Fail(uint32 auError)
Cancel running path with a given error.
SINOSRampData::m_rA
real64 m_rA
acceleration
Definition: cinosbaseramp.h:608
CINOSMovePath::HandleCmd
uint32 HandleCmd(uint32 auError=INOS_OK)
check command queue (return auError if no command queue available)
ASSERT_ALWAYS
#define ASSERT_ALWAYS(f)
Definition: inosmacro.h:696
CINOSMovePath::Create
static uint32 Create(CINOSMovePath *&apPath, uint32 auOptions=uint32(0x00000000))
Create a movepath instance.
SINOSRampData::m_rS
real64 m_rS
position
Definition: cinosbaseramp.h:604
CINOSMovePath::GetParam
virtual uint32 GetParam(const char *apName, double &adValue, double adDefault=0.0)
Get movepath parameter.
CINOSMovePath::iContinue
virtual uint32 iContinue(class CINOSTaskExMsg *apMsg)
internal continue