Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Calliope3Components.h File Reference

#include <cmath>
#include <stdlib.h>
#include "CommonInfo.h"
Include dependency graph for Calliope3Components.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Calliope3Components
 

Contains information about a Calliope robot, such as number of joints, LEDs, etc.


namespace  Calliope3Components::Calliope3

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?

Typedefs

typedef unsigned int Calliope3Components::Calliope3::LEDBitMask_t
 So you can be clear when you're refering to a LED bitmask.

Enumerations

enum  Calliope3Components::Calliope3::TPROffset_t { Calliope3Components::Calliope3::PanOffset = 0, Calliope3Components::Calliope3::TiltOffset, Calliope3Components::Calliope3::NodOffset = TiltOffset }
 

The offsets of appendages with pan (heading), tilt (elevation), note that this should be added to HeadOffset, otherwise use HeadOffset_t (HeadPanOffset and HeadTiltOffset).

More...
enum  Calliope3Components::Calliope3::HeadOffset_t { Calliope3Components::Calliope3::HeadPanOffset = HeadOffset, Calliope3Components::Calliope3::HeadTiltOffset }
 

These are 'absolute' offsets for the neck joints, don't need to add to HeadOffset like TPROffset_t values do.

More...
enum  Calliope3Components::Calliope3::ArmOffset_t { Calliope3Components::Calliope3::ArmBaseOffset = ArmOffset, Calliope3Components::Calliope3::ArmShoulderOffset, Calliope3Components::Calliope3::GripperOffset }
 

These are 'absolute' offsets for the arm joints, don't need to add to ArmOffset like TPROffset_t values do.

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

The offsets of the individual LEDs.

More...

Variables

const unsigned int Calliope3Components::FrameTime = 30
 time between frames in the motion system (milliseconds)
const unsigned int Calliope3Components::NumFrames = 1
 the number of frames per buffer (don't forget also double buffered)
const unsigned int Calliope3Components::SoundBufferTime = 32
 the number of milliseconds per sound buffer... I'm not sure if this can be changed
const float Calliope3Components::wheelDiameter = 72.0
 Create 2 wheel diameter in mm.
const float Calliope3Components::wheelBase = 235.0
 Create 2 wheel base in mm.
const float Calliope3Components::encoderTicksPerRev = 508.8
 Number of encoder ticks per wheel revolution.
const unsigned Calliope3Components::Calliope3::NumHeadJoints = 2
 The number of joints in the pan/tilt.
const unsigned Calliope3Components::Calliope3::HeadOffset = WheelOffset+NumWheels
 the offset of the beginning of the head joints, add TPROffset_t to get specific joint
const unsigned Calliope3Components::Calliope3::FingerJointsPerArm = 1
const unsigned Calliope3Components::Calliope3::JointsPerArm = 3
 2 arm joints plus gripper
const unsigned Calliope3Components::Calliope3::NumArms = 1
const unsigned Calliope3Components::Calliope3::NumArmJoints = JointsPerArm*NumArms
const unsigned Calliope3Components::Calliope3::NumPIDJoints = NumWheels + NumHeadJoints + NumArmJoints
 number of motors and servos
const unsigned Calliope3Components::Calliope3::NumOutputs = NumPIDJoints + NumLEDs + 1
 the total number of outputs
const unsigned Calliope3Components::Calliope3::ArmOffset = HeadOffset+NumHeadJoints
const unsigned Calliope3Components::Calliope3::LEDOffset = ArmOffset+NumArmJoints
const unsigned Calliope3Components::Calliope3::ModeOffset = LEDOffset + NumLEDs
const unsigned Calliope3Components::Calliope3::BaseFrameOffset = NumOutputs
 Use with kinematics to refer to base reference frame.
const unsigned Calliope3Components::Calliope3::GripperFrameOffset = BaseFrameOffset + 1
 Use with kinematics to refer to gripper reference frame.
const unsigned Calliope3Components::Calliope3::CameraFrameOffset = GripperFrameOffset+NumArms
 Use with kinematics to refer to camera reference frame.
const LEDOffset_t Calliope3Components::Calliope3::RedLEDOffset = PowerRedLEDOffset
const LEDOffset_t Calliope3Components::Calliope3::BlueLEDOffset = AdvanceLEDOffset
 Create has no blue LED: use Advance LED here, and Advance+PowerRED in BlueLEDMask.
const LEDOffset_t Calliope3Components::Calliope3::GreenLEDOffset = PlayLEDOffset
const LEDOffset_t Calliope3Components::Calliope3::YellowLEDOffset = AdvanceLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::BlueLEDMask
 Create has no blue LED, so use Advance (green) + Power (red).
const LEDBitMask_t Calliope3Components::Calliope3::GreenLEDMask = 1<<(GreenLEDOffset-LEDOffset)
 mask corresponding to GreenLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::YellowLEDMask = 1<<(YellowLEDOffset-LEDOffset)
 mask corresponding to YellowLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::RedLEDMask = 1<<(RedLEDOffset-LEDOffset)
 mask corresponding to RedLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::PowerRedLEDMask = 1<<(PowerRedLEDOffset-LEDOffset)
 mask corresponding to BlueLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::PowerGreenLEDMask = 1<<(PowerGreenLEDOffset-LEDOffset)
 mask corresponding to GreenLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::PlayLEDMask = 1<<(PlayLEDOffset-LEDOffset)
 mask corresponding to YellowLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::AdvanceLEDMask = 1<<(AdvanceLEDOffset-LEDOffset)
 mask corresponding to RedLEDOffset
const LEDBitMask_t Calliope3Components::Calliope3::FaceLEDMask = 0
 LEDs for the face panel (all FaceLEDPanelMask<<(0:NumFacePanelLEDs-1) entries).
const LEDBitMask_t Calliope3Components::Calliope3::AllLEDMask = (LEDBitMask_t)~0
 selects all of the leds
const float Calliope3Components::Calliope3::DefaultPIDs [NumPIDJoints][3]
 This table holds the default PID values for each joint. see PIDMC.
const float Calliope3Components::Calliope3::MaxOutputSpeed [NumOutputs]
 These values are our recommended maximum joint velocities, in rad/ms.
const float Calliope3Components::Calliope3::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).
Output Types Information

