Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ERS220Info.h File Reference

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

#include "CommonERSInfo.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.

Classes

class  ERS220Info::ERS220Capabilities
 provides polymorphic robot capability detection/mapping More...

Namespaces

namespace  ERS220Info
 

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


Defines

#define RAD(deg)   (((deg) * (float)M_PI ) / 180.0f)
 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...

Variables

const char *const ERS220Info::TargetName = "ERS-220"
 the name of the model, to be used for logging and remote GUIs
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 fmat::Column< 3 > ERS220Info::AgentBoundingBoxBaseFrameOffset = fmat::pack(0,0,0)
 Offset needed so that the centroid of the robot is correct relative to the bounding box.
const fmat::Column< 3 > ERS220Info::AgentBoundingBoxHalfDims = fmat::pack(304.8/2, 304.8/2, 0)
 Half of the length, width, and height of the robot.
const char *const ERS220Info::outputNames [NumReferenceFrames+1]
 Names for each of the outputs.
const ERS220Capabilities ERS220Info::capabilities
 allocation declared in RobotInfo.cc
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/sec.
const float ERS220Info::outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs.
const float ERS220Info::mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs.
Output Types Information

Corresponds to entries in ERS220Info::PrimitiveName, defined at the end of this file, these are the primary grouping

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::NumWheels = 0
 no wheels, just legs
const unsigned ERS220Info::JointsPerArm = 0
 no arms, just legs
const unsigned ERS220Info::NumArms = 0
 no arms, just legs
const unsigned ERS220Info::NumArmJoints = JointsPerArm*NumArms
 no wheels, just legs
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) (Aperios only).
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::BallOfFootRadius = 27.922f/2
 radius of the ball of the foot
const float ERS220Info::CylinderOfFootRadius = 24.606f/2
 radius of the cylinder of the foot
const bool ERS220Info::IsFastOutput [NumOutputs]
 true for joints which can be updated every 32 ms (true for all)
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

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

Output Offsets

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



enum  ERS220Info::LegOrder_t { ERS220Info::LFrLegOrder = 0, ERS220Info::RFrLegOrder, ERS220Info::LBkLegOrder, ERS220Info::RBkLegOrder }
 

the ordering of legs

More...
enum  ERS220Info::REKOffset_t { ERS220Info::RotatorOffset = 0, ERS220Info::ElevatorOffset, ERS220Info::KneeOffset }
 

The offsets within appendages (the legs) Note that the ordering matches the actual physical ordering of joints on the appendage (and not that of the head's TPROffset_t's).

More...
enum  ERS220Info::TPROffset_t { ERS220Info::TiltOffset = 0, ERS220Info::PanOffset, ERS220Info::RollOffset, ERS220Info::NodOffset = RollOffset }
 

The offsets of appendages with tilt (elevation), pan (heading), and roll or nod joints (i.e. head) Note that the ordering matches the actual physical ordering of joints on the appendage (and not that of the leg's REKOffset_t's).

More...
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::FootFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned ERS220Info::PawFrameOffset = FootFrameOffset
 Aibo-era alias for FootFrameOffset.
const unsigned ERS220Info::CameraFrameOffset = FootFrameOffset+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::HeadButOffset = 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.

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 = FaceLEDMask | RetractableHeadLEDMask
 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

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)

Mad props to Daishi MORI, the 220 master chief, for porting to the 220 ;)

Definition in file ERS220Info.h.


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 537 of file ERS220Info.h.

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

Just a little macro for converting degrees to radians.

Definition at line 535 of file ERS220Info.h.


Tekkotsu v5.1CVS
Generated Mon May 9 04:58:55 2016 by Doxygen 1.6.3