Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ERS210Info.h File Reference

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

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

Go to the source code of this file.

Classes

class  ERS210Info::ERS210Capabilities
 provides polymorphic robot capability detection/mapping More...

Namespaces

namespace  ERS210Info
 

Contains information about the ERS-210 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  ERS210Info::LEDOffset_t {
  ERS210Info::BotLLEDOffset = LEDOffset, ERS210Info::BotRLEDOffset, ERS210Info::MidLLEDOffset, ERS210Info::MidRLEDOffset,
  ERS210Info::TopLLEDOffset, ERS210Info::TopRLEDOffset, ERS210Info::TopBrLEDOffset, ERS210Info::TlRedLEDOffset,
  ERS210Info::TlBluLEDOffset, ERS210Info::FaceFrontLeftLEDOffset = BotLLEDOffset, ERS210Info::FaceFrontRightLEDOffset = BotRLEDOffset, ERS210Info::FaceCenterLeftLEDOffset = MidLLEDOffset,
  ERS210Info::FaceCenterRightLEDOffset = MidRLEDOffset, ERS210Info::FaceBackLeftLEDOffset = TopLLEDOffset, ERS210Info::FaceBackRightLEDOffset = TopRLEDOffset, ERS210Info::ModeLEDOffset = TopBrLEDOffset,
  ERS210Info::TailRightLEDOffset = TlRedLEDOffset, ERS210Info::TailLeftLEDOffset = TlBluLEDOffset
}
 

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 ERS210Info::TargetName = "ERS-210"
 the name of the model, to be used for logging and remote GUIs
const unsigned int ERS210Info::FrameTime = 8
 time between frames in the motion system (milliseconds)
const unsigned int ERS210Info::NumFrames = 4
 the number of frames per buffer (don't forget also double buffered)
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)
const unsigned int ERS210Info::NumSlowFrames = 1
 the number of frames per buffer being sent to ears (double buffered as well)
const unsigned int ERS210Info::SoundBufferTime = 32
 the number of milliseconds per sound buffer... I'm not sure if this can be changed
const fmat::Column< 3 > ERS210Info::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 > ERS210Info::AgentBoundingBoxHalfDims = fmat::pack(304.8/2, 304.8/2, 0)
 Half of the length, width, and height of the robot.
const char *const ERS210Info::outputNames [NumReferenceFrames+1]
 Names for each of the outputs.
const ERS210Capabilities ERS210Info::capabilities
 allocation declared in RobotInfo.cc
const char *const ERS210Info::PrimitiveName [NumOutputs]
 the joint identifier strings used to refer to specific joints in OPEN-R (but not needed for others)
const char *const ERS210Info::SpeakerLocator = "PRM:/r1/c1/c2/c3/s1-Speaker:S1"
 use to open speaker connectio with the system
const char *const ERS210Info::CameraLocator = "PRM:/r1/c1/c2/c3/i1-FbkImageSensor:F1"
 use to open camera connection with the system
const float ERS210Info::DefaultPIDs [NumPIDJoints][3]
 This table holds the default PID values for each joint. see PIDMC.
const unsigned char ERS210Info::DefaultPIDShifts [3] = {0x0E, 0x02, 0x0F}
 These will control the shift values given to the system. see PIDMC.
const float ERS210Info::MaxOutputSpeed [NumOutputs]
 These values are Sony's recommended maximum joint velocities, in rad/s.
const float ERS210Info::outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs.
const float ERS210Info::mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs.
Output Types Information

Corresponds to entries in ERS210Info::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 ERS210Info::NumWheels = 0
 no wheels, just legs
const unsigned ERS210Info::JointsPerArm = 0
 no arms, just legs
const unsigned ERS210Info::NumArms = 0
 no arms, just legs
const unsigned ERS210Info::NumArmJoints = JointsPerArm*NumArms
 no wheels, just legs
const unsigned ERS210Info::JointsPerLeg = 3
 The number of joints per leg.
const unsigned ERS210Info::NumLegs = 4
 The number of legs.
const unsigned ERS210Info::NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs
const unsigned ERS210Info::NumHeadJoints = 3
 The number of joints in the neck.
const unsigned ERS210Info::NumTailJoints = 2
 The number of joints assigned to the tail.