const unsigned Calliope3Components::NumWheels = 2
 The number of joints per leg.
const unsigned Calliope3Components::JointsPerLeg = 0
 The number of joints per leg.
const unsigned Calliope3Components::NumLegs = 0
 The number of legs.
const unsigned Calliope3Components::NumLegJoints = JointsPerLeg*NumLegs
 the TOTAL number of joints on ALL legs
const unsigned Calliope3Components::NumTailJoints = 0
 The number of joints assigned to the tail.
const unsigned Calliope3Components::NumMouthJoints = 0
 the number of joints that control the mouth
const unsigned Calliope3Components::NumEarJoints = 0
 The number of joints which control the ears (NOT per ear, is total).
const unsigned Calliope3Components::NumButtons = 31
 the number of buttons that are available
const unsigned Calliope3Components::NumLEDs = 6
 The number of LEDs which can be controlled.
const unsigned Calliope3Components::NumFacePanelLEDs = 0
 The number of face panel LEDs.
const unsigned Calliope3Components::NumSensors = 36
 the number of sensors available: 33 Create2 + 3 for GPS

Output Offsets

Corresponds to entries in outputNames, defined at the end of this file



enum  Calliope3Components::WheelOffset_t { Calliope3Components::LWheelOffset = WheelOffset, Calliope3Components::RWheelOffset }
 

The beginning of the PID Joints.

More...
const unsigned Calliope3Components::PIDJointOffset = 0
 The beginning of the PID Joints.
const unsigned Calliope3Components::WheelOffset = PIDJointOffset
 The beginning of the PID Joints.
const fmat::Column< 3 > Calliope3Components::AgentBoundingBoxBaseFrameOffset = fmat::pack(838.4/2-304.8/2,0,0)
 Offset needed so that the centroid of the robot is correct related to the bounding box.
const fmat::Column< 3 > Calliope3Components::AgentBoundingBoxHalfDims = fmat::pack(838.4/2, 304.8/2, 0)
 Half of the length, width, and height of the robot.

Input Offsets

The order in which inputs should be stored



enum  Calliope3Components::ButtonOffset_t {
  Calliope3Components::WallButOffset, Calliope3Components::DropLeftWheelButOffset, Calliope3Components::DropRightWheelButOffset, Calliope3Components::BumpLeftButOffset,
  Calliope3Components::BumpRightButOffset, Calliope3Components::CliffLeftButOffset, Calliope3Components::CliffFrontLeftButOffset, Calliope3Components::CliffFrontRightButOffset,
  Calliope3Components::CliffRightButOffset, Calliope3Components::VirtualWallButOffset, Calliope3Components::OvercurrentLeftWheelOffset, Calliope3Components::OvercurrentRightWheelOffset,
  Calliope3Components::OvercurrentMainBrushOffset, Calliope3Components::OvercurrentSideBrushOffset, Calliope3Components::CleanButOffset, Calliope3Components::SpotButOffset,
  Calliope3Components::DockButOffset, Calliope3Components::MinuteButOffset, Calliope3Components::HourButOffset, Calliope3Components::DayButOffset,
  Calliope3Components::ScheduleButOffset, Calliope3Components::ClockButOffset, Calliope3Components::BaseChargerButOffset, Calliope3Components::InternalChargerButOffset,
  Calliope3Components::LtBumpRightOffset, Calliope3Components::LtBumpFrontRightOffset, Calliope3Components::LtBumpCenterRightOffset, Calliope3Components::LtBumpCenterLeftOffset,
  Calliope3Components::LtBumpFrontLeftOffset, Calliope3Components::LtBumpLeftOffset, Calliope3Components::StasisButOffset
}
 

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

