Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ERS2xxInfo.h File Reference

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

#include "CommonERSInfo.h"
#include "ERS210Info.h"
#include <iostream>
Include dependency graph for ERS2xxInfo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ERS2xxInfo::ERS2xxCapabilities
 provides polymorphic robot capability detection/mapping More...

Namespaces

namespace  ERS2xxInfo
 

Contains information about the ERS-2xx series of 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  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::TargetName = "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 fmat::Column< 3 > ERS2xxInfo::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 > ERS2xxInfo::AgentBoundingBoxHalfDims = fmat::pack(304.8/2, 304.8/2, 0)
 Half of the length, width, and height of the robot.
const char *const ERS2xxInfo::outputNames [NumReferenceFrames+1]
 Names for each of the outputs.
const ERS2xxCapabilities ERS2xxInfo::capabilities
 allocation declared in RobotInfo.cc
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/sec.
const float ERS2xxInfo::outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs.
const float ERS2xxInfo::mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs.
Output Types Information

Corresponds to entries in ERS2xxInfo::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 ERS2xxInfo::NumWheels = 0
 no wheels, just legs
const unsigned ERS2xxInfo::JointsPerArm = 0
 no arms, just legs
const unsigned ERS2xxInfo::NumArms = 0
 no arms, just legs
const unsigned ERS2xxInfo::NumArmJoints = JointsPerArm*NumArms
 no wheels, just legs
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 (Aperios only).
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::BallOfFootRadius = 27.922f/2
 radius of the ball of the foot
const float ERS2xxInfo::CylinderOfFootRadius = 24.606f/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)

Output Offsets

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



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

the ordering of legs

More...
enum  ERS2xxInfo::REKOffset_t { ERS2xxInfo::RotatorOffset = 0, ERS2xxInfo::ElevatorOffset, ERS2xxInfo::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  ERS2xxInfo::TPROffset_t { ERS2xxInfo::TiltOffset = 0, ERS2xxInfo::PanOffset, ERS2xxInfo::RollOffset, ERS2xxInfo::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  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::FootFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned ERS2xxInfo::PawFrameOffset = FootFrameOffset
 Aibo-era alias for FootFrameOffset.
const unsigned ERS2xxInfo::CameraFrameOffset = FootFrameOffset+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 {
  ERS2xxInfo::LFrPawOffset = LFrLegOrder, ERS2xxInfo::RFrPawOffset = RFrLegOrder, ERS2xxInfo::LBkPawOffset = LBkLegOrder, ERS2xxInfo::RBkPawOffset = RBkLegOrder,
  ERS2xxInfo::ChinButOffset = 4, ERS2xxInfo::BackButOffset, ERS2xxInfo::HeadFrButOffset, ERS2xxInfo::HeadButOffset = HeadFrButOffset,
  ERS2xxInfo::HeadBkButOffset, ERS2xxInfo::TailLeftButOffset, ERS2xxInfo::TailCenterButOffset, ERS2xxInfo::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.

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

Detailed Description

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

Author:
Daishi MORI (Creator)

Definition in file ERS2xxInfo.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 595 of file ERS2xxInfo.h.

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

Just a little macro for converting degrees to radians.

Definition at line 593 of file ERS2xxInfo.h.


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