Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MantisLegInfo Namespace Reference

Contains information about an Mantis Leg robot, such as number of joints, LEDs, etc. More...

Classes

class  MantisLegCapabilities
 provides polymorphic robot capability detection/mapping More...

Enumerations

enum  ServoParam_t { DYNAMIXEL_SLOPE = 0, DYNAMIXEL_PUNCH, DYNAMIXEL_MARGIN }
 

offsets into DefaultPIDs, since Dynamixel servos don't actually use PID control, but a different set of parameters

More...

Variables

const char *const TargetName = "MantisLeg"
 the name of the model, to be used for logging and remote GUIs
const unsigned int FrameTime = 32
 time between frames in the motion system (milliseconds)
const unsigned int NumFrames = 1
 the number of frames per buffer (don't forget also double buffered)
const unsigned int SoundBufferTime = 32
 the number of milliseconds per sound buffer... I'm not sure if this can be changed
const fmat::Column< 3 > AgentBoundingBoxBaseFrameOffset = fmat::pack(400,70,350)
 Offset needed so that the centroid of the robot is correct related to the bounding box.
const fmat::Column< 3 > AgentBoundingBoxHalfDims = fmat::pack(100,100,100)
 Half of the length, width, and height of the robot.
const char *const outputNames [NumReferenceFrames+1]
 Names for each of the outputs.
const MantisLegCapabilities capabilities
 allocation declared in RobotInfo.cc
const float DefaultPIDs [NumPIDJoints][3]
 Dynamixel servos don't use PID control. Instead, these values indicate compliance slope (P), punch (add to P*error), compliance margin (min error to start applying torque) (see ServoParam_t).
const float MaxOutputSpeed [NumOutputs]
 These values are our recommended maximum joint velocities, in rad/ms.
const float outputRanges [NumOutputs][2]
 This table holds the software limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange).
const float mechanicalLimits [NumOutputs][2]
 This table holds the mechanical limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange).
Output Types Information

const unsigned NumWheels = 0
 The number of joints per leg.
const unsigned JointsPerArm = 0
 The number of joints per leg.
const unsigned NumArms = 0
 The number of joints per leg.
const unsigned NumArmJoints = JointsPerArm*NumArms
 The number of joints per leg.
const unsigned JointsPerLeg = 4
 The number of joints per leg.
const unsigned NumLegs = 1
 The number of legs.
const unsigned NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs
const unsigned NumHeadJoints = 0
 The number of joints in the pantilt.
const unsigned NumTailJoints = 0
 The number of joints assigned to the tail.
const unsigned NumMouthJoints = 0
 the number of joints that control the mouth
const unsigned NumEarJoints = 0
 The number of joints which control the ears (NOT per ear, is total).
const unsigned NumButtons = 3
 the number of buttons that are available
const unsigned NumSensors = 11
 the number of sensors available
const unsigned NumFacePanelLEDs = 0
 The number of face panel LEDs.
const unsigned NumPIDJoints = NumArmJoints + NumLegJoints + NumHeadJoints + NumTailJoints + NumMouthJoints
 servo pins
const unsigned NumLEDs = NumPIDJoints
 There's an LED on every dynamixel, but can't see most of them, so save some computational resources and only expose the visible ones.
const unsigned NumOutputs = NumWheels + NumPIDJoints + NumLEDs
 the total number of outputs
const unsigned NumReferenceFrames = NumOutputs + NumLegs + NumArms + 1
 for the base, feet, gripper, camera, and IR distance rangefinder
const float BallOfFootRadius = 0
 radius of the ball of the foot

Output Offsets

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



enum  LegOrder_t { MdLegOrder = 0 }
 

the ordering of legs

More...
enum  SEKOffset_t { SweepOffset = 0, ElevatorOffset, RotorOffset, KneeOffset }
 

The offsets within appendages (the legs) Note that the ordering matches the actual physical ordering of joints on the appendage.

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

The offsets of appendages with tilt (elevation), pan (heading), and roll or nod joints (i.e. head/wrist).

More...
enum  LegOffset_t { MdLegOffset = LegOffset+MdLegOrder*JointsPerLeg }
 

The offsets of the individual legs, add REKOffset_t value to access specific joint.

More...
enum  LEDOffset_t { PowerRedLEDOffset = LEDOffset, PowerGreenLEDOffset, PlayLEDOffset, AdvanceLEDOffset }
 