const unsigned ERS210Info::NumMouthJoints = 1
 the number of joints that control the mouth
const unsigned ERS210Info::NumEarJoints = 2
 The number of joints which control the ears (NOT per ear, is total).
const unsigned ERS210Info::NumButtons = 8
 the number of buttons that are available, see ERS210Info::ButtonOffset_t
const unsigned ERS210Info::NumSensors = 1+3+1+5
 1 dist, 3 accel, 1 thermo, 5 from power, see ERS210Info::SensorOffset_t
const unsigned ERS210Info::NumLEDs = 9
 The number of LEDs which can be controlled.
const unsigned ERS210Info::NumPIDJoints = NumLegJoints+NumHeadJoints+NumTailJoints+NumMouthJoints
 The number of joints which use PID motion - everything except ears.
const unsigned ERS210Info::NumBinJoints = NumEarJoints
 The number of binary joints - just the ears (Aperios only).
const unsigned ERS210Info::NumOutputs = NumPIDJoints + NumBinJoints + NumLEDs
 the total number of outputs
const unsigned ERS210Info::NumReferenceFrames = NumOutputs + 1 + NumLegs + 1 + 1
 for the base, paw, camera, and IR sensor reference frames
const float ERS210Info::BallOfFootRadius = 27.922f/2
 radius of the ball of the foot
const float ERS210Info::CylinderOfFootRadius = 24.606f/2
 radius of the cylinder of the foot
const bool ERS210Info::IsFastOutput [NumOutputs]
 true for joints which can be updated every 32 ms (all but the ears)
CPC IDs

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

const int ERS210Info::CPCJointNeckTilt = 0
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointNeckPan = 1
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointNeckRoll = 2
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorHeadBackPressure = 3
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorHeadFrontPressure = 4
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorPSD = 5
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointMouth = 6
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorChinSwitch = 7
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLFRotator = 8
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLFElevator = 9
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLFKnee = 10
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorLFPaw = 11
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLHRotator = 12
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLHElevator = 13
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointLHKnee = 14
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorLHPaw = 15
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRFRotator = 16
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRFElevator = 17
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRFKnee = 18
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorRFPaw = 19
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRHRotator = 20
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRHElevator = 21
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointRHKnee = 22
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorRHPaw = 23
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointTailPan = 24
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCJointTailTilt = 25
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorThermoSensor = 26
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorBackSwitch = 27
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorAccelFB = 28
 Front-back; see RobotInfo::BAccelOffset.
const int ERS210Info::CPCSensorAccelLR = 29
 Left-right; see RobotInfo::LAccelOffset.
const int ERS210Info::CPCSensorAccelUD = 30
 Up-down; see RobotInfo::DAccelOffset.

Output Offsets

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



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

the ordering of legs

