Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <WorldState.h>
Definition at line 100 of file WorldState.h.
Public Member Functions | |
WorldState () | |
constructor - sets everything to zeros | |
void | read (OSensorFrameVectorData &sensor, EventRouter *er) |
will process a sensor reading as given by OPEN-R | |
void | read (const OPowerStatus &power, EventRouter *er) |
will process a power status update as given by OPEN-R | |
Public Attributes | |
bool | alwaysGenerateStatus |
controls whether status events are generated for the boolean buttons | |
float | outputs [NumOutputs] |
last sensed positions of joints, for ears, x<.5 is up, x>=.5 is down | |
float | buttons [NumButtons] |
magnitude is pressure for some, 0/1 for others | |
float | sensors [NumSensors] |
IR, Accel, Thermo, Power stuff. | |
float | pids [NumPIDJoints][3] |
current PID settings | |
float | pidduties [NumPIDJoints] |
duty cycles - -1 means the motor is trying to move full power in negative direction, 1 means full power in positive direction, in practice, these values stay rather small - 0.15 is significant force. | |
float | vel_x |
the current, egocentric rate of forward travel | |
float | vel_y |
the current, egocentric rate of sideways (leftward is positive) travel | |
float | vel_a |
the current, egocentric rate of rotational (counterclockwise is positive) travel | |
unsigned int | vel_time |
the time at which we began moving along the current velocity vector | |
unsigned int | robotStatus |
bitmask, see OPENR/OPower.h | |
unsigned int | batteryStatus |
bitmask, see OPENR/OPower.h | |
unsigned int | powerFlags [PowerSourceID::NumPowerSIDs] |
bitmasks of similarly-grouped items from previous two masks, corresponds to the PowerSourceID_t's | |
unsigned int | button_times [NumButtons] |
value is time of current press, 0 if not down | |
unsigned int | lastSensorUpdateTime |
primarily so calcDers can determine the time difference between updates, but others might want to know this too... | |
ProfilerOfSize< 20 > | mainProfile |
holds code profiling information for MainObject | |
ProfilerOfSize< 06 > | motionProfile |
holds code profiling information for MotionObject | |
unsigned int | robotDesign |
bitmask corresponding to OPENR::GetRobotDesign() | |
Static Public Attributes | |
const double | g = 9.80665 |
the gravitational acceleration of objects on earth | |
const double | IROORDist = 900.0 |
If IR returns this, we're out of range. | |
const unsigned int | ERS210Mask = 1<<0 |
use this to test for ERS210 features | |
const unsigned int | ERS220Mask = 1<<1 |
use this to test for ERS220 features | |
const unsigned int | ERS7Mask = 1<<2 |
use this to test for ERS220 features | |
Protected Member Functions | |
void | chkEvent (EventRouter *er, unsigned int off, float newval, const char *name) |
Tests to see if the button status has changed and post events as needed. | |
void | chkPowerEvent (unsigned int sid, unsigned int cur, unsigned int mask, const char *name, std::string actname[PowerSourceID::NumPowerSIDs], std::string dename[PowerSourceID::NumPowerSIDs], unsigned int summask[PowerSourceID::NumPowerSIDs]) |
sets the names of the flags that will be generating events | |
void | calcDers (double next, double &cur, double &vel, double &acc, double invtimediff) |
given the next value, calculates and stores the next current, the velocity, and the acceleration | |
Protected Attributes | |
unsigned int | curtime |
set by read(OSensorFrameVectorData& sensor, EventRouter* er) for chkEvent() so each call doesn't have to | |
Private Member Functions | |
WorldState (const WorldState &) | |
don't use | |
WorldState | operator= (const WorldState &) |
don't use |
|
constructor - sets everything to zeros
Definition at line 28 of file WorldState.cc. |
|
don't use
|
|
given the next value, calculates and stores the next current, the velocity, and the acceleration
Definition at line 174 of file WorldState.h. |
|
Tests to see if the button status has changed and post events as needed.
Definition at line 362 of file WorldState.cc. Referenced by read(). |
|
sets the names of the flags that will be generating events note that this function does not actually do the event posting Definition at line 157 of file WorldState.h. Referenced by read(). |
|
don't use
|
|
will process a power status update as given by OPEN-R This will cause events to be posted Definition at line 287 of file WorldState.cc. |
|
will process a sensor reading as given by OPEN-R This will cause events to be posted
Definition at line 71 of file WorldState.cc. Referenced by MMCombo::DoStart(), MMCombo::GotPowerEvent(), and MMCombo::GotSensorFrame(). |
|
controls whether status events are generated for the boolean buttons
Definition at line 105 of file WorldState.h. Referenced by chkEvent(). |
|
bitmask, see OPENR/OPower.h
Definition at line 119 of file WorldState.h. |
|
value is time of current press, 0 if not down
Definition at line 122 of file WorldState.h. Referenced by chkEvent(), EmergencyStopMC::trigger(), and WorldState(). |
|
magnitude is pressure for some, 0/1 for others
Definition at line 108 of file WorldState.h. Referenced by chkEvent(), SoundTestBehavior::play(), WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), AlanBehavior::processEvent(), Controller::trapEvent(), and WorldState(). |
|
set by read(OSensorFrameVectorData& sensor, EventRouter* er) for chkEvent() so each call doesn't have to
Definition at line 150 of file WorldState.h. Referenced by chkEvent(), and read(). |
|
|
|
|
the gravitational acceleration of objects on earth
Definition at line 23 of file WorldState.cc. Referenced by AutoGetupBehavior::processEvent(). |
|
If IR returns this, we're out of range.
Definition at line 24 of file WorldState.cc. |
|
primarily so calcDers can determine the time difference between updates, but others might want to know this too...
Definition at line 124 of file WorldState.h. Referenced by WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), and read(). |
|
holds code profiling information for MainObject
Definition at line 129 of file WorldState.h. Referenced by ProfilerCheckControl::activate(), SegmentedColorGenerator::calcImage(), RLEGenerator::calcImage(), RegionGenerator::calcImage(), RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), InterleavedYUVGenerator::calcImage(), CDTGenerator::calcImage(), MMCombo::GotImage(), MMCombo::GotPowerEvent(), MMCombo::GotSensorFrame(), BallDetectionGenerator::processEvent(), and MMCombo::ReadySendJoints(). |
|
holds code profiling information for MotionObject
Definition at line 130 of file WorldState.h. Referenced by ProfilerCheckControl::activate(), and MMCombo::ReadySendJoints(). |
|
|
duty cycles - -1 means the motor is trying to move full power in negative direction, 1 means full power in positive direction, in practice, these values stay rather small - 0.15 is significant force.
Definition at line 111 of file WorldState.h. Referenced by WorldStateSerializerBehavior::processEvent(), SensorObserverControl::processEvent(), read(), BanditMachine::setup(), EmergencyStopMC::updateOutputs(), and WorldState(). |
|
current PID settings
Definition at line 110 of file WorldState.h. Referenced by MotionManager::getOutputs(), WorldStateSerializerBehavior::processEvent(), MotionManager::setPID(), MotionManager::updatePIDs(), and WorldState(). |
|
bitmasks of similarly-grouped items from previous two masks, corresponds to the PowerSourceID_t's
Definition at line 120 of file WorldState.h. Referenced by chkPowerEvent(), MMCombo::GotPowerEvent(), read(), BatteryCheckControl::report(), BatteryMonitorBehavior::shouldWarn(), and WorldState(). |
|
|
bitmask, see OPENR/OPower.h
Definition at line 118 of file WorldState.h. |
|
|
the current, egocentric rate of rotational (counterclockwise is positive) travel
Definition at line 115 of file WorldState.h. Referenced by WalkCalibration::setupMoving(), and WorldStateVelDaemon::trapEvent(). |
|
the time at which we began moving along the current velocity vector
Definition at line 116 of file WorldState.h. Referenced by WorldStateVelDaemon::processEvent(), and WorldStateVelDaemon::trapEvent(). |
|
the current, egocentric rate of forward travel
Definition at line 113 of file WorldState.h. Referenced by WalkCalibration::setupMoving(), and WorldStateVelDaemon::trapEvent(). |
|
the current, egocentric rate of sideways (leftward is positive) travel
Definition at line 114 of file WorldState.h. Referenced by WalkCalibration::setupMoving(), and WorldStateVelDaemon::trapEvent(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:34 2004 by Doxygen 1.3.4 |