Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project
hekKin.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Hekateros
4 //
5 // Library: libhekateros
6 //
7 // File: hekKin.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2015-05-15 12:50:46 -0600 (Fri, 15 May 2015) $
12  * $Rev: 3988 $
13  *
14  * \brief The Hekateros kinematics and dynamics class interface.
15  *
16  * The class instance starts a kinematics thread to sense kinematic chain
17  * dynamics, control forward geometry kinematics, and monitor servo health.
18  *
19  * The kinematics includes all physical kinematic chains. The individual chains
20  * are controlled by the higher-level interfaces such as MoveIt!
21  *
22  * The kinematics thread performs several functions:
23  * \li Position, velocity, acceleration (future), and torque monitoring.
24  * \li Goal joint position and velocity PID control.
25  * \li Torque limiting override control.
26  * \li Servo health monitoring.
27  *
28  * There are two alternative kinematics thread execution algorithms.
29  *
30  * \par Individual Move Execution Cycle
31  * \ref HEK_KIN_EXEC_ALG_INDIV
32  * \verbatim
33  * get next task
34  * if task is a joint task
35  * sense()
36  * sense dynamics (3 dynabus reads)
37  * act()
38  * control movement (1+ dynabus writes)
39  * limit torque if necessary (1+ dynabus writes)
40  * else if task is to monitor
41  * monitor()
42  * health of one servo (3 dynabus reads)
43  * block wait for next task time
44  * \endverbatim
45  *
46  * \par Sync Move Execution Cycle
47  * \ref HEK_KIN_EXEC_ALG_SYNC
48  * \verbatim
49  * sense()
50  * for each joint
51  * sense dynamics (3 dynabus reads)
52  * react()
53  * for each joint
54  * stop motion if necessary (1 dynabus write)
55  * limit torque if necessary (1+ dynabus writes)
56  * plan()
57  * for each joint
58  * plan motion and add to synchronous write messages
59  * act()
60  * sync write (1 or 2 dynabus messages)
61  * monitor()
62  * health of one servo (3 dynabus reads)
63  * block wait for next cycle time
64  * \endverbatim
65  *
66  * \author Robin Knight (robin.knight@roadnarrows.com)
67  *
68  * \copyright
69  * \h_copy 2014-2017. RoadNarrows LLC.\n
70  * http://www.roadnarrows.com\n
71  * All Rights Reserved
72  */
73 /*
74  * @EulaBegin@
75  *
76  * Unless otherwise stated explicitly, all materials contained are copyrighted
77  * and may not be used without RoadNarrows LLC's written consent,
78  * except as provided in these terms and conditions or in the copyright
79  * notice (documents and software) or other proprietary notice provided with
80  * the relevant materials.
81  *
82  * IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY
83  * MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE
84  * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
85  * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
86  * DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN
87  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88  *
89  * THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
90  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
91  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
92  * "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
93  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
94  *
95  * @EulaEnd@
96  */
97 ////////////////////////////////////////////////////////////////////////////////
98 
99 #ifndef _HEK_KIN_H
100 #define _HEK_KIN_H
101 
102 #include <sys/time.h>
103 #include <time.h>
104 #include <pthread.h>
105 
106 #include <vector>
107 #include <map>
108 
109 #include "rnr/rnrconfig.h"
110 #include "rnr/log.h"
111 
112 #include "Dynamixel/Dynamixel.h"
113 #include "Dynamixel/DynaError.h"
114 #include "Dynamixel/DynaServo.h"
115 #include "Dynamixel/DynaChain.h"
116 
117 #include "Hekateros/hekateros.h"
118 #include "Hekateros/hekTune.h"
119 #include "Hekateros/hekJoint.h"
120 #include "Hekateros/hekTraj.h"
121 #include "Hekateros/hekKinJoint.h"
122 #include "Hekateros/hekUtils.h"
123 
124 
125 namespace hekateros
126 {
127  // ---------------------------------------------------------------------------
128  // HekKinematics Class
129  // ---------------------------------------------------------------------------
130 
131  /*!
132  * Hekateros kinematics class.
133  *
134  * The HekKinematics class supports background control and monitoring of
135  * registered joints and servos.
136  */
138  {
139  public:
140  /*!
141  * \brief Kinematics thread states.
142  */
144  {
145  ThreadStateUninit, ///< thread created but unitialized
146  ThreadStateReady, ///< thread created and ready to run
147  ThreadStateRunning, ///< thread running
148  ThreadStateExit ///< thread exiting/exited
149  };
150 
151  /*!
152  * \brief Associative Map of kinematic joints.
153  */
154  typedef map<std::string, HekKinJoint *> KinChain;
155 
156  /*!
157  * \brief Order list of tasks.
158  */
159  typedef vector<std::string> TaskList;
160 
161  /*!
162  * \brief Default initializer constructor.
163  *
164  * \param dynaChain Bound Dynamixel chain of all motors (servos).
165  * \param kinJointDesc Joint descriptions in kinematic chain to control.
166  * \param tunes Hekateros tuning parameters.
167  */
168  HekKinematics(DynaChain &dynaChain,
169  MapRobotJoints &kinJointDesc,
170  const HekTunes &tunes);
171 
172  /*!
173  * \brief Desctructor.
174  */
175  virtual ~HekKinematics();
176 
177  /*!
178  * \brief Build ordered list of tasks to execute.
179  *
180  * \todo TODO: Currently this list is hard coded to the Hekateros family
181  * of arms and end effectors. How to generalize?
182  */
183  virtual void buildTaskList();
184 
185  /*!
186  * \brief Reload configuration tuning parameters for all joints.
187  *
188  * \param tunes Hekateros tuning parameters.
189  */
190  virtual void reload(const HekTunes &tunes);
191 
192  /*!
193  * \brief Get the current instantaneous joint position and velocity.
194  *
195  * \param [in] strJointName Joint name.
196  * \param [out] fJointCurPos Current joint position (radians).
197  * \param [out] fJointCurVel Current joint velocity (radians/second).
198  */
199  virtual void getJointCurPosVel(const std::string &strJointName,
200  double &fJointCurPos,
201  double &fJointCurVel);
202 
203  /*!
204  * \brief Get the smoothed (filtered) current joint position and velocity.
205  *
206  * \param [in] strJointName Joint name.
207  * \param [out] fJointCurPos Current joint position (radians).
208  * \param [out] fJointCurVel Current joint velocity (radians/second).
209  */
210  virtual void getFilteredJointCurPosVel(const std::string &strJointName,
211  double &fJointCurPos,
212  double &fJointCurVel);
213 
214  /*!
215  * \brief Get the current servo position and speed.
216  *
217  * \param [in] strJointName Joint name.
218  * \param [out] nServoCurPos Current servo position (odometer ticks).
219  * \param [out] nServoCurSpeed Current servo velocity (raw unitless).
220  */
221  void getServoCurPosSpeed(const std::string &strJointName,
222  int &nServoCurPos,
223  int &nServoCurSpeed);
224 
225  /*!
226  * \brief Convert joint position to the equivalent servo position.
227  *
228  * \param strJointName Joint name.
229  * \param fPos Joint position (radians).
230  *
231  * \return Equivalent servo position (odometer ticks).
232  */
233  int jointPosToServoPos(const std::string &strJointName, const double fPos);
234 
235  /*!
236  * \brief Convert servo position to the equivalent joint position.
237  *
238  * \param strJointName Joint name.
239  * \param nOdPos Servo position (odometer ticks).
240  *
241  * \return Equivalent joint position (radians).
242  */
243  double servoPosToJointPos(const std::string &strJointName,
244  const int nOdPos);
245 
246  /*!
247  * \brief Test if joint is moving.
248  *
249  * \param strJointName Joint name.
250  *
251  * \return Returns true if stopped, false otherwise.
252  */
253  virtual bool isStopped(const std::string &strJointName);
254 
255  /*!
256  * \brief Test if joint is in an over torque condition.
257  *
258  * \param strJointName Joint name.
259  *
260  * \return Returns true if in condition, false otherwise.
261  */
262  virtual bool hasOverTorqueCondition(const std::string &strJointName);
263 
264  /*!
265  * \brief Reset all joints' master servos odometers to the current
266  * respective encoder positions.
267  *
268  * \par Context:
269  * Calling thread.
270  *
271  * \return Number of joint servos reset.
272  */
273  virtual int resetServoOdometersForAllJoints();
274 
275  /*!
276  * \brief Reset joint's master servo odometer to the current encoder
277  * position.
278  *
279  * \par Context:
280  * Calling thread.
281  *
282  * \param strJointName Name of joint with master servo to reset.
283  *
284  * \copydoc doc_return_std
285  */
286  virtual int resetServoOdometer(const std::string &strJointName);
287 
288  /*!
289  * \brief Emergency stop the kinematics chain.
290  *
291  * All servos will stop driving, so chain may fall.
292  *
293  * \par Context:
294  * Calling thread.
295  */
296  virtual void estop();
297 
298  /*!
299  * \brief Freeze kinematics chain at the current position.
300  *
301  * The joint servos are still being driven. However, all active joint
302  * motion control will cease.
303  *
304  * \par Context:
305  * Calling thread.
306  */
307  virtual void freeze();
308 
309  /*!
310  * \brief Release kinematics chain.
311  *
312  * Servos will stop driving, so the chain may fall. This call is assumed to
313  * be under control, so recalibration is not required. Typically, the chain
314  * is released during manual repositioning or teaching.
315  *
316  * All active joint motion control will cease.
317  *
318  * \par Context:
319  * Calling thread.
320  */
321  virtual void release();
322 
323  /*!
324  * \brief Stop kinematics chain at the current position.
325  *
326  * The joint servos are still being driven. However, all active joint
327  * motion control will cease.
328  *
329  * \par Context:
330  * Calling thread.
331  *
332  * \return Number of joints stopped.
333  */
334  virtual int stop();
335 
336  /*!
337  * \brief Stop the set of joints at the current position.
338  *
339  * The joint servos are still being driven. However, all active joint
340  * motion control will cease.
341  *
342  * \par Context:
343  * Calling thread.
344  *
345  * \param vecJointName Vector list of joint names to stop.
346  *
347  * \return Number of joints stopped.
348  */
349  virtual int stop(const std::vector<std::string> &vecJointNames);
350 
351  /*!
352  * \brief Stop one joint at the current position.
353  *
354  * The joint servos are still being driven. However, all active joint
355  * motion control will cease.
356  *
357  * \par Context:
358  * Calling thread.
359  *
360  * \param strJointName Name of joint.
361  *
362  * \copydoc doc_return_std
363  */
364  virtual int stop(const std::string &strJointName);
365 
366  /*!
367  * \brief Wait for all joints to stop.
368  *
369  * \par Context:
370  * Calling thread.
371  *
372  * \param fSeconds Maximum number of seconds to wait.
373  *
374  * \copydoc doc_return_std
375  */
376  virtual int waitForAllStop(double fSeconds);
377 
378  /*!
379  * \brief Move kinematic chain through a trajectory point.
380  *
381  * \par Context:
382  * Calling thread.
383  *
384  * \param trajectoryPoint Trajectory end point.
385  *
386  * \return Number of joints with new move initiated.
387  */
388  virtual int move(HekJointTrajectoryPoint &trajectoryPoint);
389 
390  /*!
391  * \brief Move single joint.
392  *
393  * \par Context:
394  * Calling thread.
395  *
396  * \param strJointName Joint name.
397  * \param fJointGoalPos Joint goal position (radians).
398  * \param fJointGoalVel Joint goal velocity (radians/second).
399  *
400  * \copydoc doc_std_return
401  */
402  virtual int move(const std::string &strJointName,
403  const double fJointGoalPos,
404  const double fJointGoalVel);
405 
406  /*!
407  * \brief Set thread run rate and ancillary data.
408  *
409  * \param fHZ Thread run rate (Hertz).
410  */
411  virtual void setHz(const double fHz);
412 
413  /*!
414  * \brief Run the kinematics thread.
415  *
416  * \par Valid Current State:
417  * \ref ThreadStateReady
418  *
419  * \par New State:
420  * \ref ThreadStateRunning
421  *
422  * \par Context:
423  * Calling thread.
424  *
425  * \param fHZ Thread run rate (Hertz).
426  *
427  * \copydoc doc_std_return
428  */
429  int runThread(const double fHz = HekTuneKinHzDft);
430 
431  /*!
432  * \brief Wait one full cycle.
433  *
434  * \par Context:
435  * Calling thread.
436  */
437  void waitOneCycle();
438 
439  protected:
440  // thread, state, and synchronization
441  ThreadState m_eState; ///< thread state
442  pthread_mutex_t m_mutexSync; ///< synchonization mutex
443  pthread_cond_t m_condSync; ///< synchonization condition
444  pthread_t m_thread; ///< pthread identifier
445 
446  // the kinematics and dynamics
447  DynaChain &m_dynaChain; ///< dynamixel chain
448  KinChain m_kinChain; ///< kinematic chain
449  int m_nNumJoints; ///< number of joints to control
450  int m_nNumServos; ///< number of servos to monitor
451 
452  // scheduler
453  double m_fHz; ///< thread run rate (Hertz)
454  double m_fTExec; ///< task execution period (seconds)
455  struct timespec m_tsExecPeriod; ///< task execution period (converted)
456  struct timespec m_tsSched; ///< working scheduler time stamp
457 
458  // tasks
459  bool m_bIsControlling; ///< [not] actively controlling joints
460  TaskList m_taskList; ///< list of tasks to exec per cycle
461 #ifdef HEK_KIN_EXEC_ALG_SYNC
462  SyncMoveMsgs m_msgs; ///< dynachain synchronous messages
463  bool m_bWaitOneCycle; ///< caller is [not] waiting 1 exec cycle
464 #else // HEK_KIN_EXEC_ALG_INDIV
465  TaskList::iterator m_iterTask; ///< task iterator
466  std::string m_strTaskOneCycle;///< task name one cycle away
467 #endif // HEK_KIN_EXEC_ALG_SYNC
468  int m_iterHealth; ///< servo health iterator
469  int m_nHealthServoId; ///< health monitoring servo id
470 
471  /*!
472  * \brief Lock the kinematics thread.
473  *
474  * The calling thread will block while waiting for the mutex to become
475  * available. Once locked, the kinematics thread will block.
476  *
477  * The lock()/unlock() primitives provide a safe mechanism to modify the
478  * registered vServo data.
479  *
480  * \par Context:
481  * Any.
482  */
483  void lock()
484  {
485  pthread_mutex_lock(&m_mutexSync);
486  }
487 
488 
489  /*!
490  * \brief Unlock the kinematics thread.
491  *
492  * The kinematics thread will be available to run.
493  *
494  * \par Context:
495  * Any.
496  */
497  void unlock()
498  {
499  pthread_mutex_unlock(&m_mutexSync);
500  }
501 
502  /*!
503  * \brief Sense the state of all joints.
504  *
505  * \par Context:
506  * Kinematics thread.
507  */
508  virtual void sense();
509 
510  /*!
511  * \brief React to any necessary time-critical joint events.
512  *
513  * \par Context:
514  * Kinematics thread.
515  */
516  virtual void react();
517 
518  /*!
519  * \brief Sense-react the state of all joints.
520  *
521  * \par Context:
522  * Kinematics thread.
523  */
524  virtual void sense_react();
525 
526  /*!
527  * \brief Plan motions for all joints.
528  *
529  * \par Context:
530  * Kinematics thread.
531  */
532  virtual void plan();
533 
534  /*!
535  * \brief Move all joints.
536  *
537  * \par Context:
538  * Kinematics thread.
539  */
540  virtual int act();
541 
542  /*!
543  * \brief Monitor servo health thread task.
544  *
545  * \par Context:
546  * Kinematics thread.
547  */
548  virtual void monitorHealth();
549 
550  /*!
551  * \brief Execute kinematics task(s).
552  *
553  * \par Context:
554  * Kinematic thread.
555  */
556  virtual void exec();
557 
558  /*!
559  * \brief The kinematics thread.
560  *
561  * \param pArg Thread argument (point to HekKinematics object).
562  *
563  * \return Returns NULL on thread exit.
564  */
565  static void *thread(void *pArg);
566 
567  /*!
568  * \brief Create the kinematics thread.
569  *
570  * The thread remains blocked in the ready state until runThread() is
571  * called.
572  *
573  * \par Context:
574  * Calling thread.
575  */
576  void createThread();
577 
578  /*!
579  * \brief Terminate the kinematics thread.
580  *
581  * This function does not return until the thread actually terminates.
582  *
583  * \par Context:
584  * Calling thread.
585  */
586  void terminateThread();
587 
588  /*!
589  * \brief Change the kinematics thread state.
590  *
591  * The thread, if blocked, will be immediately woken up.
592  *
593  * \param eNewState New state.
594  *
595  * \par Context:
596  * Calling thread or kinematics thread.
597  */
598  void changeState(ThreadState eNewState)
599  {
600  m_eState = eNewState;
601  pthread_cond_signal(&m_condSync);
602  }
603 
604  /*!
605  * \brief Wait indefinitely while in the ready state.
606  *
607  * \par Context:
608  * Calling thread or kinematics thread.
609  */
610  void readyWait();
611 
612  /*!
613  * \brief Timed wait until state change or time out.
614  *
615  * \param lMicroSec Maximum wait duration (microseconds).
616  *
617  * \par Context:
618  * Calling thread or kinematics thread.
619  */
620  void timedWait(const struct timespec &tsTimeout);
621 
622  /*!
623  * \brief Block kinematics thread until the next subcycle task is to be run.
624  *
625  * \par Context:
626  * Kinematics thread.
627  */
628  void schedWait();
629  };
630 
631 } // namespace hekateros
632 
633 #endif // _HEK_KIN_H
vector< std::string > TaskList
Order list of tasks.
Definition: hekKin.h:159
ThreadState
Kinematics thread states.
Definition: hekKin.h:143
map< std::string, HekKinJoint * > KinChain
Associative Map of kinematic joints.
Definition: hekKin.h:154
static const double HekTuneKinHzDft
Default kinematics thread cycle rate (Hertz).
Definition: hekTune.h:93
virtual int stop()
Stop kinematics chain at the current position.
Definition: hekKin.cxx:399
virtual void freeze()
Freeze kinematics chain at the current position.
Definition: hekKin.cxx:373
virtual int waitForAllStop(double fSeconds)
Wait for all joints to stop.
Definition: hekKin.cxx:464
virtual void sense()
Sense the state of all joints.
Definition: hekKin.cxx:567
virtual void getJointCurPosVel(const std::string &strJointName, double &fJointCurPos, double &fJointCurVel)
Get the current instantaneous joint position and velocity.
Definition: hekKin.cxx:242
double m_fHz
thread run rate (Hertz)
Definition: hekKin.h:453
virtual bool isStopped(const std::string &strJointName)
Test if joint is moving.
Definition: hekKin.cxx:308
virtual void react()
React to any necessary time-critical joint events.
Definition: hekKin.cxx:577
Joint trajectory point class.
Definition: hekTraj.h:180
static void * thread(void *pArg)
The kinematics thread.
Definition: hekKin.cxx:736
bool m_bIsControlling
[not] actively controlling joints
Definition: hekKin.h:459
TaskList m_taskList
list of tasks to exec per cycle
Definition: hekKin.h:460
ThreadState m_eState
thread state
Definition: hekKin.h:441
Joint points and trajectory class interfaces.
thread created and ready to run
Definition: hekKin.h:146
void lock()
Lock the kinematics thread.
Definition: hekKin.h:483
Hekateros tuning data class.
Definition: hekTune.h:408
virtual int resetServoOdometersForAllJoints()
Reset all joints&#39; master servos odometers to the current respective encoder positions.
Definition: hekKin.cxx:220
KinChain m_kinChain
kinematic chain
Definition: hekKin.h:448
Container class to hold Dynamixel synchronous messages data.
Definition: hekKinJoint.h:93
void createThread()
Create the kinematics thread.
Definition: hekKin.cxx:809
void unlock()
Unlock the kinematics thread.
Definition: hekKin.h:497
void waitOneCycle()
Wait one full cycle.
Definition: hekKin.cxx:915
int runThread(const double fHz=HekTuneKinHzDft)
Run the kinematics thread.
Definition: hekKin.cxx:871
virtual ~HekKinematics()
Desctructor.
Definition: hekKin.cxx:153
Hekateros joint classes interfaces.
virtual void monitorHealth()
Monitor servo health thread task.
Definition: hekKin.cxx:633
virtual int act()
Move all joints.
Definition: hekKin.cxx:608
std::string m_strTaskOneCycle
task name one cycle away
Definition: hekKin.h:466
void terminateThread()
Terminate the kinematics thread.
Definition: hekKin.cxx:895
virtual void plan()
Plan motions for all joints.
Definition: hekKin.cxx:598
int m_nNumServos
number of servos to monitor
Definition: hekKin.h:450
virtual int resetServoOdometer(const std::string &strJointName)
Reset joint&#39;s master servo odometer to the current encoder position.
Definition: hekKin.cxx:336
std::map< int, HekRobotJoint > MapRobotJoints
Map of robot joints.
Definition: hekJoint.h:202
thread created but unitialized
Definition: hekKin.h:145
pthread_t m_thread
pthread identifier
Definition: hekKin.h:444
Top-level package include file.
struct timespec m_tsSched
working scheduler time stamp
Definition: hekKin.h:456
pthread_mutex_t m_mutexSync
synchonization mutex
Definition: hekKin.h:442
int jointPosToServoPos(const std::string &strJointName, const double fPos)
Convert joint position to the equivalent servo position.
Definition: hekKin.cxx:278
virtual bool hasOverTorqueCondition(const std::string &strJointName)
Test if joint is in an over torque condition.
Definition: hekKin.cxx:322
virtual void sense_react()
Sense-react the state of all joints.
Definition: hekKin.cxx:587
virtual void exec()
Execute kinematics task(s).
Definition: hekKin.cxx:687
struct timespec m_tsExecPeriod
task execution period (converted)
Definition: hekKin.h:455
void schedWait()
Block kinematics thread until the next subcycle task is to be run.
Definition: hekKin.cxx:965
virtual void setHz(const double fHz)
Set thread run rate and ancillary data.
Definition: hekKin.cxx:850
HekKinematics(DynaChain &dynaChain, MapRobotJoints &kinJointDesc, const HekTunes &tunes)
Default initializer constructor.
Definition: hekKin.cxx:87
void changeState(ThreadState eNewState)
Change the kinematics thread state.
Definition: hekKin.h:598
pthread_cond_t m_condSync
synchonization condition
Definition: hekKin.h:443
Hekateros common utilities.
virtual void release()
Release kinematics chain.
Definition: hekKin.cxx:382
virtual void getFilteredJointCurPosVel(const std::string &strJointName, double &fJointCurPos, double &fJointCurVel)
Get the smoothed (filtered) current joint position and velocity.
Definition: hekKin.cxx:254
Hekateros tuning.
virtual void estop()
Emergency stop the kinematics chain.
Definition: hekKin.cxx:356
virtual int move(HekJointTrajectoryPoint &trajectoryPoint)
Move kinematic chain through a trajectory point.
Definition: hekKin.cxx:500
void getServoCurPosSpeed(const std::string &strJointName, int &nServoCurPos, int &nServoCurSpeed)
Get the current servo position and speed.
Definition: hekKin.cxx:266
Hekateros powered joint kinematics and dynamics control class interface.
virtual void buildTaskList()
Build ordered list of tasks to execute.
Definition: hekKin.cxx:174
DynaChain & m_dynaChain
dynamixel chain
Definition: hekKin.h:447
double m_fTExec
task execution period (seconds)
Definition: hekKin.h:454
int m_iterHealth
servo health iterator
Definition: hekKin.h:468
void timedWait(const struct timespec &tsTimeout)
Timed wait until state change or time out.
Definition: hekKin.cxx:956
virtual void reload(const HekTunes &tunes)
Reload configuration tuning parameters for all joints.
Definition: hekKin.cxx:208
TaskList::iterator m_iterTask
task iterator
Definition: hekKin.h:465
The <b><i>Hekateros</i></b> namespace encapsulates all <b><i>Hekateros</i></b> related constructs...
Definition: hekateros.h:56
double servoPosToJointPos(const std::string &strJointName, const int nOdPos)
Convert servo position to the equivalent joint position.
Definition: hekKin.cxx:293
int m_nHealthServoId
health monitoring servo id
Definition: hekKin.h:469
void readyWait()
Wait indefinitely while in the ready state.
Definition: hekKin.cxx:941
int m_nNumJoints
number of joints to control
Definition: hekKin.h:449