More...
enum  ERS210Info::REKOffset_t { ERS210Info::RotatorOffset = 0, ERS210Info::ElevatorOffset, ERS210Info::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  ERS210Info::TPROffset_t { ERS210Info::TiltOffset = 0, ERS210Info::PanOffset, ERS210Info::RollOffset, ERS210Info::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  ERS210Info::LegOffset_t { ERS210Info::LFrLegOffset = LegOffset+LFrLegOrder*JointsPerLeg, ERS210Info::RFrLegOffset = LegOffset+RFrLegOrder*JointsPerLeg, ERS210Info::LBkLegOffset = LegOffset+LBkLegOrder*JointsPerLeg, ERS210Info::RBkLegOffset = LegOffset+RBkLegOrder*JointsPerLeg }
 

The offsets of the individual legs.

More...
const unsigned ERS210Info::PIDJointOffset = 0
 The beginning of the PID Joints.
const unsigned ERS210Info::LegOffset = PIDJointOffset
 the offset of the beginning of the leg joints
const unsigned ERS210Info::HeadOffset = LegOffset+NumLegJoints
 the offset of the beginning of the head joints
const unsigned ERS210Info::TailOffset = HeadOffset+NumHeadJoints
 the offset of the beginning of the tail joints
const unsigned ERS210Info::MouthOffset = TailOffset+NumTailJoints
 the offset of the beginning of the mouth joint
const unsigned ERS210Info::LEDOffset = PIDJointOffset + NumPIDJoints
 the offset of LEDs in WorldState::outputs and MotionCommand functions
const unsigned ERS210Info::BinJointOffset = LEDOffset + NumLEDs
 The beginning of the binary joints.
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
const unsigned ERS210Info::BaseFrameOffset = NumOutputs
 Use with kinematics to refer to base reference frame.
const unsigned ERS210Info::FootFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to paw reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned ERS210Info::PawFrameOffset = FootFrameOffset
 Aibo-era alias for FootFrameOffset.
const unsigned ERS210Info::CameraFrameOffset = FootFrameOffset+NumLegs
 Use with kinematics to refer to camera reference frame.
const unsigned ERS210Info::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  ERS210Info::ButtonOffset_t {
  ERS210Info::LFrPawOffset = LFrLegOrder, ERS210Info::RFrPawOffset = RFrLegOrder, ERS210Info::LBkPawOffset = LBkLegOrder, ERS210Info::RBkPawOffset = RBkLegOrder,
  ERS210Info::ChinButOffset = 4, ERS210Info::BackButOffset, ERS210Info::HeadFrButOffset, ERS210Info::HeadButOffset = HeadFrButOffset,
  ERS210Info::HeadBkButOffset
}
 

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

More...
enum  ERS210Info::SensorOffset_t {
  ERS210Info::IRDistOffset = 0, ERS210Info::BAccelOffset, ERS210Info::LAccelOffset, ERS210Info::DAccelOffset,
  ERS210Info::ThermoOffset, ERS210Info::PowerRemainOffset, ERS210Info::PowerThermoOffset, ERS210Info::PowerCapacityOffset,
  ERS210Info::PowerVoltageOffset, ERS210Info::PowerCurrentOffset
}
 

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

More...
const char *const ERS210Info::buttonNames [NumButtons]
 Provides a string name for each button.
const char *const ERS210Info::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 ERS210Info::LEDBitMask_t
 So you can be clear when you're refering to a LED bitmask.
const LEDBitMask_t ERS210Info::BotLLEDMask = 1<<(BotLLEDOffset-LEDOffset)
 bottom left (red - sad)
const LEDBitMask_t ERS210Info::BotRLEDMask = 1<<(BotRLEDOffset-LEDOffset)
 bottom right (red - sad)
const LEDBitMask_t ERS210Info::MidLLEDMask = 1<<(MidLLEDOffset-LEDOffset)
 middle left (green - happy)
const LEDBitMask_t ERS210Info::MidRLEDMask = 1<<(MidRLEDOffset-LEDOffset)
 middle right (green - happy)
const LEDBitMask_t ERS210Info::TopLLEDMask = 1<<(TopLLEDOffset-LEDOffset)
 top left (red - angry)
const LEDBitMask_t ERS210Info::TopRLEDMask = 1<<(TopRLEDOffset-LEDOffset)
 top right (red - angry)
const LEDBitMask_t ERS210Info::TopBrLEDMask = 1<<(TopBrLEDOffset-LEDOffset)
 top bar (green)
const LEDBitMask_t ERS210Info::TlRedLEDMask = 1<<(TlRedLEDOffset-LEDOffset)
 red tail light
const LEDBitMask_t ERS210Info::TlBluLEDMask = 1<<(TlBluLEDOffset-LEDOffset)
 blue tail light
const LEDBitMask_t ERS210Info::FaceLEDMask
 LEDs for face (all but tail).
const LEDBitMask_t ERS210Info::HeadLEDMask
 LEDs for face (all but tail).
const LEDBitMask_t ERS210Info::BackLEDMask = 0
 210 has no back LEDs
const LEDBitMask_t ERS210Info::TailLEDMask = TlRedLEDMask|TlBluLEDMask
 LEDs on tail.
const LEDBitMask_t ERS210Info::AllLEDMask = (LEDBitMask_t)~0
 selects all of the leds

Detailed Description

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

Author:
ejt (Creator)

Definition in file ERS210Info.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 453 of file ERS210Info.h.

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

Just a little macro for converting degrees to radians.

Definition at line 451 of file ERS210Info.h.


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