Dynamixel  2.9.5
RoadNarrows Robotics Dynamixel Package
dynashell_cmd_servo.cxx File Reference

The Dynamixel Shell Servo Derived Commands. More...

#include <cstring>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"
#include "Dynamixel/Dynamixel.h"
#include "Dynamixel/DynaComm.h"
#include "Dynamixel/DynaChain.h"
#include "dynashell.h"
#include "dynashell_cmd.h"
#include "dynashell_util.h"

Go to the source code of this file.

Classes

class  DynaShellCmdMoveTo
 Determine if servos are moving. More...
 
class  DynaShellCmdMoveAtSpeedTo
 Determine if servos are moving. More...
 
class  DynaShellCmdEStop
 Emergency stop command. More...
 
class  DynaShellCmdStop
 Stop servo(s) command. More...
 
class  DynaShellCmdFreeze
 Freeze command. More...
 
class  DynaShellCmdRelease
 Release command. More...
 
class  DynaShellCmdGetOdometer
 Read servos goal positions. More...
 
class  DynaShellCmdSetOdometer
 Determine if servos are moving. More...
 
class  DynaShellCmdCfgWriteServoMode
 Write EEPROM configuration to put servos into the given modes. More...
 
class  DynaShellCmdReadTorqueEnable
 Read servos goal positions. More...
 
class  DynaShellCmdWriteTorqueEnable
 Determine if servos are moving. More...
 
class  DynaShellCmdReadGoalPos
 Read servos goal positions. More...
 
class  DynaShellCmdReadGoalSpeed
 Read servos goal positions. More...
 
class  DynaShellCmdWriteGoalSpeed
 Determine if servos are moving. More...
 
class  DynaShellCmdReadMaxTorqueLimit
 Read servos on power-up or run-time maximum torque limits. More...
 
class  DynaShellCmdWriteMaxTorqueLimit
 Write servos on power-up or run-time maximum torque limits. More...
 
class  DynaShellCmdGetSoftTorqueTh
 Read servos goal positions. More...
 
class  DynaShellCmdSetSoftTorqueTh
 Determine if servos are moving. More...
 
class  DynaShellCmdReadCurPos
 Read servos current positions. More...
 
class  DynaShellCmdReadCurSpeed
 Read servos current positions. More...
 
class  DynaShellCmdReadDynamics
 Read servos goal positions. More...
 
class  DynaShellCmdReadHealth
 Read servos goal positions. More...
 
class  DynaShellCmdReadIsMoving
 Determine if servos are moving. More...
 
class  DynaShellCmdClearAlarms
 Determine if servos are moving. More...
 
class  DynaShellCmdReadByte
 Read servo byte value at address. More...
 
class  DynaShellCmdWriteByte
 Write byte value to servo at address. More...
 
class  DynaShellCmdReadWord
 Read servo byte value at address. More...
 
class  DynaShellCmdWriteWord
 Write byte value to servo at address. More...
 
class  DynaShellCmdDump
 Read servo byte value at address. More...
 

Functions

const char * rotdirstr (int nSpeed)
 Convert rotation direction to string. More...
 
void PublishShellServoCommands (DynaShell &shell)
 Publish shell servo commands to shell. More...
 

Detailed Description

The Dynamixel Shell Servo Derived Commands.

LastChangedDate
2015-01-12 10:56:06 -0700 (Mon, 12 Jan 2015)
Rev
3845
Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)

Definition in file dynashell_cmd_servo.cxx.

Function Documentation

void PublishShellServoCommands ( DynaShell shell)

Publish shell servo commands to shell.

shell Dynamixel shell.

Definition at line 2846 of file dynashell_cmd_servo.cxx.

References DynaShell::PublishCommand().

Referenced by DynaShellCmdChainOut::ArgToUInt(), and MainInit().