The offsets of the individual LEDs.

More...
typedef unsigned int LEDBitMask_t
 So you can be clear when you're refering to a LED bitmask.
const unsigned PIDJointOffset = 0
 The beginning of the PID Joints.
const unsigned LegOffset = PIDJointOffset
 the offset of the beginning of the regular leg joints (after the 1 rotator joint for the right front leg): NumLegs of JointsPerLeg each, in LegOrder_t order; see LegOffset_t
const unsigned LEDOffset = PIDJointOffset + NumPIDJoints
 the offset of LEDs in WorldState::outputs and MotionCommand functions, see LedOffset_t for specific offsets
const unsigned BaseFrameOffset = NumOutputs
 Use with kinematics to refer to base reference frame.
const unsigned FootFrameOffset = BaseFrameOffset+1
 Use with kinematics to refer to feet reference frames (add appropriate LegOrder_t to specify which paw).
const unsigned GripperFrameOffset = FootFrameOffset+NumLegs
 Use with kinematics to refer to gripper reference frame.
const unsigned CameraFrameOffset = GripperFrameOffset+NumArms
 Use with kinematics to refer to camera reference frame.
const unsigned LeftIRFrameOffset = CameraFrameOffset+1
 Use with kinematics to refer to left IR distance rangefinder reference frame.
const unsigned CenterIRFrameOffset = LeftIRFrameOffset+1
 Use with kinematics to refer to center IR distance rangefinder reference frame.
const unsigned IRFrameOffset = CenterIRFrameOffset
 alias for CenterIRFrameOffset
const unsigned RightIRFrameOffset = CenterIRFrameOffset+1
 Use with kinematics to refer to right IR distance rangefinder reference frame.
const LEDOffset_t RedLEDOffset = PowerRedLEDOffset
 the ordering of legs
const LEDOffset_t BlueLEDOffset = AdvanceLEDOffset
 the ordering of legs
const LEDOffset_t GreenLEDOffset = PlayLEDOffset
 the ordering of legs
const LEDOffset_t YellowLEDOffset = AdvanceLEDOffset
 the ordering of legs
const LEDBitMask_t BlueLEDMask = (1<<(AdvanceLEDOffset-LEDOffset)) | (1<<(PowerRedLEDOffset-LEDOffset))
 the ordering of legs
const LEDBitMask_t GreenLEDMask = 1<<(GreenLEDOffset-LEDOffset)
 mask corresponding to GreenLEDOffset
const LEDBitMask_t YellowLEDMask = 1<<(YellowLEDOffset-LEDOffset)
 mask corresponding to YellowLEDOffset
const LEDBitMask_t RedLEDMask = 1<<(RedLEDOffset-LEDOffset)
 mask corresponding to RedLEDOffset
const LEDBitMask_t PowerRedLEDMask = 1<<(PowerRedLEDOffset-LEDOffset)
 mask corresponding to BlueLEDOffset
const LEDBitMask_t PowerGreenLEDMask = 1<<(PowerGreenLEDOffset-LEDOffset)
 mask corresponding to GreenLEDOffset
const LEDBitMask_t PlayLEDMask = 1<<(PlayLEDOffset-LEDOffset)
 mask corresponding to YellowLEDOffset
const LEDBitMask_t AdvanceLEDMask = 1<<(AdvanceLEDOffset-LEDOffset)
 mask corresponding to RedLEDOffset
const LEDBitMask_t FaceLEDMask = 0
 LEDs for the face panel (all FaceLEDPanelMask<<(0:NumFacePanelLEDs-1) entries).
const LEDBitMask_t AllLEDMask = (LEDBitMask_t)~0
 selects all of the leds

Input Offsets

The order in which inputs should be stored



enum  ButtonOffset_t { GreenButOffset, RedButOffset, YellowButOffset }
 

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

More...
enum  SensorOffset_t {
  LeftIRDistOffset, CenterIRDistOffset, IRDistOffset = CenterIRDistOffset, RightIRDistOffset,
  LeftLuminosityOffset, CenterLuminosityOffset, RightLuminosityOffset, MicVolumeOffset,
  MicSpikeCountOffset, PowerRemainOffset, PowerThermoOffset, PowerVoltageOffset
}
 

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

More...
const char *const buttonNames [NumButtons+1] = { "GreenBut", "RedBut", "YellowBut", NULL }
 Provides a string name for each button.
