Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ERS220Info.h File Reference


Detailed Description

Defines RobotInfo namespace for ERS-220 models, gives some information about the robot's capabilities, such as joint counts, offsets, names and PID values.

Author:
Daishi MORI (Creator)
Author
ejt
Name
tekkotsu-2_4_1
Revision
1.21
State
Exp
Date
2005/06/01 05:47:48

Definition in file ERS220Info.h.

#include <math.h>
#include <Types.h>
#include "CommonInfo.h"

Include dependency graph for ERS220Info.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ERS220Info

LED Bitmasks

Bitmasks for use when specifying combinations of LEDs (see LedEngine ) Note that left/right are robot's point of view

typedef unsigned int ERS220Info::LEDBitMask_t
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceFrontLeftLEDMask = 1<<(FaceFrontLeftLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceFrontRightLEDMask = 1<<(FaceFrontRightLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceCenterLeftLEDMask = 1<<(FaceCenterLeftLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceCenterRightLEDMask = 1<<(FaceCenterRightLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceBackLeftLEDMask = 1<<(FaceBackLeftLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceBackRightLEDMask = 1<<(FaceBackRightLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::ModeLEDMask = 1<<(ModeLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackLeft1LEDMask = 1<<(BackLeft1LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackLeft2LEDMask = 1<<(BackLeft2LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackLeft3LEDMask = 1<<(BackLeft3LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackRight3LEDMask = 1<<(BackRight3LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackRight2LEDMask = 1<<(BackRight2LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BackRight1LEDMask = 1<<(BackRight1LEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::TailLeftLEDMask = 1<<(TailLeftLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::TailCenterLEDMask = 1<<(TailCenterLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::TailRightLEDMask = 1<<(TailRightLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceFrontBLEDMask = 1<<(FaceFrontBLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceFrontALEDMask = 1<<(FaceFrontALEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::FaceFrontCLEDMask = 1<<(FaceFrontCLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::RetractableHeadLEDMask = 1<<(RetractableHeadLEDOffset-LEDOffset)
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS220Info::BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset)
 bottom left (red - sad)
const LEDBitMask_t ERS220Info::BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset)
 bottom right (red - sad)
const LEDBitMask_t ERS220Info::MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset)
 middle left (green - happy)
const LEDBitMask_t ERS220Info::MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset)
 middle right (green - happy)
const LEDBitMask_t ERS220Info::TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset)
 top left (red - angry)
const LEDBitMask_t ERS220Info::TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset)
 top right (red - angry)
const LEDBitMask_t ERS220Info::TopBrLEDMask = 1<<(TopBrLEDOffset-LEDOffset)
 top bar (green)
const LEDBitMask_t ERS220Info::TlRedLEDMask = 1<<(TlRedLEDOffset-LEDOffset)
 red tail light
const LEDBitMask_t ERS220Info::TlBluLEDMask = 1<<(TlBluLEDOffset-LEDOffset)
 blue tail light
const LEDBitMask_t ERS220Info::FaceLEDMask
 LEDs for face.
const LEDBitMask_t ERS220Info::HeadLEDMask
 LEDs on head (face plus retractable light).
const LEDBitMask_t ERS220Info::BackLEDMask
 LEDs on back.
const LEDBitMask_t ERS220Info::TailLEDMask
 LEDs for tail.
const LEDBitMask_t ERS220Info::AllLEDMask = (LEDBitMask_t)~0
 selects all of the leds

Output Offsets

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

enum  ERS220Info::LegOffset_t { ERS220Info::LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, ERS220Info::RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, ERS220Info::LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, ERS220Info::RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg }
 The offsets of the individual legs. More...
const unsigned ERS220Info::PIDJointOffset = 0
 The beginning of the PID Joints.
const unsigned ERS220Info::LegOffset = PIDJointOffset
 the offset of the beginning of the leg joints
const unsigned ERS220Info::HeadOffset = LegOffset+NumLegJoints
 the offset of the beginning of the head joints
const unsigned ERS220Info::LEDOffset = PIDJointOffset + NumPIDJoints
 the offset of LEDs in WorldState::outputs and MotionCommand functions
const unsigned ERS220Info::BinJointOffset = NumOutputs
 The beginning of the binary joints.
const unsigned ERS220Info::BaseFrameOffset = NumOutputs
 Use with kinematics to refer to base reference frame.
const unsigned ERS220Info::PawFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned ERS220Info::CameraFrameOffset = PawFrameOffset+NumLegs
 Use with kinematics to refer to camera reference frame.
const unsigned ERS220Info::IRFrameOffset = CameraFrameOffset+1
 Use with kinematics to refer to infrared (distance) sensor reference frame.

Input Offsets

The order in which inputs should be stored

enum  ERS220Info::ButtonOffset_t {
  ERS220Info::LFrPawOffset = LFrLegOrder, ERS220Info::RFrPawOffset = RFrLegOrder, ERS220Info::LBkPawOffset = LBkLegOrder, ERS220Info::RBkPawOffset = RBkLegOrder,
  ERS220Info::ChinButOffset = 4, ERS220Info::BackButOffset, ERS220Info::HeadFrButOffset, ERS220Info::HeadBkButOffset,
  ERS220Info::TailLeftButOffset, ERS220Info::TailCenterButOffset, ERS220Info::TailRightButOffset
}
 holds offsets to different buttons in WorldState::buttons[] More...
enum  ERS220Info::SensorOffset_t {
  ERS220Info::IRDistOffset = 0, ERS220Info::BAccelOffset, ERS220Info::LAccelOffset, ERS220Info::DAccelOffset,
  ERS220Info::ThermoOffset, ERS220Info::PowerRemainOffset, ERS220Info::PowerThermoOffset, ERS220Info::PowerCapacityOffset,
  ERS220Info::PowerVoltageOffset, ERS220Info::PowerCurrentOffset
}
 holds offset to different sensor values in WorldState::sensors[] More...
const char *const ERS220Info::buttonNames [NumButtons]
 Provides a string name for each button.
const char *const ERS220Info::sensorNames [NumSensors]
 Provides a string name for each sensor.

Output Types Information

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

const unsigned ERS220Info::JointsPerLeg = 3
 The number of joints per leg.
const unsigned ERS220Info::NumLegs = 4
 The number of legs.
const unsigned ERS220Info::NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs
const unsigned ERS220Info::NumHeadJoints = 3
 The number of joints in the neck.
const unsigned ERS220Info::NumTailJoints = 0
 The number of joints assigned to the tail.
const unsigned ERS220Info::NumMouthJoints = 0
 the number of joints that control the mouth
const unsigned ERS220Info::NumEarJoints = 0
 The number of joints which control the ears (NOT per ear, is total).
const unsigned ERS220Info::NumButtons = 11
 the number of buttons that are available, see ERS220Info::ButtonOffset_t
const unsigned ERS220Info::NumSensors = 1+3+1+5
 1 dist, 3 accel, 1 thermo, 5 from power, see ERS220Info::SensorOffset_t
const unsigned ERS220Info::NumLEDs = 20
 The number of LEDs which can be controlled.
const unsigned ERS220Info::NumPIDJoints = NumLegJoints+NumHeadJoints+NumTailJoints+NumMouthJoints
 The number of joints which use PID motion - everything.
const unsigned ERS220Info::NumBinJoints = NumEarJoints
 The number of binary joints - just the ears (which the 220 doesn't have).
const unsigned ERS220Info::NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs
 the total number of outputs
const unsigned ERS220Info::NumReferenceFrames = NumOutputs + 1 + NumLegs + 1 + 1
 for the base, paw, camera, and IR sensor reference frames
const float ERS220Info::CameraHorizFOV = 57.6/180*M_PI
 horizontal field of view (radians)
const float ERS220Info::CameraVertFOV = 47.8/180*M_PI
 vertical field of view (radians)
const float ERS220Info::CameraFOV = CameraHorizFOV
 should be set to maximum of CameraHorizFOV or CameraVertFOV
const unsigned int ERS220Info::CameraResolutionX = 176
 the number of pixels available in the 'full' layer
const unsigned int ERS220Info::CameraResolutionY = 144
 the number of pixels available in the 'full' layer
const bool ERS220Info::IsFastOutput [NumOutputs]
 true for joints which can be updated every 32 ms (all but the ears on a 210)
const bool ERS220Info::IsRealERS220 [NumOutputs]
 we need this so you can tell programmatically which joints are "real" and which are "fake" in ERS-2xx target mode true for joints which can be updated every 32 ms (all but the ears on a 210)

CPC IDs

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

static const int ERS220Info::CPCJointNeckTilt = 0
static const int ERS220Info::CPCJointNeckPan = 1
static const int ERS220Info::CPCJointNeckRoll = 2
static const int ERS220Info::CPCSensorPSD = 3
static const int ERS220Info::CPCSensorHeadBackPressure = 4
static const int ERS220Info::CPCSensorHeadFrontPressure = 5
static const int ERS220Info::CPCSensorChinSwitch = 6
static const int ERS220Info::CPCJointLFRotator = 7
static const int ERS220Info::CPCJointLFElevator = 8
static const int ERS220Info::CPCJointLFKnee = 9
static const int ERS220Info::CPCSensorLFPaw = 10
static const int ERS220Info::CPCJointLHRotator = 11
static const int ERS220Info::CPCJointLHElevator = 12
static const int ERS220Info::CPCJointLHKnee = 13
static const int ERS220Info::CPCSensorLHPaw = 14
static const int ERS220Info::CPCJointRFRotator = 15
static const int ERS220Info::CPCJointRFElevator = 16
static const int ERS220Info::CPCJointRFKnee = 17
static const int ERS220Info::CPCSensorRFPaw = 18
static const int ERS220Info::CPCJointRHRotator = 19
static const int ERS220Info::CPCJointRHElevator = 20
static const int ERS220Info::CPCJointRHKnee = 21
static const int ERS220Info::CPCSensorRHPaw = 22
static const int ERS220Info::CPCSensorThermoSensor = 23
static const int ERS220Info::CPCSensorBackSwitch = 24
static const int ERS220Info::CPCSensorTailLeftSwitch = 25
static const int ERS220Info::CPCSensorTailCenterSwitch = 26
static const int ERS220Info::CPCSensorTailRightSwitch = 27
static const int ERS220Info::CPCSensorAccelFB = 28
static const int ERS220Info::CPCSensorAccelLR = 29
static const int ERS220Info::CPCSensorAccelUD = 30

Defines

#define RAD(deg)   (((deg) * M_PI ) / 180.0)
 Just a little macro for converting degrees to radians.
#define __RI_RAD_FLAG
 a flag so we undef these after we're done - do you have a cleaner solution?

Enumerations

enum  ERS220Info::LEDOffset_t {
  ERS220Info::FaceFrontLeftLEDOffset = LEDOffset, ERS220Info::FaceFrontRightLEDOffset, ERS220Info::FaceCenterLeftLEDOffset, ERS220Info::FaceCenterRightLEDOffset,
  ERS220Info::FaceBackLeftLEDOffset, ERS220Info::FaceBackRightLEDOffset, ERS220Info::ModeLEDOffset, ERS220Info::BackLeft1LEDOffset,
  ERS220Info::BackLeft2LEDOffset, ERS220Info::BackLeft3LEDOffset, ERS220Info::BackRight3LEDOffset, ERS220Info::BackRight2LEDOffset,
  ERS220Info::BackRight1LEDOffset, ERS220Info::TailLeftLEDOffset, ERS220Info::TailCenterLEDOffset, ERS220Info::TailRightLEDOffset,
  ERS220Info::FaceFrontBLEDOffset, ERS220Info::FaceFrontALEDOffset, ERS220Info::FaceFrontCLEDOffset, ERS220Info::RetractableHeadLEDOffset,
  ERS220Info::BotLLEDOffset = FaceFrontLeftLEDOffset, ERS220Info::BotRLEDOffset = FaceFrontRightLEDOffset, ERS220Info::MidLLEDOffset = FaceCenterLeftLEDOffset, ERS220Info::MidRLEDOffset = FaceCenterRightLEDOffset,
  ERS220Info::TopLLEDOffset = FaceBackLeftLEDOffset, ERS220Info::TopRLEDOffset = FaceBackRightLEDOffset, ERS220Info::TopBrLEDOffset = ModeLEDOffset, ERS220Info::TlBluLEDOffset = TailLeftLEDOffset,
  ERS220Info::TlRedLEDOffset = TailRightLEDOffset
}
 The offsets of the individual LEDs on the head and tail. Note that left/right are robot's point of view. See also LEDBitMask_t. More...
enum  ERS220Info::MinMaxRange_t { ERS220Info::MinRange, ERS220Info::MaxRange }
 Defines the indexes to use to access the min and max entries of ERSInfo::outputRanges and ERS7Info::mechanicalLimits. More...

Variables

const unsigned int ERS220Info::FrameTime = 8
 time between frames in the motion system (milliseconds)
const unsigned int ERS220Info::NumFrames = 4
 the number of frames per buffer (don't forget also double buffered)
const unsigned int ERS220Info::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 ERS220Info::NumSlowFrames = 1
 the number of frames per buffer being sent to ears (double buffered as well)
const unsigned int ERS220Info::SoundBufferTime = 32
 the number of milliseconds per sound buffer... I'm not sure if this can be changed
const unsigned ERS220Info::outputNameLen = 9
 The length of the strings used for each of the outputs in outputNames (doesn't include null term).
const char *const ERS220Info::outputNames [NumOutputs]
 A name of uniform length for referring to joints - handy for posture files, etc.
const char *const ERS220Info::PrimitiveName [NumOutputs]
 the joint identifier strings used to refer to specific joints in OPEN-R (but not needed for others)
const char *const ERS220Info::SpeakerLocator = "PRM:/r1/c1/c2/c3/s1-Speaker:S1"
 use to open speaker connectio with the system
const char *const ERS220Info::CameraLocator = "PRM:/r1/c1/c2/c3/i1-FbkImageSensor:F1"
 use to open camera connection with the system
const float ERS220Info::DefaultPIDs [NumPIDJoints][3]
 This table holds the default PID values for each joint. see PIDMC.
const unsigned char ERS220Info::DefaultPIDShifts [3] = {0x0E, 0x02, 0x0F}
 These will control the shift values given to the system. see PIDMC.
const float ERS220Info::MaxOutputSpeed [NumOutputs]
 These values are Sony's recommended maximum joint velocities, in rad/ms.
const double ERS220Info::outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs.
const double ERS220Info::mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs.


Define Documentation

#define __RI_RAD_FLAG
 

a flag so we undef these after we're done - do you have a cleaner solution?

Definition at line 497 of file ERS220Info.h.

#define RAD deg   )     (((deg) * M_PI ) / 180.0)
 

Just a little macro for converting degrees to radians.

Definition at line 495 of file ERS220Info.h.


Tekkotsu v2.4.1
Generated Tue Aug 16 16:33:12 2005 by Doxygen 1.4.4