Homepage Demos Overview Downloads Tutorials Reference
Credits

ERS210Info Namespace Reference


Detailed Description

Contains information about the ERS-210 Robot, such as number of joints, PID defaults, timing information, etc.


LED Bitmasks

Bitmasks for use when specifying combinations of LEDs (see LEDEngine ) Note that L/R are robot's POV

typedef unsigned int LEDBitMask_t
 So you can be clear when you're refering to a LED bitmask.

const LEDBitMask_t BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset)
 bottom left (red - sad)

const LEDBitMask_t BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset)
 bottom right (red - sad)

const LEDBitMask_t MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset)
 middle left (green - happy)

const LEDBitMask_t MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset)
 middle right (green - happy)

const LEDBitMask_t TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset)
 top left (red - angry)

const LEDBitMask_t TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset)
 top right (red - angry)

const LEDBitMask_t TopBrLEDMask = 1<<(TopBrLEDOffset-LEDOffset)
 top bar (green)

const LEDBitMask_t TlRedLEDMask = 1<<(TlRedLEDOffset-LEDOffset)
 red tail light

const LEDBitMask_t TlBluLEDMask = 1<<(TlBluLEDOffset-LEDOffset)
 blue tail light

const LEDBitMask_t FaceLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask
 LEDs for face (all but tail).

const LEDBitMask_t HeadLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask
 LEDs for face (all but tail).

const LEDBitMask_t BackLEDMask = 0
 210 has no back LEDs

const LEDBitMask_t TailLEDMask = TlRedLEDMask|TlBluLEDMask
 LEDs on tail.

const LEDBitMask_t AllLEDMask = ~0
 selects all of the leds


Output Offsets

Corresponds to entries in PrimitiveName, defined at the end of this file

enum  LegOffset_t { LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg }
 The offsets of the individual legs. More...

const unsigned PIDJointOffset = 0
 The beginning of the PID Joints.

const unsigned LegOffset = PIDJointOffset
 the offset of the beginning of the leg joints

const unsigned HeadOffset = LegOffset+NumLegJoints
 the offset of the beginning of the head joints

const unsigned TailOffset = HeadOffset+NumHeadJoints
 the offset of the beginning of the tail joints

const unsigned MouthOffset = TailOffset+NumTailJoints
 the offset of the beginning of the mouth joint

const unsigned LEDOffset = PIDJointOffset + NumPIDJoints
 the offset of LEDs in WorldState::outputs and MotionCommand functions

const unsigned BinJointOffset = LEDOffset + NumLEDs
 The beginning of the binary joints.

const unsigned EarOffset = BinJointOffset
 the offset of the beginning of the ear joints - note that ears aren't sensed. They can be flicked by the environment and you won't know. Nor will they be flicked back


Input Offsets

The order in which inputs should be stored

enum  ButtonOffset_t {
  LFrPawOffset = LFrLegOrder, RFrPawOffset = RFrLegOrder, LBkPawOffset = LBkLegOrder, RBkPawOffset = RBkLegOrder,
  ChinButOffset = 4, BackButOffset, HeadFrButOffset, HeadBkButOffset
}
 holds offsets to different buttons in WorldState::buttons[] More...

enum  SensorOffset_t {
  IRDistOffset = 0, BAccelOffset, LAccelOffset, DAccelOffset,
  ThermoOffset, PowerRemainOffset, PowerThermoOffset, PowerCapacityOffset,
  PowerVoltageOffset, PowerCurrentOffset
}
 holds offset to different sensor values in WorldState::sensors[] More...


Output Types Information

const unsigned NumPIDJoints = 18
 The number of joints which use PID motion - everything except ears.

const unsigned NumLEDs = 9
 The number LEDs which can be controlled.

const unsigned NumBinJoints = 2
 The number of binary joints - just the ears.

const unsigned NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs
 the total number of outputs

const bool IsFastOutput [NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,false }
const bool IsRealERS210 [NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true }
 we need this so you can tell programmatically which joints are "real" and which are "fake" in compatability mode


CPC IDs

values defined by OPEN-R, used to interface with lower level OPEN-R code to read sensors - DOESN'T correspond to ::PrimitiveName

const int CPCJointNeckTilt = 0
 Head.

const int CPCJointNeckPan = 1
 Head.

const int CPCJointNeckRoll = 2
 Head.

const int CPCSensorHeadBackPressure = 3
 Head.

const int CPCSensorHeadFrontPressure = 4
 Head.

const int CPCSensorPSD = 5
 Head.

const int CPCJointMouth = 6
 Head.

const int CPCSensorChinSwitch = 7
 Head.

const int CPCJointLFRotator = 8
 Left front leg.

const int CPCJointLFElevator = 9
 Head.

const int CPCJointLFKnee = 10
 Head.

const int CPCSensorLFPaw = 11
 Head.

const int CPCJointLHRotator = 12
 Left hind leg.

const int CPCJointLHElevator = 13
 Head.

const int CPCJointLHKnee = 14
 Head.

const int CPCSensorLHPaw = 15
 Head.

const int CPCJointRFRotator = 16
 Right front leg.

const int CPCJointRFElevator = 17
 Head.

const int CPCJointRFKnee = 18
 Head.

