Dynamixel  2.9.5
RoadNarrows Robotics Dynamixel Package
DynaServoGeneric.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: Dynamixel
4 //
5 // Library: librnr_dynamixel
6 //
7 // File: DynaServoGeneric.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2015-01-12 11:54:07 -0700 (Mon, 12 Jan 2015) $
12  * $Rev: 3846 $
13  *
14  * \ingroup dyna_lib_hdrs
15  *
16  * \brief Generic Dynamixel Servo Base Class Interface.
17  *
18  * \author Robin Knight (robin.knight@roadnarrows.com)
19  *
20  * \copyright
21  * \h_copy 2011-2017. RoadNarrows LLC.\n
22  * http://www.roadnarrows.com\n
23  * All Rights Reserved
24  */
25 /*
26  * @EulaBegin@
27  *
28  * Unless otherwise stated explicitly, all materials contained are copyrighted
29  * and may not be used without RoadNarrows LLC's written consent,
30  * except as provided in these terms and conditions or in the copyright
31  * notice (documents and software) or other proprietary notice provided with
32  * the relevant materials.
33  *
34  * IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY
35  * MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE
36  * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
37  * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
38  * DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN
39  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
42  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
43  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
44  * "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
45  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
46  *
47  * @EulaEnd@
48  */
49 ////////////////////////////////////////////////////////////////////////////////
50 
51 #ifndef _DYNA_SERVO_GENERIC_H
52 #define _DYNA_SERVO_GENERIC_H
53 
54 #include "rnr/rnrconfig.h"
55 #include "rnr/log.h"
56 
57 #include "Dynamixel/Dynamixel.h"
58 #include "Dynamixel/DynaError.h"
59 #include "Dynamixel/DynaComm.h"
60 #include "Dynamixel/DynaServo.h"
61 
62 
63 // ---------------------------------------------------------------------------
64 // Generic Dynamixel Servo Base Class
65 // ---------------------------------------------------------------------------
66 
67 /*!
68  * \ingroup dyna_lib_classes
69  *
70  * \brief Generic Dynamixel Servo Base Class
71  *
72  * The DynaServo base class provides the most commonly used interface functions
73  * for the various Dynamixel series servos.
74  */
76 {
77 public:
78  /*! Model number */
80 
81  /*!
82  * \brief Bare-bones initialization constructor.
83  *
84  * May be used be derived classes to avoid undue communication and
85  * initializaton overhead.
86  *
87  * \param comm Dynamixel bus communication instance.
88  *
89  */
91  DynaServo(comm, DYNA_ID_NONE, DYNA_MODEL_NUM, DYNA_FWVER_NA)
92  {
93  }
94 
95  /*!
96  * \brief Initialization constructor.
97  *
98  * \param comm Dynamixel bus communication instance.
99  * \param nServoId Servo Id.
100  * \param uModelNum Servo model number.
101  * \param uFwVer Servo firmware version.
102  */
104  int nServoId,
105  uint_t uModelNum = DYNA_MODEL_NUM,
106  uint_t uFwVer = DYNA_FWVER_NA);
107 
108  /*!
109  * \brief Destructor.
110  */
111  virtual ~DynaServoGeneric();
112 
113 
114  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
115  // Attribute Functions
116  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
117 
118  // Add any specific derived attribute functions here
119 
120  /*!
121  * \brief Convert raw temperature coding to degrees Celsius.
122  *
123  * \param uTemp Raw temperature value.
124  *
125  * \return Celsius.
126  */
127  virtual float CvtRawTempToC(uint uTemp)
128  {
129  return (float)uTemp; // 1-1 mapping
130  }
131 
132  /*!
133  * \brief Convert raw volts coding to volts.
134  *
135  * \param uTemp Raw volts value.
136  *
137  * \return Volatage.
138  */
139  virtual float CvtRawVoltToVolts(uint uVolts)
140  {
141  return (float)uVolts / 10.0;
142  }
143 
144 
145  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
146  // Servo Proxy Agent Functions
147  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
148 
149  /*!
150  * \brief Agent write to the servo state memory to set the new goal position.
151  *
152  * If the operation requires a servo proxy agent, then a call is made to the
153  * registered agent, if any. Otherwise a direct write to the servo is made.
154  *
155  * \par Control Table:
156  * \ref dyna_memmap_gen_goal_pos.\n
157  * \ref dyna_servo_pos.
158  *
159  * \param nGoalPos Goal position (odometer ticks).
160  *
161  * \copydoc doc_return_std
162  */
163  virtual int AgentWriteGoalPos(int nGoalOdPos);
164 
165  /*!
166  * \brief Agent write to the servo state memory to set the new goal speed.
167  *
168  * If the operation requires a servo proxy agent, then a call is made to the
169  * registered agent, if any. Otherwise a direct write to the servo is made.
170  *
171  * \par Control Table:
172  * \ref dyna_memmap_gen_goal_speed.\n
173  * \ref dyna_servo_speed.
174  *
175  * \param nGoalSpeed Goal speed (raw).
176  *
177  * \copydoc doc_return_std
178  */
179  virtual int AgentWriteGoalSpeed(int nGoalSpeed);
180 
181  /*!
182  * \brief Agent write to the servo state memory to set the new goal position
183  * and speed.
184  *
185  * If the operation requires a servo proxy agent, then a call is made to the
186  * registered agent, if any. Otherwise a direct write to the servo is made.
187  *
188  * \par Control Table:
189  * \ref dyna_memmap_gen_goal_pos.\n
190  * \ref dyna_servo_pos.
191  * \ref dyna_memmap_gen_goal_speed.\n
192  * \ref dyna_servo_speed.
193  *
194  * \param nGoalOdPos Goal position (odometer ticks).
195  * \param nGoalSpeed Goal speed (raw).
196  *
197  * \copydoc doc_return_std
198  */
199  virtual int AgentWriteGoalSpeedPos(int nGoalSpeed, int nGoalOdPos);
200 
201  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
202  // Servo Move Functions
203  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
204 
205  /*!
206  * \brief Move to the goal postition.
207  *
208  * The move will proceed at the current goal speed. If the servo is in
209  * continuous mode, but supports 360\h_deg positioning data, then a registered
210  * external user control function is required.
211  *
212  * If this servo is the master in a linked pair of servos, both servos will
213  * move synchronously.
214  *
215  * \par Operational Modes:
216  * Servo mode (\ref DYNA_MODE_SERVO).\n
217  * Continuous mode (\ref DYNA_MODE_CONTINUOUS) with 360\h_deg position data.\n
218  *
219  * \param nGoalOdPos Goal position (odometer ticks).
220  *
221  * \copydoc doc_return_std
222  */
223  virtual int MoveTo(int nGoalOdPos);
224 
225  /*!
226  * \brief Move at speed to the goal postition.
227  *
228  * For servos in continuous mode, speeds are in the range [-max,max] where the
229  * values \h_lt 0, 0, and \h_gt 0 specify goal rotation in the clockwise
230  * direction, stop, or goal rotation in the counterclockwise direction,
231  * respectively.
232  *
233  * For servos in servo mode, the goal direction is not applicable, and
234  * therefore, the speeds are in the range [0,max]. The special value 0 is
235  * equivalent to the maximum rpm speed without servo speed control. The
236  * absolute value of the goal speed is used.
237  *
238  * If the servo is in continuous mode, but supports 360\h_deg positioning
239  * data, a registered external user control function is required.
240  *
241  * If this servo is the master in a linked pair of servos, both servos will
242  * move synchronously.
243  *
244  * \par Operational Modes:
245  * Servo mode (\ref DYNA_MODE_SERVO). The direction will be ignored.\n
246  * Continuous mode (\ref DYNA_MODE_CONTINUOUS) with 360\h_deg position data.\n
247  *
248  * \param nGoalSpeed Goal speed (raw).
249  * \param nGoalOdPos Goal position (odometer ticks).
250  *
251  * \copydoc doc_return_std
252  */
253  virtual int MoveAtSpeedTo(int nGoalSpeed, int nGoalOdPos);
254 
255  /*!
256  * \brief Move at speed.
257  *
258  * Speeds are in the range [-max,max] where the values \h_lt 0, 0, and \h_gt 0
259  * specify goal rotation in the clockwise direction, stop, or goal rotation in
260  * the counterclockwise direction, respectively.
261  *
262  * If this servo is the master in a linked pair of servos, both servos will
263  * move synchronously.
264  *
265  * \par Operational Modes:
266  * Continuous mode (\ref DYNA_MODE_CONTINUOUS).
267  *
268  * \param nGoalSpeed Goal speed (raw).
269  *
270  * \copydoc doc_return_std
271  */
272  virtual int MoveAtSpeed(int nGoalSpeed);
273 
274  /*!
275  * \brief Emergency stop servo.
276  *
277  * All torque is removed.
278  *
279  * If this servo is the master in a linked pair of servos, both servos will
280  * be emergency stopped.
281  *
282  * \copydoc doc_return_std
283  */
284  virtual int EStop();
285 
286  /*!
287  * \brief Stop servo.
288  *
289  * Current torque levels are kept.
290  *
291  * If this servo is the master in a linked pair of servos, both servos will
292  * be stopped.
293  *
294  * \copydoc doc_return_std
295  */
296  virtual int Stop();
297 
298  /*!
299  * \brief Freeze servo at current position.
300  *
301  * Torque is applied.
302  *
303  * If this servo is the master in a linked pair of servos, both servos will
304  * be frozen.
305  *
306  * \copydoc doc_return_std
307  */
308  virtual int Freeze();
309 
310  /*!
311  * \brief Release servo from any applied torque.
312  *
313  * Servo is free to rotate.
314  *
315  * If this servo is the master in a linked pair of servos, both servos will
316  * be released.
317  *
318  * \copydoc doc_return_std
319  */
320  virtual int Release();
321 
322  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
323  // Servo Read/Write Functions
324  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
325 
326  /*!
327  * \brief Read from the servo configuration EEPROM the current rotation
328  * limits.
329  *
330  * If this servo is the master in a linked pair of servos, both servos'
331  * configuration data are read.
332  *
333  * \par Control Table:
334  * \ref dyna_memmap_gen_lim_cw.\n
335  * \ref dyna_memmap_gen_lim_ccw.\n
336  * \ref dyna_servo_pos.
337  *
338  * \param [out] pCwLim Clockwise limit.
339  * \param [out] pCcwLim Counterclockwise limit.
340  *
341  * \copydoc doc_return_std
342  */
343  virtual int CfgReadRotationLimits(uint_t *pCwLim, uint_t *pCcwLim);
344 
345  /*!
346  * \brief Write to the servo configuration EEPROM the new rotation limits.
347  *
348  * If this servo is the master in a linked pair of servos, both servos'
349  * configuration data are written.
350  *
351  * \par Control Table:
352  * \ref dyna_memmap_gen_lim_cw.
353  * \ref dyna_memmap_gen_lim_ccw.\n
354  * \ref dyna_servo_pos.
355  *
356  * \param uCwLim Clockwise limit.
357  * \param uCcwLim Counterclockwise limit.
358  *
359  * \copydoc doc_return_std
360  */
361  virtual int CfgWriteRotationLimits(uint_t uCwLim, uint_t uCcwLim);
362 
363  /*!
364  * \brief Read from the servo configuration EEPROM the current maximum
365  * temperature limit.
366  *
367  * If this servo is the master in a linked pair of servos, both servos'
368  * configuration data are read.
369  *
370  * \par Control Table:
371  * \ref dyna_memmap_gen_lim_temp_max.
372  *
373  * \param [out] pTempLim Temperature limit.
374  *
375  * \copydoc doc_return_std
376  */
377  virtual int CfgReadTemperatureLimit(uint_t *pTempLim);
378 
379  /*!
380  * \brief Write to the servo configuration EEPROM the new maximum temperature
381  * limit.
382  *
383  * \par Control Table:
384  * \ref dyna_memmap_gen_lim_temp_max.
385  *
386  * \param uTempLim Temperature limit.
387  *
388  * \copydoc doc_return_std
389  */
390  virtual int CfgWriteTemperatureLimit(uint_t uTempLim);
391 
392  /*!
393  * \brief Read from the servo configuration EEPROM the current voltage limits.
394  *
395  * If this servo is the master in a linked pair of servos, both servos'
396  * configuration data are read.
397  *
398  * \par Control Table:
399  * \ref dyna_memmap_gen_lim_volt_min.\n
400  * \ref dyna_memmap_gen_lim_volt_max.
401  *
402  * \param [out] pMinVoltLim Minimum voltage limit.
403  * \param [out] pMaxVoltLim Maximum voltage limit.
404  *
405  * \copydoc doc_return_std
406  */
407  virtual int CfgReadVoltageLimits(uint_t *pMinVoltLim, uint_t *pMaxVoltLim);
408 
409  /*!
410  * \brief Write to the servo configuration EEPROM the new voltage limits.
411  *
412  * If this servo is the master in a linked pair of servos, both servos'
413  * configuration data are written.
414  *
415  * \par Control Table:
416  * \ref dyna_memmap_gen_lim_volt_min.\n
417  * \ref dyna_memmap_gen_lim_volt_max.
418  *
419  * \param uMinVoltLim Minimum voltage limit.
420  * \param uMaxVoltLim Maximum voltage limit.
421  *
422  * \copydoc doc_return_std
423  */
424  virtual int CfgWriteVoltageLimits(uint_t uMinVoltLim, uint_t uMaxVoltLim);
425 
426  /*!
427  * \brief Read from the servo configuration EEPROM the current on power-up
428  * maximum torque limit.
429  *
430  * If this servo is the master in a linked pair of servos, both servos'
431  * configuration data are read.
432  *
433  * \par Control Table:
434  * \ref dyna_memmap_gen_lim_torque_max_on.\n
435  * \ref dyna_servo_torque.
436  *
437  * \param [out] pMaxTorqueLim Maximum torque limit.
438  *
439  * \copydoc doc_return_std
440  */
441  virtual int CfgReadMaxTorqueLimit(uint_t *pMaxTorqueLim);
442 
443  /*!
444  * \brief Write to the servo configuration EEPROM the new on power-up maximum
445  * torque limit.
446  *
447  * If this servo is the master in a linked pair of servos, both servos'
448  * configuration data are written.
449  *
450  * \par Control Table:
451  * \ref dyna_memmap_gen_lim_torque_max_on.\n
452  * \ref dyna_servo_torque.
453  *
454  * \param uMaxTorqueLim Maximum torque limit.
455  *
456  * \copydoc doc_return_std
457  */
458  virtual int CfgWriteMaxTorqueLimit(uint_t uMaxTorqueLim);
459 
460  /*!
461  * \brief Read from the servo configuration EEPROM the current servo shutdown
462  * on alarms mask.
463  *
464  * If this servo is the master in a linked pair of servos, both servos'
465  * configuration data are read.
466  *
467  * \par Control Table:
468  * \ref dyna_memmap_gen_alarm_shutdown.
469  *
470  * \param [out] pAlarmMask Shutdown alarm mask.
471  *
472  * \copydoc doc_return_std
473  */
474  virtual int CfgReadAlarmShutdownMask(uint_t *pAlarmMask);
475 
476  /*!
477  * \brief Write to the servo configuration EEPROM the new servo shutdown on
478  * alarms mask.
479  *
480  * \par Control Table:
481  * \ref dyna_memmap_gen_alarm_shutdown.
482  *
483  * \param uAlarmMask Shutdown alarm mask.
484  *
485  * \copydoc doc_return_std
486  */
487  virtual int CfgWriteAlarmShutdownMask(uint_t uAlarmMask);
488 
489  /*!
490  * \brief Read from the servo configuration EEPROM to determine the servo
491  * operational mode.
492  *
493  * If this servo is the master in a linked pair of servos, both servos'
494  * configuration data are read.
495  *
496  * \par Control Table:
497  * \ref dyna_servo_mode.\n
498  * \ref dyna_memmap_gen_lim_cw.\n
499  * \ref dyna_memmap_gen_lim_ccw.
500  *
501  * \param [out] pServoMode Servo mode.
502  *
503  * \copydoc doc_return_std
504  */
505  virtual int CfgReadServoMode(uint_t *pServoMode);
506 
507  /*!
508  * \brief Write to the servo configuration EEPROM to set the servo operational
509  * mode.
510  *
511  * If this servo is the master in a linked pair of servos, both servos'
512  * configuration data are written.
513  *
514  * \par Control Table:
515  * \ref dyna_servo_mode.\n
516  * \ref dyna_memmap_gen_lim_cw.\n
517  * \ref dyna_memmap_gen_lim_ccw.
518  *
519  * \param uCwLim Clockwise limit.
520  * \param uCcwLim Counterclockwise limit.
521  *
522  * \copydoc doc_return_std
523  */
524  virtual int CfgWriteServoMode(uint_t uCwLim, uint_t uCcwLim);
525 
526  /*!
527  * \brief Write to the servo configuration EEPROM to set the servo operational
528  * mode to the full/continuous mode.
529  *
530  * If this servo is the master in a linked pair of servos, both servos'
531  * configuration data are written.
532  *
533  * \par Control Table:
534  * \ref dyna_servo_mode.\n
535  * \ref dyna_memmap_gen_lim_cw.\n
536  * \ref dyna_memmap_gen_lim_ccw.
537  *
538  * \copydoc doc_return_std
539  */
540  virtual int CfgWriteServoModeContinuous();
541 
542  /*!
543  * \brief Read from the servo state memory the current torque enable value.
544  *
545  * If this servo is the master in a linked pair of servos, both servos' state
546  * data are read.
547  *
548  * \par Control Table:
549  * \ref dyna_memmap_gen_torque_en.
550  *
551  * \param [out] pState Torque enabled (true) or disabled (off) state.
552  *
553  * \copydoc doc_return_std
554  */
555  virtual int ReadTorqueEnable(bool *pState);
556 
557  /*!
558  * \brief Write to the servo state memory to set the new torque enable value.
559  *
560  * If the torque state is false (off), no power is applied to the servo,
561  * allowing it to be free rotated by any external force.
562  *
563  * If this servo is the master in a linked pair of servos, both servos' state
564  * written.
565  *
566  * \par Control Table:
567  * \ref dyna_memmap_gen_torque_en.
568  *
569  * \param bState Torque enabled (true) or disabled (off) state.
570  *
571  * \copydoc doc_return_std
572  */
573  virtual int WriteTorqueEnable(bool bState);
574 
575  /*!
576  * \brief Read from the servo state memory the current LED on/off value.
577  *
578  * If this servo is the master in a linked pair of servos, both servos' state
579  * data are read.
580  *
581  * \par Control Table:
582  * \ref dyna_memmap_gen_led.
583  *
584  * \param [out] pState On (true) or off (false) state.
585  *
586  * \copydoc doc_return_std
587  */
588  virtual int ReadLed(bool *pState);
589 
590  /*!
591  * \brief Write to the servo state memory to turn on or off the servo LED.
592  *
593  * If this servo is the master in a linked pair of servos, both servos' state
594  * written.
595  *
596  * \par Control Table:
597  * \ref dyna_memmap_gen_led.
598  *
599  * \param bState On (true) or off (false) state.
600  *
601  * \copydoc doc_return_std
602  */
603  virtual int WriteLed(bool bState);
604 
605  /*!
606  * \brief Read from the servo state memory the current control method
607  * parameters.
608  *
609  * The control method used is determined by the servo's specification.
610  *
611  * If this servo is the master in a linked pair of servos, both servos' state
612  * data are read.
613  *
614  * \par Control Table:
615  * \ref dyna_ctl_method.\n
616  * \ref dyna_memmap_gen_cw_comp_margin.\n
617  * \ref dyna_memmap_gen_ccw_comp_margin.\n
618  * \ref dyna_memmap_gen_cw_comp_slope.\n
619  * \ref dyna_memmap_gen_ccw_comp_slope.\n
620  * \ref dyna_memmap_gen_p_gain.\n
621  * \ref dyna_memmap_gen_i_gain.\n
622  * \ref dyna_memmap_gen_d_gain.
623  *
624  * \param [out] pCtlMethod Control method parameters.
625  *
626  * \copydoc doc_return_std
627  */
628  virtual int ReadControlMethod(DynaServoCtlMethod_T *pCtlMethod);
629 
630  /*!
631  * \brief Write to the servo state memory the new control method parameters.
632  *
633  * The control method used is determined by the servo's specification.
634  *
635  * If this servo is the master in a linked pair of servos, both servos' state
636  * data are written.
637  *
638  * \par Control Table:
639  * \ref dyna_ctl_method.\n
640  * \ref dyna_memmap_gen_cw_comp_margin.\n
641  * \ref dyna_memmap_gen_ccw_comp_margin.\n
642  * \ref dyna_memmap_gen_cw_comp_slope.\n
643  * \ref dyna_memmap_gen_ccw_comp_slope.\n
644  * \ref dyna_memmap_gen_p_gain.\n
645  * \ref dyna_memmap_gen_i_gain.\n
646  * \ref dyna_memmap_gen_d_gain.
647  *
648  * \param ctlMethod Control method parameters.
649  *
650  * \copydoc doc_return_std
651  */
652  virtual int WriteControlMethod(DynaServoCtlMethod_T &ctlMethod);
653 
654  /*!
655  * \brief Read from the servo state memory the current goal position.
656  *
657  * If this servo is the master in a linked pair of servos, both servos' state
658  * data are read.
659  *
660  * \par Control Table:
661  * \ref dyna_memmap_gen_goal_pos.\n
662  * \ref dyna_servo_pos.
663  *
664  * \param [out] pGoalPos Servo Mode: Encoder goal position.\n
665  * Continuous Mode: Odometer goal position.
666  *
667  * \copydoc doc_return_std
668  */
669  virtual int ReadGoalPos(int *pGoalPos);
670 
671  /*!
672  * \brief Write to the servo state memory to set the new goal position.
673  *
674  * If the servo [pair] are in servo mode, rotation will occur until the
675  * position(s) are achieved.
676  *
677  * If this servo is the master in a linked pair of servos, both servos' state
678  * written.
679  *
680  * \par Control Table:
681  * \ref dyna_memmap_gen_goal_pos.\n
682  * \ref dyna_servo_pos.
683  *
684  * \param nGoalOdPos Odometer goal position (odometer ticks).
685  * In continuous mode, writing the goal position has no
686  * effect on movement.
687  *
688  * \copydoc doc_return_std
689  */
690  virtual int WriteGoalPos(int nGoalOdPos);
691 
692  /*!
693  * \brief Read from the servo state memory the current goal speed and
694  * direction.
695  *
696  * For servos in continuous mode, speeds are in the range [-max,max] where the
697  * values \h_lt 0, 0, and \h_gt 0 specify goal rotation in the clockwise
698  * direction, stop, or goal rotation in the counterclockwise direction,
699  * respectively.
700  *
701  * For servos in servo mode, the goal direction is not applicable, and
702  * therefore, the speeds are in the range [0,max]. The special value 0 is
703  * equivalent to the maximum rpm speed without servo speed control.
704  *
705  * If this servo is the master in a linked pair of servos, both servos' state
706  * data are read.
707  *
708  * \par Control Table:
709  * \ref dyna_memmap_gen_goal_speed.\n
710  * \ref dyna_servo_speed.\n
711  * \ref dyna_servo_dir.
712  *
713  * \param [out] pGoalSpeed Goal speed.
714  *
715  * \copydoc doc_return_std
716  */
717 
718  virtual int ReadGoalSpeed(int *pGoalSpeed);
719 
720  /*!
721  * \brief Write to the servo state memory the new goal speed and direction.
722  *
723  * For servos in continuous mode, speeds are in the range [-max,max] where the
724  * values \h_lt 0, 0, and \h_gt 0 specify goal rotation in the clockwise
725  * direction, stop, or goal rotation in the counterclockwise direction,
726  * respectively.
727  *
728  * For servos in servo mode, the goal direction is not applicable, and
729  * therefore, the speeds are in the range [0,max]. The special value 0 is
730  * equivalent to the maximum rpm speed without servo speed control.
731  *
732  * If the servo is in continuous mode, rotation will occur indefinitely
733  * in the direction specified and at the given speed.
734  *
735  * \par Control Table:
736  * \ref dyna_memmap_gen_goal_speed.\n
737  * \ref dyna_servo_speed.\n
738  * \ref dyna_servo_dir.
739  *
740  * \param nGoalSpeed Goal speed.
741  *
742  * \copydoc doc_return_std
743  */
744  virtual int WriteGoalSpeed(int nGoalSpeed);
745 
746  /*!
747  * \brief Read from the servo state memory the current maximum torque limit.
748  *
749  * The servo will initially set this value to the value in the
750  * \ref dyna_memmap_gen_lim_torque_max configuration.
751  * The servo will set this value to 0 on an alarm shutdown event.
752  *
753  * If this servo is the master in a linked pair of servos, both servos' state
754  * data are read.
755  *
756  * \par Control Table:
757  * \ref dyna_memmap_gen_lim_torque_max.\n
758  * \ref dyna_servo_torque.
759  *
760  * \param [out] pMaxTorqueLim Maximum torque limit.
761  *
762  * \copydoc doc_return_std
763  */
764  virtual int ReadMaxTorqueLimit(uint_t *pMaxTorqueLim);
765 
766  /*!
767  * \brief Write to the servo state memory to set the new maximum torque limit.
768  *
769  * If this servo is the master in a linked pair of servos, both servos' state
770  * written.
771  *
772  * \par Control Table:
773  * \ref dyna_memmap_gen_lim_torque_max.\n
774  * \ref dyna_servo_torque.
775  *
776  * \param uMaxTorqueLim Maximum torque limit.
777  *
778  * \copydoc doc_return_std
779  */
780  virtual int WriteMaxTorqueLimit(uint_t uMaxTorqueLim);
781 
782  /*!
783  * \brief Reload the maximum torque limit from the configuration.
784  *
785  * If this servo is the master in a linked pair of servos, both servos' state
786  * data are reloaded.
787  *
788  * \par Control Table:
789  * \ref dyna_memmap_gen_lim_torque_max_on.\n
790  * \ref dyna_memmap_gen_lim_torque_max.
791  *
792  * \copydoc doc_return_std
793  */
794  virtual int ReloadMaxTorqueLimit();
795 
796  /*!
797  * \brief Read from the servo state memory the current servo position.
798  *
799  * If this servo is the master in a linked pair of servos, both servos' state
800  * data are read.
801  *
802  * \par Control Table:
803  * \ref dyna_memmap_gen_cur_pos.\n
804  * \ref dyna_servo_pos.
805  *
806  * \param [out] pCurOdPos Odometer current position (ticks).
807  *
808  * \copydoc doc_return_std
809  */
810  virtual int ReadCurPos(int *pCurOdPos);
811 
812  /*!
813  * \brief Read from the servo state memory the current speed and direction.
814  *
815  * Speeds are in the range [-max,max] where the values \h_lt 0, 0, and \h_gt 0
816  * specify the servo is rotating in the clockwise direction, the servo is
817  * stopped, or the servo is rotating in the counterclockwise direction,
818  * respectively.
819  *
820  * If this servo is the master in a linked pair of servos, both servos' state
821  * data are read.
822  *
823  * \par Control Table:
824  * \ref dyna_memmap_gen_cur_speed.\n
825  * \ref dyna_servo_speed.\n
826  * \ref dyna_servo_dir.
827  *
828  * \param [out] pCurSpeed Current speed.
829  *
830  * \copydoc doc_return_std
831  */
832  virtual int ReadCurSpeed(int *pCurSpeed);
833 
834  /*!
835  * \brief Read from the servo state memory the current load.
836  *
837  * Loads are in the range [-max,max] where the values \h_lt 0, 0, and \h_gt 0
838  * specify torques loads in clockwise direction, no torque load, or torque
839  * loads in the counterclockwise direction, respectively.
840  * Load is approximately 0.1% of maximum.
841  *
842  * \par Control Table:
843  * \ref dyna_memmap_gen_cur_load.
844  *
845  * \param [out] pCurLoad Current load.
846  *
847  * \copydoc doc_return_std
848  */
849  virtual int ReadCurLoad(int *pCurLoad);
850 
851  /*!
852  * \brief Read from the servo state memory the current servo dynamics.
853  *
854  * If this servo is the master in a linked pair of servos, both servos' state
855  * data are read.
856  *
857  * \par Control Table:
858  * \ref dyna_memmap_gen_cur_pos.\n
859  * \ref dyna_memmap_gen_cur_speed.\n
860  * \ref dyna_memmap_gen_cur_load.\n
861  *
862  * \param [out] pCurPos Current position.
863  * \param [out] pCurSpeed Current speed.
864  * \param [out] pCurLoad Current load.
865  *
866  * \copydoc doc_return_std
867  */
868  virtual int ReadDynamics(int *pCurPos,
869  int *pCurSpeed,
870  int *pCurLoad);
871 
872  /*!
873  * \brief Read from the servo state memory the current servo health.
874  *
875  * If this servo is the master in a linked pair of servos, both servos' state
876  * data are read.
877  *
878  * \par Control Table:
879  * \ref dyna_memmap_gen_cur_load.\n
880  * \ref dyna_memmap_gen_cur_volt.\n
881  * \ref dyna_memmap_gen_cur_temp.
882  *
883  * \param [out] pAlarms Servo alarms.
884  * \param [out] pCurLoad Current load.
885  * \param [out] pCurVolt Current voltage.
886  * \param [out] pCurTemp Current temperature.
887  *
888  * \copydoc doc_return_std
889  */
890  virtual int ReadHealth(uint_t *pAlarms,
891  int *pCurLoad,
892  uint_t *pCurVolt,
893  uint_t *pCurTemp);
894 
895  /*!
896  * \brief Read from the servo state memory to test if the servo is currently
897  * moving.
898  *
899  * If this servo is the master in a linked pair of servos, both servos' state
900  * data are read.
901  *
902  * \par Control Table:
903  * \ref dyna_memmap_gen_is_moving.
904  *
905  * \param [out] pState Servo is [not] moving (true/false) state.
906  *
907  * \copydoc doc_return_std
908  */
909  virtual int ReadIsMoving(bool *pState);
910 
911  /*!
912  * Read a raw value from the servo EEPROM/RAM control table.
913  *
914  * \warning
915  * The shadowed configuration and state data are not update.\n
916  * Linked servos are not kept in sync.
917  *
918  * \param uAddr Control table address.
919  * \param [out] pVal Read raw value.
920  *
921  * \copy doc_return_std
922  */
923  virtual int Read(uint_t uAddr, uint_t *pVal);
924 
925  /*!
926  * Write a raw value to the servo EEPROM/RAM control table.
927  *
928  * \warning The shadowed configuration and state data are not updated and will
929  * hence be out of sync.
930  *
931  * \warning Any linked master-slave servos may get out of sync and may result
932  * in physical damage.
933  *
934  * \param uAddr Control table address.
935  * \param uVal Raw value to write.
936  *
937  * \copy doc_return_std
938  */
939  virtual int Write(uint_t uAddr, uint_t uVal);
940 
941  /*!
942  * \brief Ping this servo.
943  *
944  * \return Returns true if the servo responded, else false.
945  */
946  virtual bool Ping();
947 
948  /*!
949  * \brief Reset this servo back to default values.
950  *
951  * \warning All configuration is lost.
952  *
953  * \copydoc doc_std_return
954  */
955  virtual int Reset();
956 
957  /*!
958  * \brief Synchronize the shadowed configuration and state data to the servo
959  * control table.
960  *
961  * \copydoc doc_return_std
962  */
963  virtual int SyncData();
964 
965  /*!
966  * \brief Synchronize the shadowed configuration to the servo control table
967  * EEPROM configuration.
968  *
969  * \copydoc doc_return_std
970  */
971  virtual int SyncCfg();
972 
973  /*!
974  * \brief Synchronize the shadowed state data to the servo control table RAM
975  * state.
976  *
977  * \copydoc doc_return_std
978  */
979  virtual int SyncState();
980 
981  /*!
982  * \brief Dump contents of the servo EEPROM and RAM control tables.
983  */
984  virtual void Dump();
985 
986 protected:
987 
988  /*!
989  * \brief Initialize servo class instance.
990  */
991  void Init();
992 
993  /*!
994  * \brief Initialize servo fixed specification data.
995  */
996  void InitSpec();
997 
998  /*!
999  * \brief Initialize servo configuration data.
1000  */
1001  void InitCfg();
1002 
1003  /*!
1004  * \brief Initialize servo state data.
1005  */
1006  void InitState();
1007 
1008  /*!
1009  * \brief Check data for consitencies.
1010  */
1011  virtual void CheckData();
1012 
1013  /*!
1014  * \brief Set the servo mode given the servo capabilites and the current
1015  * rotation limits.
1016  *
1017  * See \ref dyna_servo_mode.
1018  */
1019  void SetServoMode();
1020 
1021  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1022  // Linking Fuctions
1023  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1024 
1025  /*!
1026  * \brief Calculate the linked mate's goal position given this servo's goal
1027  * position.
1028  *
1029  * \param nGoalOdPos Goal position (odometer ticks).
1030  * \param [out] pGoalOdPosMate Mate's calculated goal
1031  * position (odometer ticks).
1032  *
1033  * \copydoc doc_return_std
1034  */
1035  virtual int CalcMatesGoalPos(int nGoalOdPos, int *pGoalOdPosMate);
1036 
1037  /*!
1038  * \brief Calculate the linked mate's speed speed given this servo's goal
1039  * speed.
1040  *
1041  * \return Mate's goal speed.
1042  */
1043  virtual int CalcMatesGoalSpeed(int nGoalSpeed)
1044  {
1045  return m_link.m_bRotReversed? -nGoalSpeed: nGoalSpeed;
1046  }
1047 
1048  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1049  // Protect Read/Write Functions
1050  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1051 
1052  /*!
1053  * \brief Read from the servo state memory the current compliance control method
1054  * parameters.
1055  *
1056  * If this servo is the master in a linked pair of servos, both servos' state
1057  * data are read.
1058  *
1059  * \par Control Table:
1060  * \ref dyna_ctl_method.\n
1061  * \ref dyna_memmap_gen_cw_comp_margin.\n
1062  * \ref dyna_memmap_gen_ccw_comp_margin.\n
1063  * \ref dyna_memmap_gen_cw_comp_slope.\n
1064  * \ref dyna_memmap_gen_ccw_comp_slope.
1065  *
1066  * \param [out] pCtlMethod Control method parameters.
1067  *
1068  * \copydoc doc_return_std
1069  */
1070  virtual int ReadCtlMethodCompliance(DynaServoCtlMethod_T *pCtlMethod);
1071 
1072  /*!
1073  * \brief Write to the servo state memory the new compliance control method
1074  * parameters.
1075  *
1076  * If this servo is the master in a linked pair of servos, both servos' state
1077  * data are written.
1078  *
1079  * \par Control Table:
1080  * \ref dyna_ctl_method.\n
1081  * \ref dyna_memmap_gen_cw_comp_margin.\n
1082  * \ref dyna_memmap_gen_ccw_comp_margin.\n
1083  * \ref dyna_memmap_gen_cw_comp_slope.\n
1084  * \ref dyna_memmap_gen_ccw_comp_slope.\n
1085  *
1086  * \param ctlMethod Control method parameters.
1087  *
1088  * \copydoc doc_return_std
1089  */
1090  virtual int WriteCtlMethodCompliance(DynaServoCtlMethod_T &ctlMethod);
1091 
1092  /*!
1093  * \brief Read from the servo state memory the current PID control method
1094  * parameters.
1095  *
1096  * If this servo is the master in a linked pair of servos, both servos' state
1097  * data are read.
1098  *
1099  * \par Control Table:
1100  * \ref dyna_ctl_method.\n
1101  * \ref dyna_memmap_gen_p_gain.\n
1102  * \ref dyna_memmap_gen_i_gain.\n
1103  * \ref dyna_memmap_gen_d_gain.
1104  *
1105  * \param [out] pCtlMethod Control method parameters.
1106  *
1107  * \copydoc doc_return_std
1108  */
1109  virtual int ReadCtlMethodPid(DynaServoCtlMethod_T *pCtlMethod);
1110 
1111  /*!
1112  * \brief Write to the servo state memory the new PID control method
1113  * parameters.
1114  *
1115  * If this servo is the master in a linked pair of servos, both servos' state
1116  * data are written.
1117  *
1118  * \par Control Table:
1119  * \ref dyna_ctl_method.\n
1120  * \ref dyna_memmap_gen_p_gain.\n
1121  * \ref dyna_memmap_gen_i_gain.\n
1122  * \ref dyna_memmap_gen_d_gain.
1123  *
1124  * \param ctlMethod Control method parameters.
1125  *
1126  * \copydoc doc_return_std
1127  */
1128  virtual int WriteCtlMethodPid(DynaServoCtlMethod_T &ctlMethod);
1129 
1130  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1131  // Field Checking and Packing Functions
1132  // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1133 
1134  /*!
1135  * \brief Check validity of compliance slope discrete values.
1136  *
1137  * \param uVal Slope value.
1138  *
1139  * \return Returns true if value is valid, false otherwise.
1140  */
1141  virtual bool ChkComplianceSlope(uint_t uVal);
1142 
1143  /*!
1144  * \brief Pack the goal speed into the control table value.
1145  *
1146  * For servos in continuous mode, speeds are in the range [-max,max] where the
1147  * values \h_lt 0, 0, and \h_gt 0 specify rotation in the clockwise direction,
1148  * stop, or rotation in the counterclockwise direction, respectively.
1149  *
1150  * For servos in servo mode, the goal direction is not applicable, and
1151  * therefore, the speeds are in the range [0,max]. The special value 0 is
1152  * equivalent to the maximum rpm speed without servo speed control.
1153  *
1154  * \param nGoalSpeed Goal speed.
1155  *
1156  * \return Returns packed value.
1157  */
1158  virtual uint_t PackGoalSpeed(int nGoalSpeed);
1159 
1160  /*!
1161  * \brief Unpack goal speed from the control table value.
1162  *
1163  * For servos in continuous mode, speeds are in the range [-max,max] where the
1164  * values \h_lt 0, 0, and \h_gt 0 specify the servo is rotating in the clockwise
1165  * direction, the servo is stopped, or the servo is rotating in the
1166  * counterclockwise direction, respectively.
1167  *
1168  * For servos in servo mode, the goal direction is not applicable, and
1169  * therefore, the speeds are in the range [0,max]. The special value 0 is
1170  * equivalent to the maximum rpm speed without servo speed control.
1171  *
1172  * \param uVal Packed field.
1173  *
1174  * \return Goal speed.
1175  */
1176  virtual int UnpackGoalSpeed(uint_t uVal);
1177 
1178  /*!
1179  * \brief Unpack current speed from the control table value.
1180  *
1181  * Speeds are in the range [-max,max] where the values \h_lt 0, 0, and \h_gt 0
1182  * specify the servo is rotating in the clockwise direction, the servo is
1183  * stopped, or the servo is rotating in the counterclockwise direction,
1184  * respectively.
1185  *
1186  * \param uVal Packed field.
1187  *
1188  * \return Current speed.
1189  */
1190  virtual int UnpackCurSpeed(uint_t uVal);
1191 
1192  /*!
1193  * \brief Unpack current load estimate from the control table value.
1194  *
1195  * Loads are in the range [-max,max] where the values \h_lt 0, 0, and \h_gt 0
1196  * specify torques loads in clockwise direction, no torque load, or torque
1197  * loads in the counterclockwise direction, respectively.
1198  *
1199  * \param uVal Packed field.
1200  *
1201  * \return Current load.
1202  */
1203  virtual int UnpackCurLoad(uint_t uVal);
1204 };
1205 
1206 
1207 #endif // _DYNA_SERVO_GENERIC_H
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
virtual int ReadHealth(uint_t *pAlarms, int *pCurLoad, uint_t *pCurVolt, uint_t *pCurTemp)
Read from the servo state memory the current servo health.
virtual int WriteGoalPos(int nGoalOdPos)
Write to the servo state memory to set the new goal position.
virtual void Dump()
Dump contents of the servo EEPROM and RAM control tables.
virtual int CfgReadAlarmShutdownMask(uint_t *pAlarmMask)
Read from the servo configuration EEPROM the current servo shutdown on alarms mask.
virtual int MoveTo(int nGoalOdPos)
Move to the goal postition.
#define DYNA_MODEL_NUM_GENERIC
generic, base model
Definition: Dynamixel.h:119
virtual int ReadGoalSpeed(int *pGoalSpeed)
Read from the servo state memory the current goal speed and direction.
virtual int CfgReadServoMode(uint_t *pServoMode)
Read from the servo configuration EEPROM to determine the servo operational mode. ...
virtual int WriteCtlMethodCompliance(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new compliance control method parameters.
static const int DYNA_MODEL_NUM
virtual int UnpackCurSpeed(uint_t uVal)
Unpack current speed from the control table value.
virtual int ReadCurLoad(int *pCurLoad)
Read from the servo state memory the current load.
virtual int Reset()
Reset this servo back to default values.
virtual int CfgWriteAlarmShutdownMask(uint_t uAlarmMask)
Write to the servo configuration EEPROM the new servo shutdown on alarms mask.
#define DYNA_FWVER_NA
firmware version not available
Definition: Dynamixel.h:136
virtual float CvtRawTempToC(uint uTemp)
Convert raw temperature coding to degrees Celsius.
virtual int MoveAtSpeed(int nGoalSpeed)
Move at speed.
void Init()
Initialize servo class instance.
virtual bool ChkComplianceSlope(uint_t uVal)
Check validity of compliance slope discrete values.
virtual int WriteGoalSpeed(int nGoalSpeed)
Write to the servo state memory the new goal speed and direction.
virtual ~DynaServoGeneric()
Destructor.
virtual float CvtRawVoltToVolts(uint uVolts)
Convert raw volts coding to volts.
virtual int AgentWriteGoalPos(int nGoalOdPos)
Agent write to the servo state memory to set the new goal position.
Dynamixel Servo Abstract Base Class.
Definition: DynaServo.h:78
virtual int ReadGoalPos(int *pGoalPos)
Read from the servo state memory the current goal position.
virtual int CfgWriteVoltageLimits(uint_t uMinVoltLim, uint_t uMaxVoltLim)
Write to the servo configuration EEPROM the new voltage limits.
virtual int CalcMatesGoalPos(int nGoalOdPos, int *pGoalOdPosMate)
Calculate the linked mate's goal position given this servo's goal position.
virtual int Release()
Release servo from any applied torque.
virtual int CfgReadRotationLimits(uint_t *pCwLim, uint_t *pCcwLim)
Read from the servo configuration EEPROM the current rotation limits.
virtual int Freeze()
Freeze servo at current position.
virtual int ReadCurPos(int *pCurOdPos)
Read from the servo state memory the current servo position.
virtual int EStop()
Emergency stop servo.
virtual int WriteTorqueEnable(bool bState)
Write to the servo state memory to set the new torque enable value.
Dynamixel Control Method Structure.
Definition: DynaTypes.h:146
virtual int ReadCtlMethodPid(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current PID control method parameters.
virtual int WriteLed(bool bState)
Write to the servo state memory to turn on or off the servo LED.
DynaServoGeneric(DynaComm &comm)
Bare-bones initialization constructor.
virtual int SyncState()
Synchronize the shadowed state data to the servo control table RAM state.
void SetServoMode()
Set the servo mode given the servo capabilites and the current rotation limits.
Generic Dynamixel Servo Base Class.
virtual int MoveAtSpeedTo(int nGoalSpeed, int nGoalOdPos)
Move at speed to the goal postition.
void InitCfg()
Initialize servo configuration data.
virtual int CfgWriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo configuration EEPROM the new on power-up maximum torque limit. ...
void InitState()
Initialize servo state data.
virtual int ReadIsMoving(bool *pState)
Read from the servo state memory to test if the servo is currently moving.
virtual int ReadMaxTorqueLimit(uint_t *pMaxTorqueLim)
Read from the servo state memory the current maximum torque limit.
virtual int CfgReadTemperatureLimit(uint_t *pTempLim)
Read from the servo configuration EEPROM the current maximum temperature limit.
CrossLink_T m_link
servo cross linkage
Definition: DynaServo.h:840
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
virtual void CheckData()
Check data for consitencies.
virtual int AgentWriteGoalSpeed(int nGoalSpeed)
Agent write to the servo state memory to set the new goal speed.
virtual int ReadCtlMethodCompliance(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current compliance control method parameters.
virtual int ReadTorqueEnable(bool *pState)
Read from the servo state memory the current torque enable value.
virtual int SyncCfg()
Synchronize the shadowed configuration to the servo control table EEPROM configuration.
virtual int UnpackGoalSpeed(uint_t uVal)
Unpack goal speed from the control table value.
virtual int WriteControlMethod(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new control method parameters.
virtual int SyncData()
Synchronize the shadowed configuration and state data to the servo control table. ...
RoadNarrows Dynamixel Top-Level Package Header File.
virtual bool Ping()
Ping this servo.
virtual uint_t PackGoalSpeed(int nGoalSpeed)
Pack the goal speed into the control table value.
virtual int Read(uint_t uAddr, uint_t *pVal)
virtual int AgentWriteGoalSpeedPos(int nGoalSpeed, int nGoalOdPos)
Agent write to the servo state memory to set the new goal position and speed.
virtual int ReloadMaxTorqueLimit()
Reload the maximum torque limit from the configuration.
virtual int CfgReadMaxTorqueLimit(uint_t *pMaxTorqueLim)
Read from the servo configuration EEPROM the current on power-up maximum torque limit.
virtual int ReadLed(bool *pState)
Read from the servo state memory the current LED on/off value.
virtual int WriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo state memory to set the new maximum torque limit.
#define DYNA_ID_NONE
no servo id
Definition: Dynamixel.h:145
virtual int ReadDynamics(int *pCurPos, int *pCurSpeed, int *pCurLoad)
Read from the servo state memory the current servo dynamics.
virtual int Stop()
Stop servo.
virtual int Write(uint_t uAddr, uint_t uVal)
virtual int UnpackCurLoad(uint_t uVal)
Unpack current load estimate from the control table value.
virtual int CfgWriteTemperatureLimit(uint_t uTempLim)
Write to the servo configuration EEPROM the new maximum temperature limit.
virtual int CfgWriteServoModeContinuous()
Write to the servo configuration EEPROM to set the servo operational mode to the full/continuous mode...
virtual int CfgWriteRotationLimits(uint_t uCwLim, uint_t uCcwLim)
Write to the servo configuration EEPROM the new rotation limits.
virtual int ReadCurSpeed(int *pCurSpeed)
Read from the servo state memory the current speed and direction.
virtual int CfgWriteServoMode(uint_t uCwLim, uint_t uCcwLim)
Write to the servo configuration EEPROM to set the servo operational mode.
virtual int ReadControlMethod(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current control method parameters.
RoadNarrows Dynamixel Library Error and Logging Routines.
virtual int WriteCtlMethodPid(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new PID control method parameters.
void InitSpec()
Initialize servo fixed specification data.
Dynamixel Bus Communications Abstract Base Class.
Definition: DynaComm.h:80
virtual int CalcMatesGoalSpeed(int nGoalSpeed)
Calculate the linked mate's speed speed given this servo's goal speed.
virtual int CfgReadVoltageLimits(uint_t *pMinVoltLim, uint_t *pMaxVoltLim)
Read from the servo configuration EEPROM the current voltage limits.