const char *const sensorNames [NumSensors+1]
 Provides a string name for each sensor.

Detailed Description

Contains information about an Mantis Leg robot, such as number of joints, LEDs, etc.


Typedef Documentation

typedef unsigned int MantisLegInfo::LEDBitMask_t

So you can be clear when you're refering to a LED bitmask.

Definition at line 124 of file MantisLegInfo.h.


Enumeration Type Documentation

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

Should be a straight mapping to the ButtonSourceIDs

Note that the chest (power) button is not a normal button. It kills power to the motors at a hardware level, and isn't sensed in the normal way. If you want to know when it is pressed (and you are about to shut down) see PowerSrcID::PauseSID.

See also:
WorldState::buttons
ButtonSourceID_t
Enumerator:
GreenButOffset 
RedButOffset 
YellowButOffset 

Definition at line 169 of file MantisLegInfo.h.

The offsets of the individual LEDs.

Enumerator:
PowerRedLEDOffset 
PowerGreenLEDOffset 
PlayLEDOffset 
AdvanceLEDOffset 

Definition at line 111 of file MantisLegInfo.h.

The offsets of the individual legs, add REKOffset_t value to access specific joint.

Enumerator:
MdLegOffset 

beginning of right front leg's joints

Definition at line 105 of file MantisLegInfo.h.

the ordering of legs

Enumerator:
MdLegOrder 

middle leg

Definition at line 83 of file MantisLegInfo.h.

The offsets within appendages (the legs) Note that the ordering matches the actual physical ordering of joints on the appendage.

Enumerator:
SweepOffset 

moves leg forward or backward along body

ElevatorOffset 

moves leg toward or away from body

RotorOffset 

rotates leg

KneeOffset 

moves knee

Definition at line 88 of file MantisLegInfo.h.

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

See also:
WorldState::sensors[]
Enumerator:
LeftIRDistOffset 
CenterIRDistOffset 
IRDistOffset 
RightIRDistOffset 
LeftLuminosityOffset 
CenterLuminosityOffset 
RightLuminosityOffset 
MicVolumeOffset 
MicSpikeCountOffset 
PowerRemainOffset 
PowerThermoOffset 

estimate of power capacity as percentage, 0-1

degrees Celcius

PowerVoltageOffset 

volts

Definition at line 176 of file MantisLegInfo.h.

offsets into DefaultPIDs, since Dynamixel servos don't actually use PID control, but a different set of parameters

Enumerator:
DYNAMIXEL_SLOPE 

compliance slope, the proportional control (P in PID)

DYNAMIXEL_PUNCH 

punch, a constant added to the slope once error exceeds compliance margin

DYNAMIXEL_MARGIN 

compliance margin, the amount of error to tolerate before triggering a torque response

Definition at line 234 of file MantisLegInfo.h.

The offsets of appendages with tilt (elevation), pan (heading), and roll or nod joints (i.e. head/wrist).

Enumerator:
PanOffset 

pan/yaw/heading (horizontal)

TiltOffset 

tilt/pitch/elevation (vertical)

NodOffset 

replicated tilt (could be left undefined instead...)

RollOffset 

spin/twist final axis

Definition at line 96 of file MantisLegInfo.h.


Variable Documentation

const LEDBitMask_t MantisLegInfo::AdvanceLEDMask = 1<<(AdvanceLEDOffset-LEDOffset)

mask corresponding to RedLEDOffset

Definition at line 134 of file MantisLegInfo.h.

Offset needed so that the centroid of the robot is correct related to the bounding box.

Definition at line 144 of file MantisLegInfo.h.

const fmat::Column<3> MantisLegInfo::AgentBoundingBoxHalfDims = fmat::pack(100,100,100)

Half of the length, width, and height of the robot.

Definition at line 147 of file MantisLegInfo.h.

selects all of the leds

Definition at line 139 of file MantisLegInfo.h.

radius of the ball of the foot

Definition at line 58 of file MantisLegInfo.h.

Use with kinematics to refer to base reference frame.

Definition at line 71 of file MantisLegInfo.h.

const LEDBitMask_t MantisLegInfo::BlueLEDMask = (1<<(AdvanceLEDOffset-LEDOffset)) | (1<<(PowerRedLEDOffset-LEDOffset))

the ordering of legs

Definition at line 126 of file MantisLegInfo.h.

