Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ArmController Class Reference

Listens to control commands coming in from the command port for remotely controlling the arm. More...

#include <ArmController.h>

Inheritance diagram for ArmController:

Detailed Description

Listens to control commands coming in from the command port for remotely controlling the arm.

The communication protocol is a very simple binary format, shared with WalkControllerBehavior. Each command is sent as a 5-byte group. The first byte is a command selector, and the following 4 bytes are a floating point argument:

  • <char: command indicator>
  • <float: value>

The valid values for command indicator are given by CMD_shoulder, CMD_elbow, or CMD_wrist ('s', 'e', or 'w' respectively).

Definition at line 31 of file ArmController.h.

List of all members.

Static Public Member Functions

static int mechacmd_callback (char *buf, int bytes)
 called by wireless when there's new data

Static Public Attributes

static ArmControllertheOne = NULL

Protected Types

enum  DisplayMode_t { pitchAndYaw = 0, yawOnly, pitchOnly }

Protected Attributes

MotionManager::MC_ID arm_id
 the ArmMC to use
MotionManager::MC_ID pidMCID
HandEyeGripper GripperControl
KinematicJointgripperFrameKJ
KinematicJointKJjoints [NumArmJoints]
float horScale
float verScale
enum ArmController::DisplayMode_t displayMode

Command Bytes



float theta
float verZ
fmat::Column< 3 > horToBase
fmat::Column< 3 > verToBase
float speed
unsigned int OriJoint
int linksToDisplay
char armConfig [NumArmJoints]
float qOffset [NumArmJoints]
float yawCoords [NumArmJoints][2]
float pitchCoords [NumArmJoints][2]
int numYawJoints
int numPitchJoints
ArmControllertheLastOne
Socketcmdsock
 The input command stream socket.
static const char CMD_unrelax = 'u'
static const char CMD_relax = 'v'
static const char CMD_gripper = 'w'
static const char CMD_point = 'x'
static const char CMD_speed = 'y'
static const char CMD_connect = 'z'
static std::string getClassDescription ()
void runCommand (unsigned char *command)
 Executes a command. Called by mechacmd_callback.
void doEvent ()
void cmdConnect ()
void cmdPointPicker (float param, float param2, float param3, int cmdno)
void cmdGripper (float param, int cmdno)
void cmdRelax ()
void cmdUnrelax ()
void setJoint (unsigned int joint, float param)
 ArmController (const ArmController &)
 don't call
ArmController operator= (const ArmController &)
 don't call
 ArmController ()
 constructor
virtual ~ArmController ()
 destructor
virtual void doStart ()
 Setup the scale and the joints quantity to display.
virtual void doStop ()
void computeCoords ()
void sendCoords ()
virtual std::string getDescription () const

Member Enumeration Documentation

enum ArmController::DisplayMode_t [protected]
Enumerator:
pitchAndYaw 
yawOnly 
pitchOnly 

Definition at line 48 of file ArmController.h.


Constructor & Destructor Documentation

ArmController::ArmController ( const ArmController  )  [protected]

don't call

ArmController::ArmController (  ) 

constructor

Definition at line 106 of file ArmController.h.

virtual ArmController::~ArmController (  )  [virtual]

destructor

Definition at line 121 of file ArmController.h.


Member Function Documentation

