Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ERS2xxInfo.h File Reference


Detailed Description

Defines RobotInfo namespace for ERS-2xx series of robots, such as joint counts, offsets, names and PID values.

Author:
Daishi MORI (Creator)
Author
ejt
Name
Revision
1.22
State
Exp
Date
2007/03/05 01:19:12

Definition in file ERS2xxInfo.h.

#include "CommonERSInfo.h"

Include dependency graph for ERS2xxInfo.h:

Go to the source code of this file.

Namespaces

namespace  ERS2xxInfo

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

Output Offsets

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

enum  ERS2xxInfo::LegOffset_t { ERS2xxInfo::LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, ERS2xxInfo::RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, ERS2xxInfo::LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, ERS2xxInfo::RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg }
 The offsets of the individual legs. More...
const unsigned ERS2xxInfo::PIDJointOffset = 0
 The beginning of the PID Joints.
const unsigned ERS2xxInfo::LegOffset = PIDJointOffset
 the offset of the beginning of the leg joints
const unsigned ERS2xxInfo::HeadOffset = LegOffset+NumLegJoints
 the offset of the beginning of the head joints
const unsigned ERS2xxInfo::TailOffset = HeadOffset+NumHeadJoints
 the offset of the beginning of the tail joints
const unsigned ERS2xxInfo::MouthOffset = TailOffset+NumTailJoints
 the offset of the beginning of the mouth joint
const unsigned ERS2xxInfo::LEDOffset = PIDJointOffset + NumPIDJoints
 the offset of LEDs in WorldState::outputs and MotionCommand functions
const unsigned ERS2xxInfo::BinJointOffset = LEDOffset+NumLEDs
 The beginning of the binary joints.
const unsigned ERS2xxInfo::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
const unsigned ERS2xxInfo::BaseFrameOffset = NumOutputs
 Use with kinematics to refer to base reference frame.
const unsigned ERS2xxInfo::PawFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned ERS2xxInfo::CameraFrameOffset = PawFrameOffset+NumLegs
 Use with kinematics to refer to camera reference frame.
const unsigned ERS2xxInfo::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  ERS2xxInfo::ButtonOffset_t {
  LFrPawOffset = LFrLegOrder, RFrPawOffset = RFrLegOrder, LBkPawOffset = LBkLegOrder, RBkPawOffset = RBkLegOrder,
  ChinButOffset = 4, BackButOffset, ERS2xxInfo::HeadFrButOffset, ERS2xxInfo::HeadButOffset = HeadFrButOffset,
  ERS2xxInfo::HeadBkButOffset, TailLeftButOffset, TailCenterButOffset, TailRightButOffset
}
 holds offsets to different buttons in WorldState::buttons[] More...
enum  ERS2xxInfo::SensorOffset_t {
  ERS2xxInfo::IRDistOffset = 0, ERS2xxInfo::BAccelOffset, ERS2xxInfo::LAccelOffset, ERS2xxInfo::DAccelOffset,
  ERS2xxInfo::ThermoOffset, ERS2xxInfo::PowerRemainOffset, ERS2xxInfo::PowerThermoOffset, ERS2xxInfo::PowerCapacityOffset,
  ERS2xxInfo::PowerVoltageOffset, ERS2xxInfo::PowerCurrentOffset
}
 holds offset to different sensor values in WorldState::sensors[] More...
const char *const ERS2xxInfo::buttonNames [NumButtons]
 Provides a string name for each button.
const char *const ERS2xxInfo::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 ERS2xxInfo::JointsPerLeg = 3
 The number of joints per leg.
const unsigned ERS2xxInfo::NumLegs = 4
 The number of legs.
const unsigned ERS2xxInfo::NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs
const unsigned ERS2xxInfo::NumHeadJoints = 3
 The number of joints in the neck.
const unsigned ERS2xxInfo::NumTailJoints = 2
 The number of joints assigned to the tail.
const unsigned ERS2xxInfo::NumMouthJoints = 1
 the number of joints that control the mouth
const unsigned ERS2xxInfo::NumEarJoints = 2
 The number of joints which control the ears (NOT per ear, is total).
const unsigned ERS2xxInfo::NumButtons = 11
 the number of buttons that are available, see ERS2xxInfo::ButtonOffset_t