const LEDOffset_t MantisLegInfo::BlueLEDOffset = AdvanceLEDOffset

the ordering of legs

Definition at line 120 of file MantisLegInfo.h.

const char* const MantisLegInfo::buttonNames[NumButtons+1] = { "GreenBut", "RedBut", "YellowBut", NULL }

Provides a string name for each button.

Definition at line 172 of file MantisLegInfo.h.

Use with kinematics to refer to camera reference frame.

Definition at line 74 of file MantisLegInfo.h.

allocation declared in RobotInfo.cc

Definition at line 171 of file RobotInfo.cc.

Use with kinematics to refer to center IR distance rangefinder reference frame.

Definition at line 77 of file MantisLegInfo.h.

Initial value:
 {
    {32,32,0},{32,32,0},
        {32,32,0},{32,32,0}
  }

Dynamixel servos don't use PID control. Instead, these values indicate compliance slope (P), punch (add to P*error), compliance margin (min error to start applying torque) (see ServoParam_t).

I believe the torque calculation goes something like: torque = (error<compliance) ? 0 : punch + P*error Dynamixel servos allow different values to be supplied for CW vs. CCW motion, but we just use the same value for each

Definition at line 243 of file MantisLegInfo.h.

LEDs for the face panel (all FaceLEDPanelMask<<(0:NumFacePanelLEDs-1) entries).

Definition at line 137 of file MantisLegInfo.h.

Use with kinematics to refer to feet reference frames (add appropriate LegOrder_t to specify which paw).

Definition at line 72 of file MantisLegInfo.h.

const unsigned int MantisLegInfo::FrameTime = 32

time between frames in the motion system (milliseconds)

Definition at line 27 of file MantisLegInfo.h.

mask corresponding to GreenLEDOffset

Definition at line 127 of file MantisLegInfo.h.

the ordering of legs

Definition at line 121 of file MantisLegInfo.h.

Use with kinematics to refer to gripper reference frame.

Definition at line 73 of file MantisLegInfo.h.

alias for CenterIRFrameOffset

Definition at line 78 of file MantisLegInfo.h.

Referenced by MantisLegInfo::MantisLegCapabilities::MantisLegCapabilities().

const unsigned MantisLegInfo::JointsPerArm = 0

The number of joints per leg.

Definition at line 34 of file MantisLegInfo.h.

const unsigned MantisLegInfo::JointsPerLeg = 4

The number of joints per leg.

Definition at line 38 of file MantisLegInfo.h.

the offset of LEDs in WorldState::outputs and MotionCommand functions, see LedOffset_t for specific offsets

Definition at line 70 of file MantisLegInfo.h.

Use with kinematics to refer to left IR distance rangefinder reference frame.

Definition at line 76 of file MantisLegInfo.h.

the offset of the beginning of the regular leg joints (after the 1 rotator joint for the right front leg): NumLegs of JointsPerLeg each, in LegOrder_t order; see LegOffset_t

Definition at line 69 of file MantisLegInfo.h.

Initial value:
 {
    
    0.4f, 0.4f, 0.4f, 0.4f, 
    
    0,0,0,0 
  }

These values are our recommended maximum joint velocities, in rad/ms.

a value <= 0 means infinite speed (e.g. LEDs)

These limits are not enforced by the framework. They are simply available for you to use as you see fit. HeadPointerMC and PostureMC are primary examples of included classes which do respect these values (although they can be overridden)

These values were obtained from the administrators of the Sony OPEN-R BBS

Definition at line 255 of file MantisLegInfo.h.

Initial value:
 {
    
    {RAD(-100),RAD(100)}, 
        {RAD(-100),RAD(100)},
    {RAD(-100),RAD(100)},
        {RAD(-100),RAD(100)},
    
    {0,1},{0,1},
        {0,1},{0,1},
  }

This table holds the mechanical limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange).

Same as outputRanges, don't know actual values because they were never specified by Sony

Definition at line 284 of file MantisLegInfo.h.

The number of joints per leg.

Definition at line 36 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumArms = 0

The number of joints per leg.

Definition at line 35 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumButtons = 3

the number of buttons that are available

Definition at line 46 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumEarJoints = 0

The number of joints which control the ears (NOT per ear, is total).

Definition at line 45 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumFacePanelLEDs = 0

The number of face panel LEDs.

Definition at line 48 of file MantisLegInfo.h.