void ArmController::cmdConnect (  )  [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 292 of file ArmController.cc.

Referenced by runCommand().

void ArmController::cmdGripper ( float  param,
int  cmdno 
) [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 394 of file ArmController.cc.

Referenced by runCommand().

void ArmController::cmdPointPicker ( float  param,
float  param2,
float  param3,
int  cmdno 
) [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 339 of file ArmController.cc.

Referenced by runCommand().

void ArmController::cmdRelax (  )  [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 409 of file ArmController.cc.

Referenced by runCommand().

void ArmController::cmdUnrelax (  )  [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 417 of file ArmController.cc.

Referenced by runCommand().

void ArmController::computeCoords (  ) 

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 463 of file ArmController.cc.

Referenced by cmdConnect(), doEvent(), and setJoint().

void ArmController::doEvent (  )  [protected, virtual]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Reimplemented from BehaviorBase.

Definition at line 119 of file ArmController.cc.

void ArmController::doStart (  )  [virtual]

Setup the scale and the joints quantity to display.

Reimplemented from BehaviorBase.

Definition at line 24 of file ArmController.cc.

void ArmController::doStop (  )  [virtual]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Reimplemented from BehaviorBase.

Definition at line 109 of file ArmController.cc.

static std::string ArmController::getClassDescription (  )  [static]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Reimplemented from BehaviorBase.

Definition at line 135 of file ArmController.h.

Referenced by getDescription().

virtual std::string ArmController::getDescription (  )  const [virtual]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Reimplemented from BehaviorBase.

Definition at line 140 of file ArmController.h.

int ArmController::mechacmd_callback ( char *  buf,
int  bytes 
) [static]

called by wireless when there's new data

Definition at line 151 of file ArmController.cc.

Referenced by doStart().

ArmController ArmController::operator= ( const ArmController  )  [protected]

don't call

void ArmController::runCommand ( unsigned char *  command  )  [protected]

Executes a command. Called by mechacmd_callback.

Definition at line 197 of file ArmController.cc.

Referenced by mechacmd_callback().

void ArmController::sendCoords (  ) 

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 513 of file ArmController.cc.

Referenced by cmdConnect(), doEvent(), and setJoint().

void ArmController::setJoint ( unsigned int  joint,
float  param 
) [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 424 of file ArmController.cc.

Referenced by runCommand().


Member Data Documentation

the ArmMC to use

Definition at line 41 of file ArmController.h.

Referenced by doStart(), doStop(), and setJoint().

char ArmController::armConfig[NumArmJoints] [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 71 of file ArmController.h.

Referenced by ArmController(), cmdConnect(), computeCoords(), and doStart().

const char ArmController::CMD_connect = 'z' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 60 of file ArmController.h.

Referenced by runCommand().

const char ArmController::CMD_gripper = 'w' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 57 of file ArmController.h.

Referenced by runCommand().

const char ArmController::CMD_point = 'x' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 58 of file ArmController.h.

Referenced by runCommand().

const char ArmController::CMD_relax = 'v' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 56 of file ArmController.h.

Referenced by runCommand().

const char ArmController::CMD_speed = 'y' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 59 of file ArmController.h.

Referenced by runCommand().

const char ArmController::CMD_unrelax = 'u' [static, protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 55 of file ArmController.h.

Referenced by runCommand().

The input command stream socket.

Definition at line 86 of file ArmController.h.

Referenced by cmdConnect(), cmdGripper(), cmdPointPicker(), doEvent(), doStart(), doStop(), sendCoords(), and setJoint().

Definition at line 43 of file ArmController.h.

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 64 of file ArmController.h.

Referenced by cmdPointPicker(), and doStart().

KinematicJoint* ArmController::KJjoints[NumArmJoints] [protected]

Definition at line 45 of file ArmController.h.

Referenced by cmdPointPicker(), computeCoords(), doStart(), and setJoint().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 68 of file ArmController.h.

Referenced by cmdConnect(), cmdPointPicker(), computeCoords(), and doStart().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 76 of file ArmController.h.

Referenced by cmdConnect(), computeCoords(), doEvent(), doStart(), sendCoords(), and setJoint().

int ArmController::numYawJoints [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 75 of file ArmController.h.

Referenced by cmdConnect(), computeCoords(), doEvent(), doStart(), sendCoords(), and setJoint().

unsigned int ArmController::OriJoint [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 67 of file ArmController.h.

Referenced by cmdConnect().

Definition at line 42 of file ArmController.h.

Referenced by cmdRelax(), cmdUnrelax(), doStart(), and doStop().

float ArmController::pitchCoords[NumArmJoints][2] [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 74 of file ArmController.h.

Referenced by cmdConnect(), computeCoords(), doEvent(), sendCoords(), and setJoint().

float ArmController::qOffset[NumArmJoints] [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 72 of file ArmController.h.

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 66 of file ArmController.h.

Referenced by runCommand(), and setJoint().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 83 of file ArmController.h.

Referenced by doStart(), doStop(), and ~ArmController().

Points to the one ArmController object that the input command stream is talking to. A kludge. Dunno how you're gonna make sure you're not using this uninitialized.

Definition at line 37 of file ArmController.h.

Referenced by doStart(), doStop(), and ~ArmController().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 62 of file ArmController.h.

Referenced by cmdPointPicker(), and doStart().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 65 of file ArmController.h.

Referenced by cmdPointPicker(), and doStart().

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 63 of file ArmController.h.

Referenced by cmdPointPicker().

float ArmController::yawCoords[NumArmJoints][2] [protected]

The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place.

Definition at line 73 of file ArmController.h.

Referenced by cmdConnect(), computeCoords(), doEvent(), sendCoords(), and setJoint().


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

Tekkotsu v5.1CVS
Generated Tue Jan 31 04:32:15 2012 by Doxygen 1.6.3