2847 {
2848  shell.PublishCommand(NULL, new DynaShellCmdMoveTo());
2849  shell.PublishCommand(NULL, new DynaShellCmdMoveAtSpeedTo());
2850  shell.PublishCommand(NULL, new DynaShellCmdEStop());
2851  shell.PublishCommand(NULL, new DynaShellCmdStop());
2852  shell.PublishCommand(NULL, new DynaShellCmdFreeze());
2853  shell.PublishCommand(NULL, new DynaShellCmdRelease());
2854 
2855  shell.PublishCommand("get", new DynaShellCmdGetOdometer());
2856  shell.PublishCommand("set", new DynaShellCmdSetOdometer());
2857 
2858  shell.PublishCommand("write", new DynaShellCmdCfgWriteServoMode());
2859 
2860  shell.PublishCommand("read", new DynaShellCmdReadTorqueEnable());
2861  shell.PublishCommand("write", new DynaShellCmdWriteTorqueEnable());
2862 
2863  shell.PublishCommand("read", new DynaShellCmdReadGoalPos());
2864  //shell.PublishCommand("read", new DynaShellCmdWriteGoalPos());
2865 
2866  shell.PublishCommand("read", new DynaShellCmdReadGoalSpeed());
2867  shell.PublishCommand("write", new DynaShellCmdWriteGoalSpeed());
2868 
2869  shell.PublishCommand("read", new DynaShellCmdReadMaxTorqueLimit());
2870  shell.PublishCommand("write", new DynaShellCmdWriteMaxTorqueLimit());
2871 
2872  shell.PublishCommand("get", new DynaShellCmdGetSoftTorqueTh());
2873  shell.PublishCommand("set", new DynaShellCmdSetSoftTorqueTh());
2874 
2875  shell.PublishCommand("read", new DynaShellCmdReadCurPos());
2876  shell.PublishCommand("read", new DynaShellCmdReadCurSpeed());
2877 
2878  shell.PublishCommand("read", new DynaShellCmdReadDynamics());
2879  shell.PublishCommand("read", new DynaShellCmdReadHealth());
2880  shell.PublishCommand("clear", new DynaShellCmdClearAlarms());
2881 
2882  shell.PublishCommand("read", new DynaShellCmdReadIsMoving());
2883 
2884  shell.PublishCommand("read", new DynaShellCmdReadByte());
2885  shell.PublishCommand("write", new DynaShellCmdWriteByte());
2886 
2887  shell.PublishCommand("read", new DynaShellCmdReadWord());
2888  shell.PublishCommand("write", new DynaShellCmdWriteWord());
2889 
2890  shell.PublishCommand("dump", new DynaShellCmdDump());
2891 }
Read servo byte value at address.
Write servos on power-up or run-time maximum torque limits.
Determine if servos are moving.
Determine if servos are moving.
Read servo byte value at address.
Read servos current positions.
Determine if servos are moving.
Read servos goal positions.
Read servos goal positions.
Read servos current positions.
Determine if servos are moving.
Determine if servos are moving.
Read servos goal positions.
Emergency stop command.
Read servos goal positions.
Determine if servos are moving.
Read servos goal positions.
Determine if servos are moving.
Write byte value to servo at address.
void PublishCommand(const char *sParent, DynaShellCmd *pNewCmd)
Publish new command to shell.
Definition: dynashell.cxx:192
Read servo byte value at address.
Read servos goal positions.
Write EEPROM configuration to put servos into the given modes.
Write byte value to servo at address.
Read servos goal positions.
Determine if servos are moving.
Read servos on power-up or run-time maximum torque limits.
Stop servo(s) command.
const char* rotdirstr ( int  nSpeed)
inline

Convert rotation direction to string.

Parameters
nSpeedSpeed.
Returns
Short string.

Definition at line 75 of file dynashell_cmd_servo.cxx.

Referenced by DynaShellCmdReadGoalSpeed::doExec(), and DynaShellCmdReadCurSpeed::doExec().

76 {
77  if( nSpeed < 0 )
78  {
79  return "(cw)";
80  }
81  else if( nSpeed == 0 )
82  {
83  return "";
84  }
85  else
86  {
87  return "(ccw)";
88  }
89 }