More...
enum  Calliope3Components::SensorOffset_t {
  Calliope3Components::WallSignalOffset, Calliope3Components::DirtDetectOffset, Calliope3Components::IRCommOffset, Calliope3Components::IRLeftOffset,
  Calliope3Components::IRRightOffset, Calliope3Components::CliffLeftSignalOffset, Calliope3Components::CliffFrontLeftSignalOffset, Calliope3Components::CliffFrontRightSignalOffset,
  Calliope3Components::CliffRightSignalOffset, Calliope3Components::EncoderDistanceOffset, Calliope3Components::EncoderAngleOffset, Calliope3Components::VoltageOffset,
  Calliope3Components::CurrentOffset, Calliope3Components::BatteryChargeOffset, Calliope3Components::BatteryTempOffset, Calliope3Components::ChargingStateOffset,
  Calliope3Components::ModeStateOffset, Calliope3Components::ReqVelocityOffset, Calliope3Components::ReqRadiusOffset, Calliope3Components::ReqLeftVelocityOffset,
  Calliope3Components::ReqRightVelocityOffset, Calliope3Components::LeftEncoderOffset, Calliope3Components::RightEncoderOffset, Calliope3Components::LtBumpRightSignalOffset,
  Calliope3Components::LtBumpFrontRightSignalOffset, Calliope3Components::LtBumpCenterRightSignalOffset, Calliope3Components::LtBumpCenterLeftSignalOffset, Calliope3Components::LtBumpFrontLeftSignalOffset,
  Calliope3Components::LtBumpLeftSignalOffset, Calliope3Components::LeftMotorCurrentOffset, Calliope3Components::RightMotorCurrentOffset, Calliope3Components::SideBrushCurrentOffset,
  Calliope3Components::MainBrushCurrentOffset, Calliope3Components::GPSXOffset, Calliope3Components::GPSYOffset, Calliope3Components::GPSHeadingOffset
}
 

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

More...
enum  Calliope3Components::IRComm_t {
  Calliope3Components::IR_REMOTE_LEFT = 129, Calliope3Components::IR_REMOTE_FORWARD, Calliope3Components::IR_REMOTE_RIGHT, Calliope3Components::IR_REMOTE_SPOT,
  Calliope3Components::IR_REMOTE_MAX, Calliope3Components::IR_REMOTE_SMALL, Calliope3Components::IR_REMOTE_MEDIUM, Calliope3Components::IR_REMOTE_LARGE,
  Calliope3Components::IR_REMOTE_PAUSE, Calliope3Components::IR_REMOTE_POWER, Calliope3Components::IR_REMOTE_ARC_LEFT, Calliope3Components::IR_REMOTE_ARC_RIGHT,
  Calliope3Components::IR_REMOTE_STOP, Calliope3Components::IR_REMOTE_SEND, Calliope3Components::IR_REMOTE_DOCK, Calliope3Components::IR_BASE_RED = 248,
  Calliope3Components::IR_BASE_GREEN = 244, Calliope3Components::IR_BASE_FORCE = 242, Calliope3Components::IR_BASE_RED_GREEN = 252, Calliope3Components::IR_BASE_RED_FORCE = 250,
  Calliope3Components::IR_BASE_GREEN_FORCE = 246, Calliope3Components::IR_BASE_RED_GREEN_FORCE = 254, Calliope3Components::IR_600_FORCE = 161, Calliope3Components::IR_600_GREEN = 164,
  Calliope3Components::IR_600_GREEN_FORCE, Calliope3Components::IR_600_RED = 168, Calliope3Components::IR_600_RED_FORCE, Calliope3Components::IR_600_RED_GREEN = 172,
  Calliope3Components::IR_600_RED_GREEN_FORCE, Calliope3Components::IR_WALL = 162
}
 

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

More...
enum  Calliope3Components::ChargingState_t {
  Calliope3Components::CHARGING_OFF, Calliope3Components::CHARGING_RECONDITIONING, Calliope3Components::CHARGING_FULL, Calliope3Components::CHARGING_TRICKLE,
  Calliope3Components::CHARGING_WAITING, Calliope3Components::CHARGING_FAULT
}
 

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

More...
enum  Calliope3Components::ModeState_t { Calliope3Components::MODE_OFF, Calliope3Components::MODE_PASSIVE, Calliope3Components::MODE_SAFE, Calliope3Components::MODE_FULL }
 

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

More...
const ButtonOffset_t Calliope3Components::GreenButOffset = CleanButOffset
 holds offsets to different buttons in WorldState::buttons[]
const ButtonOffset_t Calliope3Components::YellowButOffset = SpotButOffset
 holds offsets to different buttons in WorldState::buttons[]
const ButtonOffset_t Calliope3Components::RedButOffset = DockButOffset
 holds offsets to different buttons in WorldState::buttons[]
const char *const Calliope3Components::buttonNames [NumButtons+1]
 Provides a string name for each button.
const char *const Calliope3Components::sensorNames [NumSensors+1]
 Provides a string name for each sensor.

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 40 of file Calliope3Components.h.

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

Just a little macro for converting degrees to radians.

Definition at line 38 of file Calliope3Components.h.


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