const unsigned int MantisLegInfo::NumFrames = 1

the number of frames per buffer (don't forget also double buffered)

Definition at line 28 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumHeadJoints = 0

The number of joints in the pantilt.

Definition at line 42 of file MantisLegInfo.h.

There's an LED on every dynamixel, but can't see most of them, so save some computational resources and only expose the visible ones.

Definition at line 51 of file MantisLegInfo.h.

the TOTAL number of joints on ALL legs

Definition at line 40 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumLegs = 1

The number of legs.

Definition at line 39 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumMouthJoints = 0

the number of joints that control the mouth

Definition at line 44 of file MantisLegInfo.h.

the total number of outputs

Definition at line 53 of file MantisLegInfo.h.

servo pins

Definition at line 50 of file MantisLegInfo.h.

for the base, feet, gripper, camera, and IR distance rangefinder

Definition at line 54 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumSensors = 11

the number of sensors available

Definition at line 47 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumTailJoints = 0

The number of joints assigned to the tail.

Definition at line 43 of file MantisLegInfo.h.

const unsigned MantisLegInfo::NumWheels = 0

The number of joints per leg.

Definition at line 32 of file MantisLegInfo.h.

Initial value:
 {
    
    "sweep","elevator","rotor","knee",
    
        
    "LED:sweep","LED:elevator",
    "LED:rotor","LED:knee",
        
        
        "BaseFrame", "FootFrame",
      
    NULL
  }

Names for each of the outputs.

Definition at line 203 of file MantisLegInfo.h.

Initial value:
 {
    
    {RAD(-100),RAD(100)}, 
        {RAD(-100),RAD(100)},
    {RAD(-100),RAD(100)},
        {RAD(-100),RAD(100)},   
    
        
    {0,1},{0,1},
        {0,1},{0,1},
  }

This table holds the software limits of each of the outputs, first index is the output offset, second index is MinMaxRange_t (i.e. MinRange or MaxRange).

Definition at line 270 of file MantisLegInfo.h.

const unsigned MantisLegInfo::PIDJointOffset = 0

The beginning of the PID Joints.

Definition at line 68 of file MantisLegInfo.h.

mask corresponding to YellowLEDOffset

Definition at line 133 of file MantisLegInfo.h.

const LEDBitMask_t MantisLegInfo::PowerGreenLEDMask = 1<<(PowerGreenLEDOffset-LEDOffset)

mask corresponding to GreenLEDOffset

Definition at line 132 of file MantisLegInfo.h.

const LEDBitMask_t MantisLegInfo::PowerRedLEDMask = 1<<(PowerRedLEDOffset-LEDOffset)

mask corresponding to BlueLEDOffset

Definition at line 131 of file MantisLegInfo.h.

mask corresponding to RedLEDOffset

Definition at line 129 of file MantisLegInfo.h.

const LEDOffset_t MantisLegInfo::RedLEDOffset = PowerRedLEDOffset

the ordering of legs

Definition at line 119 of file MantisLegInfo.h.

Use with kinematics to refer to right IR distance rangefinder reference frame.

Definition at line 79 of file MantisLegInfo.h.

const char* const MantisLegInfo::sensorNames[NumSensors+1]
Initial value:
 {
    "LeftIRDist", "CenterIRDist", "RightIRDist",
    "LeftLuminosity", "CenterLuminosity", "RightLuminosity",
    "MicVolume", "MicSpikeCount",
    "PowerRemain", "PowerThermo", "PowerVoltage", NULL
  }

Provides a string name for each sensor.

Definition at line 192 of file MantisLegInfo.h.

const unsigned int MantisLegInfo::SoundBufferTime = 32

the number of milliseconds per sound buffer... I'm not sure if this can be changed

Definition at line 29 of file MantisLegInfo.h.

const char *const MantisLegInfo::TargetName = "MantisLeg"

the name of the model, to be used for logging and remote GUIs

Definition at line 170 of file RobotInfo.cc.

mask corresponding to YellowLEDOffset

Definition at line 128 of file MantisLegInfo.h.

const LEDOffset_t MantisLegInfo::YellowLEDOffset = AdvanceLEDOffset

the ordering of legs

Definition at line 122 of file MantisLegInfo.h.


Tekkotsu v5.1CVS
Generated Mon May 9 04:59:24 2016 by Doxygen 1.6.3