const int CPCSensorRFPaw = 19
 Head.

const int CPCJointRHRotator = 20
 Right hind leg.

const int CPCJointRHElevator = 21
 Head.

const int CPCJointRHKnee = 22
 Head.

const int CPCSensorRHPaw = 23
 Head.

const int CPCJointTailPan = 24
 Tail.

const int CPCJointTailTilt = 25
 Head.

const int CPCSensorThermoSensor = 26
 Head.

const int CPCSensorBackSwitch = 27
 Head.

const int CPCSensorAccelFB = 28
 Front-back; see RobotInfo::BAccelOffset.

const int CPCSensorAccelLR = 29
 Left-right; see RobotInfo::LAccelOffset.

const int CPCSensorAccelUD = 30
 Up-down; see RobotInfo::DAccelOffset.


Enumerations

enum  LEDOffset_t {
  BotLLEDOffset = LEDOffset, BotRLEDOffset, MidLLEDOffset, MidRLEDOffset,
  TopLLEDOffset, TopRLEDOffset, TopBrLEDOffset, TlRedLEDOffset,
  TlBluLEDOffset, FaceFrontLeftLEDOffset = BotLLEDOffset, FaceFrontRightLEDOffset = BotRLEDOffset, FaceCenterLeftLEDOffset = MidLLEDOffset,
  FaceCenterRightLEDOffset = MidRLEDOffset, FaceBackLeftLEDOffset = TopLLEDOffset, FaceBackRightLEDOffset = TopRLEDOffset, ModeLEDOffset = TopBrLEDOffset,
  TailRightLEDOffset = TlRedLEDOffset, TailLeftLEDOffset = TlBluLEDOffset
}
 The offsets of the individual LEDs on the head and tail. Note that L/R are robot's POV. See also LEDBitMask_t. More...

enum  MinMaxRange_t { MinRange, MaxRange }
 Defines the min and max index of entries in #outputRanges and #mechanicalLimits. More...


Variables

const unsigned int FrameTime = 8
 time between frames in the motion system (milliseconds)