const unsigned ERS2xxInfo::NumSensors = 1+3+1+5
 1 dist, 3 accel, 1 thermo, 5 from power, see ERS2xxInfo::SensorOffset_t
const unsigned ERS2xxInfo::NumLEDs = 22
 The number of LEDs which can be controlled.
const unsigned ERS2xxInfo::NumPIDJoints = NumLegJoints+NumHeadJoints+NumTailJoints+NumMouthJoints
 The number of joints which use PID motion - everything except ears.
const unsigned ERS2xxInfo::NumBinJoints = NumEarJoints
 The number of binary joints - just the ears.
const unsigned ERS2xxInfo::NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs
 the total number of outputs
const unsigned ERS2xxInfo::NumReferenceFrames = NumOutputs + 1 + NumLegs + 1 + 1
 for the base, paw, camera, and IR sensor reference frames
const float ERS2xxInfo::CameraHorizFOV = 57.6/180*M_PI
 horizontal field of view (radians)
const float ERS2xxInfo::CameraVertFOV = 47.8/180*M_PI
 vertical field of view (radians)
const float ERS2xxInfo::CameraFOV = CameraHorizFOV
 should be set to maximum of CameraHorizFOV or CameraVertFOV
const unsigned int ERS2xxInfo::CameraResolutionX = 176
 the number of pixels available in the 'full' layer
const unsigned int ERS2xxInfo::CameraResolutionY = 144
 the number of pixels available in the 'full' layer
const float ERS2xxInfo::BallOfFootRadius = 27.922/2
 radius of the ball of the foot
const float ERS2xxInfo::CylinderOfFootRadius = 24.606/2
 radius of the cylinder of the foot
const bool ERS2xxInfo::IsFastOutput [NumOutputs]
 true for joints which can be updated every 32 ms (all but the ears on a 210)
const bool ERS2xxInfo::IsRealERS210 [NumOutputs]
 we need this so you can tell programmatically which joints are "real" and which are "fake" in compatability mode
const bool ERS2xxInfo::IsRealERS220 [NumOutputs]
 we need this so you can tell programmatically which joints are "real" and which are "fake" in compatability mode

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  ERS2xxInfo::LEDOffset_t {
  ERS2xxInfo::FaceFrontLeftLEDOffset = LEDOffset, ERS2xxInfo::FaceFrontRightLEDOffset, ERS2xxInfo::FaceCenterLeftLEDOffset, ERS2xxInfo::FaceCenterRightLEDOffset,
  ERS2xxInfo::FaceBackLeftLEDOffset, ERS2xxInfo::FaceBackRightLEDOffset, ERS2xxInfo::ModeLEDOffset, ERS2xxInfo::BackLeft1LEDOffset,
  ERS2xxInfo::BackLeft2LEDOffset, ERS2xxInfo::BackLeft3LEDOffset, ERS2xxInfo::BackRight3LEDOffset, ERS2xxInfo::BackRight2LEDOffset,
  ERS2xxInfo::BackRight1LEDOffset, ERS2xxInfo::TailLeftLEDOffset, ERS2xxInfo::TailCenterLEDOffset, ERS2xxInfo::TailRightLEDOffset,
  ERS2xxInfo::FaceFrontBLEDOffset, ERS2xxInfo::FaceFrontALEDOffset, ERS2xxInfo::FaceFrontCLEDOffset, ERS2xxInfo::RetractableHeadLEDOffset,
  ERS2xxInfo::TlBluLEDOffset, ERS2xxInfo::TlRedLEDOffset, ERS2xxInfo::BotLLEDOffset = FaceFrontLeftLEDOffset, ERS2xxInfo::BotRLEDOffset = FaceFrontRightLEDOffset,
  ERS2xxInfo::MidLLEDOffset = FaceCenterLeftLEDOffset, ERS2xxInfo::MidRLEDOffset = FaceCenterRightLEDOffset, ERS2xxInfo::TopLLEDOffset = FaceBackLeftLEDOffset, ERS2xxInfo::TopRLEDOffset = FaceBackRightLEDOffset,
  ERS2xxInfo::TopBrLEDOffset = ModeLEDOffset
}
 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...

Variables

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


Tekkotsu v3.0
Generated Fri May 11 20:05:08 2007 by Doxygen 1.4.7