const unsigned int NumFrames = 4
 the number of frames per buffer (don't forget also double buffered)

const unsigned int SlowFrameTime = 128
 time between frames for the ears (which move slower for some reason, don't want to mix with other outputs) (milliseconds)

const unsigned int NumSlowFrames = 1
 the number of frames per buffer being sent to ears (double buffered as well)

const unsigned int SoundBufferTime = 32
 the number of milliseconds per sound buffer... I'm not sure if this can be changed

const unsigned JointsPerLeg = 3
 The number of joints per leg.

const unsigned NumLegs = 4
 The number of legs.

const unsigned NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs

const unsigned NumHeadJoints = 3
 The number of joints in the neck.

const unsigned NumTailJoints = 2
 The number of joints assigned to the tail.

const unsigned NumMouthJoints = 1
 the number of joints that control the mouth

const unsigned NumEarJoints = 2
 The number of joints which control the ears (NOT per ear, is total).

const unsigned NumButtons = 8
 the number of buttons that are available, see ButtonOffset_t

const unsigned NumSensors = 1+3+1+5
 1 dist, 3 accel, 1 thermo, 5 from power, see SensorOffset_t

const unsigned outputNameLen = 9
 The length of the strings used for each of the outputs in outputNames (doesn't include null term).

const char *const  outputNames [NumOutputs]
 A name of uniform length for referring to joints - handy for posture files, etc.

const char *const  PrimitiveName [NumOutputs]
 the joint identifier strings used to refer to specific joints in OPEN-R (but not needed for others)

const char *const  SpeakerLocator = "PRM:/r1/c1/c2/c3/s1-Speaker:S1"
 use to open speaker connectio with the system

const char *const  CameraLocator = "PRM:/r1/c1/c2/c3/i1-FbkImageSensor:F1"
 use to open camera connection with the system

const float DefaultPIDs [NumPIDJoints][3]
 This table holds the default PID values for each joint. see PIDMC.

const unsigned char DefaultPIDShifts [3] = {0x0E, 0x02, 0x0F}
 These will control the shift values given to the system. see PIDMC.

const float MaxOutputSpeed [NumOutputs]
 These values are Sony's recommended maximum joint velocities, in rad/ms.

const double outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs.

const double mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs.


Typedef Documentation

typedef unsigned int ERS210Info::LEDBitMask_t
 

So you can be clear when you're refering to a LED bitmask.

Definition at line 115 of file ERS210Info.h.


Enumeration Type Documentation

enum ERS210Info::ButtonOffset_t
 

holds offsets to different buttons in WorldState::buttons[]

Should be a straight mapping to the ButtonSourceIDs

Note that the chest (power) button is not a normal button. It kills power to the motors at a hardware level, and isn't sensed in the normal way. If you want to know when it is pressed (and you are about to shut down) see PowerSourceID::PauseSID.

See also:
WorldState::buttons

ButtonSourceID_t

Enumeration values:
LFrPawOffset 
RFrPawOffset 
LBkPawOffset 
RBkPawOffset 
ChinButOffset 
BackButOffset 
HeadFrButOffset  not in reliable pressure units, but 1.0 is fairly stiff pressure, 0 is none
HeadBkButOffset  not in reliable pressure units, but 1.0 is fairly stiff pressure, 0 is none

Definition at line 151 of file ERS210Info.h.

enum ERS210Info::LEDOffset_t
 

The offsets of the individual LEDs on the head and tail. Note that L/R are robot's POV. See also LEDBitMask_t.

Enumeration values:
BotLLEDOffset  bottom left (red - sad)
BotRLEDOffset  bottom right (red - sad)
MidLLEDOffset  middle left (green - happy)
MidRLEDOffset  middle right (green - happy)
TopLLEDOffset  top left (red - angry)
TopRLEDOffset  top right (red - angry)
TopBrLEDOffset  top bar (green)
TlRedLEDOffset  red tail light
TlBluLEDOffset  blue tail light
FaceFrontLeftLEDOffset  alias for 220 cross-compatibility
FaceFrontRightLEDOffset  alias for 220 cross-compatibility
FaceCenterLeftLEDOffset  alias for 220 cross-compatibility
FaceCenterRightLEDOffset  alias for 220 cross-compatibility
FaceBackLeftLEDOffset  alias for 220 cross-compatibility
FaceBackRightLEDOffset  alias for 220 cross-compatibility
ModeLEDOffset  alias for 220 cross-compatibility
TailRightLEDOffset  alias for 220 cross-compatibility
TailLeftLEDOffset  alias for 220 cross-compatibility

Definition at line 90 of file ERS210Info.h.

enum ERS210Info::LegOffset_t
 

The offsets of the individual legs.

Enumeration values:
LFrLegOffset  beginning of left front leg
RFrLegOffset  beginning of right front leg
LBkLegOffset  beginning of left back leg
RBkLegOffset  beginning of right back leg

Definition at line 80 of file ERS210Info.h.

enum ERS210Info::MinMaxRange_t
 

Defines the min and max index of entries in outputRanges and mechanicalLimits.

Enumeration values:
MinRange 
MaxRange 

Definition at line 372 of file ERS210Info.h.

enum ERS210Info::SensorOffset_t
 

holds offset to different sensor values in WorldState::sensors[]

See also:
WorldState::sensors[]
Enumeration values:
IRDistOffset  in millimeters
BAccelOffset  backward acceleration, in $m/s^2$, negative if sitting on butt (positive for faceplant)
LAccelOffset  acceleration to the robot's left, in $m/s^2$, negative if lying on robot's left side
DAccelOffset  downward acceleration, in $m/s^2$, negative if standing up... be careful about the signs on all of these...
ThermoOffset  in degrees Celcius
PowerRemainOffset  percentage, 0-1
PowerThermoOffset  degrees Celcius
PowerCapacityOffset  milli-amp hours
PowerVoltageOffset  volts
PowerCurrentOffset  milli-amp negative values (maybe positive while charging?)

Definition at line 164 of file ERS210Info.h.


Variable Documentation

const LEDBitMask_t ERS210Info::AllLEDMask = ~0
 

selects all of the leds

Definition at line 130 of file ERS210Info.h.

Referenced by LedMC::LedMC().

const LEDBitMask_t ERS210Info::BackLEDMask = 0
 

210 has no back LEDs

Definition at line 128 of file ERS210Info.h.

const unsigned ERS210Info::BinJointOffset = LEDOffset + NumLEDs
 

The beginning of the binary joints.

Definition at line 76 of file ERS210Info.h.

Referenced by MMCombo::ReadySendJoints(), MMCombo::SetupOutputs(), and MotionManager::updateWorldState().

const LEDBitMask_t ERS210Info::BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset)
 

bottom left (red - sad)

Definition at line 116 of file ERS210Info.h.

Referenced by LedEngine::displayPercent(), and BanditMachine::WaitNode::DoStart().

const LEDBitMask_t ERS210Info::BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset)
 

bottom right (red - sad)

Definition at line 117 of file ERS210Info.h.

Referenced by LedEngine::displayPercent(), and BanditMachine::WaitNode::DoStart().

const char* const ERS210Info::CameraLocator = "PRM:/r1/c1/c2/c3/i1-FbkImageSensor:F1"
 

use to open camera connection with the system

Definition at line 275 of file ERS210Info.h.

Referenced by Config::setValue().

const int ERS210Info::CPCJointLFElevator = 9 [static]
 

Head.

Definition at line 430 of file ERS210Info.h.

const int ERS210Info::CPCJointLFKnee = 10 [static]
 

Head.

Definition at line 431 of file ERS210Info.h.

const int ERS210Info::CPCJointLFRotator = 8 [static]
 

Left front leg.

Definition at line 429 of file ERS210Info.h.

const int ERS210Info::CPCJointLHElevator = 13 [static]
 

Head.

Definition at line 434 of file ERS210Info.h.

const int ERS210Info::CPCJointLHKnee = 14 [static]
 

Head.

Definition at line 435 of file ERS210Info.h.

const int ERS210Info::CPCJointLHRotator = 12 [static]
 

Left hind leg.

Definition at line 433 of file ERS210Info.h.

const int ERS210Info::CPCJointMouth = 6 [static]
 

Head.

Definition at line 427 of file ERS210Info.h.

const int ERS210Info::CPCJointNeckPan = 1 [static]
 

Head.

Definition at line 422 of file ERS210Info.h.

const int ERS210Info::CPCJointNeckRoll = 2 [static]
 

Head.

Definition at line 423 of file ERS210Info.h.

const int ERS210Info::CPCJointNeckTilt = 0 [static]
 

Head.

Definition at line 421 of file ERS210Info.h.

const int ERS210Info::CPCJointRFElevator = 17 [static]
 

Head.

Definition at line 438 of file ERS210Info.h.

const int ERS210Info::CPCJointRFKnee = 18 [static]
 

Head.

Definition at line 439 of file ERS210Info.h.

const int ERS210Info::CPCJointRFRotator = 16 [static]
 

Right front leg.

Definition at line 437 of file ERS210Info.h.

const int ERS210Info::CPCJointRHElevator = 21 [static]
 

Head.

Definition at line 442 of file ERS210Info.h.

const int ERS210Info::CPCJointRHKnee = 22 [static]
 

Head.

Definition at line 443 of file ERS210Info.h.

const int ERS210Info::CPCJointRHRotator = 20 [static]
 

Right hind leg.

Definition at line 441 of file ERS210Info.h.

const int ERS210Info::CPCJointTailPan = 24 [static]
 

Tail.

Definition at line 445 of file ERS210Info.h.

const int ERS210Info::CPCJointTailTilt = 25 [static]
 

Head.

Definition at line 446 of file ERS210Info.h.

const int ERS210Info::CPCSensorAccelFB = 28 [static]
 

Front-back; see RobotInfo::BAccelOffset.

Definition at line 449 of file ERS210Info.h.

const int ERS210Info::CPCSensorAccelLR = 29 [static]
 

Left-right; see RobotInfo::LAccelOffset.

Definition at line 450 of file ERS210Info.h.

const int ERS210Info::CPCSensorAccelUD = 30 [static]
 

Up-down; see RobotInfo::DAccelOffset.

Definition at line 451 of file ERS210Info.h.

const int ERS210Info::CPCSensorBackSwitch = 27 [static]
 

Head.

Definition at line 448 of file ERS210Info.h.

const int ERS210Info::CPCSensorChinSwitch = 7 [static]
 

Head.

Definition at line 428 of file ERS210Info.h.

const int ERS210Info::CPCSensorHeadBackPressure = 3 [static]
 

Head.

Definition at line 424 of file ERS210Info.h.

const int ERS210Info::CPCSensorHeadFrontPressure = 4 [static]
 

Head.

Definition at line 425 of file ERS210Info.h.

const int ERS210Info::CPCSensorLFPaw = 11 [static]
 

Head.

Definition at line 432 of file ERS210Info.h.

const int ERS210Info::CPCSensorLHPaw = 15 [static]
 

Head.

Definition at line 436 of file ERS210Info.h.

const int ERS210Info::CPCSensorPSD = 5 [static]
 

Head.

Definition at line 426 of file ERS210Info.h.

const int ERS210Info::CPCSensorRFPaw = 19 [static]
 

Head.

Definition at line 440 of file ERS210Info.h.

const int ERS210Info::CPCSensorRHPaw = 23 [static]
 

Head.

Definition at line 444 of file ERS210Info.h.

const int ERS210Info::CPCSensorThermoSensor = 26 [static]
 

Head.

Definition at line 447 of file ERS210Info.h.

const float ERS210Info::DefaultPIDs[NumPIDJoints][3]
 

Initial value:

    {
      { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
      { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
      { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
      { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
      { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
      { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
      { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
      { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
      { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },
      { 0x16/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x08/(double)(1<<(16-0xF)) },
      { 0x14/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x06/(double)(1<<(16-0xF)) },
      { 0x23/(double)(1<<(16-0xE)), 0x04/(double)(1<<(16-0x2)), 0x05/(double)(1<<(16-0xF)) },

      { 0x0A/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0C/(double)(1<<(16-0xF)) },
      { 0x0D/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0B/(double)(1<<(16-0xF)) },
      { 0x0A/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x0C/(double)(1<<(16-0xF)) },

      { 0x0A/(double)(1<<(16-0xE)), 0x00/(double)(1<<(16-0x2)), 0x18/(double)(1<<(16-0xF)) },
      { 0x07/(double)(1<<(16-0xE)), 0x00/(double)(1<<(16-0x2)), 0x11/(double)(1<<(16-0xF)) },

      { 0x0E/(double)(1<<(16-0xE)), 0x08/(double)(1<<(16-0x2)), 0x10/(double)(1<<(16-0xF)) }
    }
This table holds the default PID values for each joint. see PIDMC.

Definition at line 303 of file ERS210Info.h.

Referenced by MotionManager::OutputState::OutputState(), PIDMC::setAllPowerLevel(), PIDMC::setJointPowerLevel(), and PIDMC::setRangePowerLevel().

const unsigned char ERS210Info::DefaultPIDShifts[3] = {0x0E, 0x02, 0x0F}
 

These will control the shift values given to the system. see PIDMC.

Definition at line 329 of file ERS210Info.h.

Referenced by MotionManager::updatePIDs().

const unsigned ERS210Info::EarOffset = BinJointOffset
 

the offset of the beginning of the ear joints - note that ears aren't sensed. They can be flicked by the environment and you won't know. Nor will they be flicked back

Definition at line 77 of file ERS210Info.h.

const LEDBitMask_t ERS210Info::FaceLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask
 

LEDs for face (all but tail).

Definition at line 126 of file ERS210Info.h.

Referenced by BehaviorSwitchActivatorControl::activate(), LedEngine::displayNumber(), LedEngine::displayPercent(), ControlBase::doReadStdIn(), ControlBase::doSelect(), and Controller::DoStart().

const unsigned int ERS210Info::FrameTime = 8
 

time between frames in the motion system (milliseconds)

Definition at line 30 of file ERS210Info.h.

Referenced by HeadPointerMC::defaultMaxSpeed(), StartupBehavior::DoStart(), HeadPointerMC::getMaxSpeed(), BatteryMonitorBehavior::processEvent(), HeadPointerMC::setMaxSpeed(), LedEngine::updateLEDFrames(), LedEngine::updateLEDs(), TailWagMC::updateOutputs(), MotionSequenceMC< MAXMOVE >::updateOutputs(), DynamicMotionSequence::updateOutputs(), and WalkMC::WalkMC().

const LEDBitMask_t ERS210Info::HeadLEDMask = BotLLEDMask|BotRLEDMask|MidLLEDMask|MidRLEDMask|TopLLEDMask|TopRLEDMask|TopBrLEDMask
 

LEDs for face (all but tail).

Definition at line 127 of file ERS210Info.h.

const unsigned ERS210Info::HeadOffset = LegOffset+NumLegJoints
 

the offset of the beginning of the head joints

Definition at line 70 of file ERS210Info.h.

Referenced by HeadPointerMC::convFromBodyRelative(), HeadPointerMC::convToBodyRelative(), HeadLevelBehavior::DoStart(), HeadPointerMC::getOutputCmd(), HeadPointerMC::HeadPointerMC(), WalkToTargetMachine::processEvent(), StareAtBallBehavior::processEvent(), SimpleChaseBallBehavior::processEvent(), HeadLevelBehavior::processEvent(), FollowHeadBehavior::processEvent(), ChaseBallBehavior::processEvent(), WorldState::read(), HeadPointControllerBehavior::runCommand(), and HeadPointerMC::updateOutputs().

const bool ERS210Info::IsFastOutput[NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,false }
 

true for joints which can be updated every 32 ms (all but the ears)

Definition at line 44 of file ERS210Info.h.

Referenced by MMCombo::DoInit().

const bool ERS210Info::IsRealERS210[NumOutputs] = { true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true }
 

we need this so you can tell programmatically which joints are "real" and which are "fake" in compatability mode

Definition at line 46 of file ERS210Info.h.

const unsigned ERS210Info::JointsPerLeg = 3
 

The number of joints per leg.

Definition at line 49 of file ERS210Info.h.

Referenced by WalkMC::init(), WalkMC::resetLegPos(), and WalkMC::updateOutputs().

const unsigned ERS210Info::LEDOffset = PIDJointOffset + NumPIDJoints
 

the offset of LEDs in WorldState::outputs and MotionCommand functions

Definition at line 74 of file ERS210Info.h.

Referenced by PostureEditor::activate(), Controller::deactivate(), LedEngine::displayNumber(), Controller::DoStop(), EmergencyStopMC::EmergencyStopMC(), EmergencyStopMC::freezeJoints(), LedEngine::getSetting(), LedEngine::getValue(), MMCombo::ReadySendJoints(), EmergencyStopMC::releaseJoints(), MMCombo::SetupOutputs(), LedEngine::updateLEDs(), LedMC::updateOutputs(), EmergencyStopMC::updateOutputs(), and MotionManager::updateWorldState().

const unsigned ERS210Info::LegOffset = PIDJointOffset
 

the offset of the beginning of the leg joints

Definition at line 69 of file ERS210Info.h.

Referenced by WalkMC::resetLegPos(), and WalkMC::updateOutputs().

const float ERS210Info::MaxOutputSpeed[NumOutputs]
 

Initial value:

 {
    2.8143434e-03,     
    2.4980025e-03,
    2.8361600e-03,
    2.8143434e-03,
    2.4980025e-03,
    2.8361600e-03,
    2.8143434e-03,
    2.4980025e-03,
    2.8361600e-03,
    2.8143434e-03,
    2.4980025e-03,
    2.8361600e-03,
  
    2.1053034e-03,     
    3.0106930e-03,
    3.0106930e-03,
  
    4.4724062e-03,     
    4.4724062e-03,
  
    4.3742314e-03,     
    
    0,0,0,0,0,0,0,0,0, 
    
    0,0                
  }
These values are Sony's recommended maximum joint velocities, in rad/ms.

a value <= 0 means infinite speed (e.g. LEDs)

These limits are not enforced by the framework. They are simply available for you to use as you see fit. HeadPointerMC is (as of v1.6) the only included MotionCommand to actually use these values.

Definition at line 336 of file ERS210Info.h.

const double ERS210Info::mechanicalLimits[NumOutputs][2]
 

Initial value:

    {
      { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, 
      { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, 
      { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, 
      { RAD(-120),RAD(120) },{ RAD(-14),RAD(92) },{ RAD(-30),RAD(150) }, 

      { RAD(-85),RAD(46) },{ RAD(-92.6),RAD(92.6) },{ RAD(-32),RAD(32) }, 
        
      { RAD(-25),RAD(25) },{ RAD(-25),RAD(25) }, 

      { RAD(-50),RAD(0) }, 

      {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, 
    
      {0,1},{0,1} 
    }
This table holds the mechanical limits of each of the outputs.

Definition at line 394 of file ERS210Info.h.

const LEDBitMask_t ERS210Info::MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset)
 

middle left (green - happy)

Definition at line 118 of file ERS210Info.h.

Referenced by LedEngine::displayPercent(), and BanditMachine::WaitNode::processEvent().

const LEDBitMask_t ERS210Info::MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset)
 

middle right (green - happy)

Definition at line 119 of file ERS210Info.h.

Referenced by LedEngine::displayPercent(), and BanditMachine::WaitNode::processEvent().

const unsigned ERS210Info::MouthOffset = TailOffset+NumTailJoints
 

the offset of the beginning of the mouth joint

Definition at line 72 of file ERS210Info.h.

const unsigned ERS210Info::NumBinJoints = 2
 

The number of binary joints - just the ears.

Definition at line 41 of file ERS210Info.h.

Referenced by MMCombo::ReadySendJoints(), MMCombo::SetupOutputs(), and MotionManager::updateWorldState().

const unsigned ERS210Info::NumButtons = 8
 

the number of buttons that are available, see ButtonOffset_t

Definition at line 56 of file ERS210Info.h.

Referenced by WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), SensorObserverControl::SensorObserverControl(), and WorldState::WorldState().

const unsigned ERS210Info::NumEarJoints = 2
 

The number of joints which control the ears (NOT per ear, is total).

Definition at line 55 of file ERS210Info.h.

const unsigned int ERS210Info::NumFrames = 4
 

the number of frames per buffer (don't forget also double buffered)

Definition at line 31 of file ERS210Info.h.

Referenced by StartupBehavior::DoStart(), MotionManager::getOutputs(), MotionManager::OutputState::OutputState(), BatteryMonitorBehavior::processEvent(), MMCombo::ReadySendJoints(), MotionManager::setOutput(), MMCombo::SetupOutputs(), LedMC::setWeights(), LedEngine::updateLEDFrames(), LedEngine::updateLEDs(), WalkMC::updateOutputs(), TailWagMC::updateOutputs(), MotionSequenceMC< MAXMOVE >::updateOutputs(), HeadPointerMC::updateOutputs(), and DynamicMotionSequence::updateOutputs().

const unsigned ERS210Info::NumHeadJoints = 3
 

The number of joints in the neck.

Definition at line 52 of file ERS210Info.h.

Referenced by HeadPointerMC::getOutputCmd(), HeadPointerMC::HeadPointerMC(), HeadPointerMC::noMaxSpeed(), HeadLevelBehavior::processEvent(), FollowHeadBehavior::processEvent(), HeadPointerMC::setMode(), HeadPointerMC::setWeight(), and HeadPointerMC::updateOutputs().

const unsigned ERS210Info::NumLEDs = 9
 

The number LEDs which can be controlled.

Definition at line 40 of file ERS210Info.h.

Referenced by PostureEditor::activate(), LedEngine::cflash(), LedEngine::clear(), LedEngine::cycle(), Controller::deactivate(), Controller::DoStop(), EmergencyStopMC::EmergencyStopMC(), LedEngine::flash(), EmergencyStopMC::freezeJoints(), MotionManager::getOutputs(), LedEngine::invert(), LedEngine::isDirty(), LedEngine::LedEngine(), MMCombo::ReadySendJoints(), EmergencyStopMC::releaseJoints(), LedEngine::set(), MMCombo::SetupOutputs(), LedMC::setWeights(), LedEngine::updateLEDFrames(), LedEngine::updateLEDs(), LedMC::updateOutputs(), and MotionManager::updateWorldState().

const unsigned ERS210Info::NumLegJoints = JointsPerLeg*NumLegs
 

the TOTAL number of joints on ALL legs

Definition at line 51 of file ERS210Info.h.

Referenced by WalkMC::updateOutputs().

const unsigned ERS210Info::NumLegs = 4
 

The number of legs.

Definition at line 50 of file ERS210Info.h.

Referenced by WalkMC::init(), WalkMC::resetLegPos(), and WalkMC::updateOutputs().

const unsigned ERS210Info::NumMouthJoints = 1
 

the number of joints that control the mouth

Definition at line 54 of file ERS210Info.h.

const unsigned ERS210Info::NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs
 

the total number of outputs

Definition at line 42 of file ERS210Info.h.

Referenced by PostureEngine::avgdiff(), PostureEngine::clear(), MotionSequenceMC< MAXMOVE >::clear(), DynamicMotionSequence::clear(), MotionSequence::compress(), PostureEngine::diff(), MMCombo::DoInit(), EmergencyStopMC::freezeJoints(), PostureEngine::getBinSize(), MotionSequence::getBinSize(), MotionSequence::getOutputIndex(), MotionManager::getOutputs(), PostureEngine::LoadBuffer(), MotionSequence::LoadBuffer(), MotionSequence::makeSafe(), PostureEngine::maxdiff(), MMCombo::MMCombo(), MotionManager::MotionManager(), MMCombo::OpenPrimitives(), MotionSequence::overlayPose(), PostureEditor::PostureEditor(), SensorObserverControl::processEvent(), MMCombo::ReadySendJoints(), EmergencyStopMC::releaseJoints(), MotionSequence::resume(), PostureEngine::SaveBuffer(), MotionSequence::SaveBuffer(), SensorObserverControl::SensorObserverControl(), PostureEngine::setAverage(), PostureEngine::setCombine(), MotionSequence::setNextFrameTime(), MotionManager::setOutput(), PostureEngine::setOverlay(), MotionSequence::setPlayTime(), MotionSequence::setPose(), PostureEngine::setUnderlay(), MMCombo::SetupOutputs(), PostureEngine::takeSnapshot(), EmergencyStopMC::takeSnapshot(), PostureMC::updateOutputs(), MotionSequenceMC< MAXMOVE >::updateOutputs(), DynamicMotionSequence::updateOutputs(), and WorldState::WorldState().

const unsigned ERS210Info::NumPIDJoints = 18
 

The number of joints which use PID motion - everything except ears.

Right now all binary joints are slow, but perhaps this won't always be the case... hence the IsFast/Slow bitmasks to select which type, in order to be more general

Definition at line 39 of file ERS210Info.h.

Referenced by Aibo3DControllerBehavior::DoStart(), EmergencyStopMC::EmergencyStopMC(), MotionManager::getOutputs(), PIDMC::isPID(), PIDMC::PIDMC(), WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), MMCombo::ReadySendJoints(), Aibo3DControllerBehavior::registerData(), RemoteControllerMC::RemoteControllerMC(), SensorObserverControl::SensorObserverControl(), PIDMC::setAllPowerLevel(), MMCombo::SetupOutputs(), RemoteControllerMC::updateOutputs(), PIDMC::updateOutputs(), EmergencyStopMC::updateOutputs(), Aibo3DControllerBehavior::updateRC(), MotionManager::updateWorldState(), and WorldState::WorldState().

const unsigned ERS210Info::NumSensors = 1+3+1+5
 

1 dist, 3 accel, 1 thermo, 5 from power, see SensorOffset_t

Definition at line 57 of file ERS210Info.h.

Referenced by WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), SensorObserverControl::SensorObserverControl(), and WorldState::WorldState().

const unsigned int ERS210Info::NumSlowFrames = 1
 

the number of frames per buffer being sent to ears (double buffered as well)

Definition at line 33 of file ERS210Info.h.

Referenced by MMCombo::ReadySendJoints(), and MMCombo::SetupOutputs().

const unsigned ERS210Info::NumTailJoints = 2
 

The number of joints assigned to the tail.

Definition at line 53 of file ERS210Info.h.

const unsigned ERS210Info::outputNameLen = 9
 

The length of the strings used for each of the outputs in outputNames (doesn't include null term).

Definition at line 181 of file ERS210Info.h.

Referenced by PostureEngine::LoadBuffer().

const char* const ERS210Info::outputNames[NumOutputs]
 

A name of uniform length for referring to joints - handy for posture files, etc.

Definition at line 183 of file ERS210Info.h.

Referenced by PostureEngine::getBinSize(), MotionSequence::getBinSize(), MotionSequence::getOutputIndex(), PostureEngine::LoadBuffer(), PostureEditor::PostureEditor(), PostureEngine::SaveBuffer(), MotionSequence::SaveBuffer(), and SensorObserverControl::SensorObserverControl().

const double ERS210Info::outputRanges[NumOutputs][2]
 

Initial value:

    {
      { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, 
      { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, 
      { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, 
      { RAD(-117),RAD(117) },{ RAD(-11),RAD(89) },{ RAD(-27),RAD(147) }, 

      { RAD(-82),RAD(43) },{ RAD(-89.6),RAD(89.6) },{ RAD(-29),RAD(29) }, 
        
      { RAD(-22),RAD(22) },{ RAD(-22),RAD(22) }, 

      { RAD(-47),RAD(-3) }, 

      {0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}, 
    
      {0,1},{0,1} 
    }
This table holds the software limits of each of the outputs.

Definition at line 375 of file ERS210Info.h.

Referenced by BanditMachine::PressNode::PressNode(), WalkToTargetMachine::processEvent(), StartupBehavior::processEvent(), FollowHeadBehavior::processEvent(), AlanBehavior::processEvent(), and HeadPointControllerBehavior::runCommand().

const unsigned ERS210Info::PIDJointOffset = 0
 

The beginning of the PID Joints.

Definition at line 68 of file ERS210Info.h.

Referenced by MotionManager::getOutputs(), PIDMC::getPID(), PIDMC::isPID(), PIDMC::PIDMC(), WorldStateSerializerBehavior::processEvent(), MMCombo::ReadySendJoints(), SensorObserverControl::SensorObserverControl(), PIDMC::setJointPowerLevel(), PIDMC::setPID(), PIDMC::setRangePowerLevel(), MMCombo::SetupOutputs(), RemoteControllerMC::updateOutputs(), and PIDMC::updateOutputs().

const char* const ERS210Info::PrimitiveName[NumOutputs]
 

Initial value:

 {
    "PRM:/r2/c1-Joint2:j1",       
    "PRM:/r2/c1/c2-Joint2:j2",    
    "PRM:/r2/c1/c2/c3-Joint2:j3", 
    "PRM:/r4/c1-Joint2:j1",       
    "PRM:/r4/c1/c2-Joint2:j2",    
    "PRM:/r4/c1/c2/c3-Joint2:j3", 
    
    "PRM:/r3/c1-Joint2:j1",       
    "PRM:/r3/c1/c2-Joint2:j2",    
    "PRM:/r3/c1/c2/c3-Joint2:j3", 
    "PRM:/r5/c1-Joint2:j1",       
    "PRM:/r5/c1/c2-Joint2:j2",    
    "PRM:/r5/c1/c2/c3-Joint2:j3", 

    "PRM:/r1/c1-Joint2:j1",       
    "PRM:/r1/c1/c2-Joint2:j2",    
    "PRM:/r1/c1/c2/c3-Joint2:j3", 
    
    "PRM:/r6/c2-Joint2:j2",       
    "PRM:/r6/c1-Joint2:j1",       
    
    "PRM:/r1/c1/c2/c3/c4-Joint2:j4", 
    
    "PRM:/r1/c1/c2/c3/l1-LED2:l1", 
    "PRM:/r1/c1/c2/c3/l4-LED2:l4", 
    "PRM:/r1/c1/c2/c3/l2-LED2:l2", 
    "PRM:/r1/c1/c2/c3/l5-LED2:l5", 
    "PRM:/r1/c1/c2/c3/l3-LED2:l3", 
    "PRM:/r1/c1/c2/c3/l6-LED2:l6", 
    "PRM:/r1/c1/c2/c3/l7-LED2:l7", 
    
    "PRM:/r6/l2-LED2:l2", 
    "PRM:/r6/l1-LED2:l1", 
    
    "PRM:/r1/c1/c2/c3/e1-Joint3:j5", 
    "PRM:/r1/c1/c2/c3/e2-Joint3:j6" 
  }
the joint identifier strings used to refer to specific joints in OPEN-R (but not needed for others)

Warning:
IMPORTANT!!!! DO NOT CHANGE THE ORDER OF ITEMS IN THIS TABLE!!!
The offset consts defined in this file correspond to this table and will make life easier if you feel the need to reorder things, but they aren't used perfect everywhere
In particular, assumptions are made that the pid joints will be in slots 0-numPIDJoints and that the fast outputs (ie NOT ears) will be in slots 0-NumFastOutputs
There may be other assumptions not noted here!!!
Note:
These entries DON'T correspond to the CPC index numbers defined in WorldState (this only lists joints, and in a different order defined by OPEN-R, that one has sensors as well

Definition at line 232 of file ERS210Info.h.

Referenced by MMCombo::OpenPrimitives().

const unsigned int ERS210Info::SlowFrameTime = 128
 

time between frames for the ears (which move slower for some reason, don't want to mix with other outputs) (milliseconds)

Definition at line 32 of file ERS210Info.h.

const unsigned int ERS210Info::SoundBufferTime = 32
 

the number of milliseconds per sound buffer... I'm not sure if this can be changed

Definition at line 34 of file ERS210Info.h.

Referenced by SoundPlay::NewSoundVectorData(), and SoundTestBehavior::play().

const char* const ERS210Info::SpeakerLocator = "PRM:/r1/c1/c2/c3/s1-Speaker:S1"
 

use to open speaker connectio with the system

Definition at line 272 of file ERS210Info.h.

Referenced by SoundPlay::OpenSpeaker().

const LEDBitMask_t ERS210Info::TailLEDMask = TlRedLEDMask|TlBluLEDMask
 

LEDs on tail.

Definition at line 129 of file ERS210Info.h.

const unsigned ERS210Info::TailOffset = HeadOffset+NumHeadJoints
 

the offset of the beginning of the tail joints

Definition at line 71 of file ERS210Info.h.

const LEDBitMask_t ERS210Info::TlBluLEDMask = 1<<(TlBluLEDOffset-LEDOffset)
 

blue tail light

Definition at line 124 of file ERS210Info.h.

const LEDBitMask_t ERS210Info::TlRedLEDMask = 1<<(TlRedLEDOffset-LEDOffset)
 

red tail light

Definition at line 123 of file ERS210Info.h.

const LEDBitMask_t ERS210Info::TopBrLEDMask = 1<<(TopBrLEDOffset-LEDOffset)
 

top bar (green)

Definition at line 122 of file ERS210Info.h.

Referenced by LedEngine::displayNumber(), and LedEngine::displayPercent().

const LEDBitMask_t ERS210Info::TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset)
 

top left (red - angry)

Definition at line 120 of file ERS210Info.h.

Referenced by LedEngine::displayPercent().

const LEDBitMask_t ERS210Info::TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset)
 

top right (red - angry)

Definition at line 121 of file ERS210Info.h.

Referenced by LedEngine::displayPercent().


Tekkotsu v2.0
Generated Wed Jan 21 03:23:35 2004 by Doxygen 1.3.4