Homepage Demos Overview Downloads Tutorials Reference
Credits

WorldState.cc File Reference


Detailed Description

Implements WorldState, maintains information about the robot's environment, namely sensors and power status.

Author:
ejt (Creator)
Author
ejt
Name
tekkotsu-2_2_2
Revision
1.28
State
Exp
Date
2004/12/22 23:13:02

Definition in file WorldState.cc.

#include <OPENR/core_macro.h>
#include <OPENR/ObjcommTypes.h>
#include <OPENR/OPENR.h>
#include <OPENR/OPENRAPI.h>
#include <OPENR/OPENRMessages.h>
#include <OPENR/OPower.h>
#include "WorldState.h"
#include "Shared/get_time.h"
#include "Events/EventRouter.h"
#include "ERS210Info.h"
#include "ERS220Info.h"
#include "ERS7Info.h"
#include "Shared/Config.h"

Include dependency graph for WorldState.cc:

Go to the source code of this file.

Defines

#define GETD(cpc)   (((float)sensor.GetData(cpc)->frame[lastFrame].value) / 1.0E6f)
 returns value from OPEN-R, converted from micro in int to base in float
#define GETB(cpc)   ((bool)sensor.GetData(cpc)->frame[lastFrame].value)
 returns value from OPEN-R, as bool
#define GETSENSOR(cpc)   ((float)sensor.GetData(cpc)->frame[lastFrame].value)
 return value from OPEN-R, as int
#define GETSIG(cpc)   ((word)sensor.GetData(cpc)->frame[lastFrame].signal)
 returns signal from OPEN-R as word
#define GETDUTY(cpc)   ((float)((OJointValue*)&sensor.GetData(cpc)->frame[lastFrame])->pwmDuty/512.0f)
 returns duty cycle from OPEN-R as float; -1 (full reverse) to 0 (idle) to 1 (full forward)

Variables

WorldStatestate = NULL
 the global state object, is a shared memory region, created by MainObject


Define Documentation

#define GETB cpc   )     ((bool)sensor.GetData(cpc)->frame[lastFrame].value)
 

returns value from OPEN-R, as bool

Definition at line 19 of file WorldState.cc.

Referenced by WorldState::read().

#define GETD cpc   )     (((float)sensor.GetData(cpc)->frame[lastFrame].value) / 1.0E6f)
 

returns value from OPEN-R, converted from micro in int to base in float

Definition at line 18 of file WorldState.cc.

Referenced by WorldState::read().

#define GETDUTY cpc   )     ((float)((OJointValue*)&sensor.GetData(cpc)->frame[lastFrame])->pwmDuty/512.0f)
 

returns duty cycle from OPEN-R as float; -1 (full reverse) to 0 (idle) to 1 (full forward)

Definition at line 22 of file WorldState.cc.

Referenced by WorldState::read().

#define GETSENSOR cpc   )     ((float)sensor.GetData(cpc)->frame[lastFrame].value)
 

return value from OPEN-R, as int

Definition at line 20 of file WorldState.cc.

Referenced by WorldState::read().

#define GETSIG cpc   )     ((word)sensor.GetData(cpc)->frame[lastFrame].signal)
 

returns signal from OPEN-R as word

Definition at line 21 of file WorldState.cc.


Variable Documentation

WorldState* state = NULL
 

the global state object, is a shared memory region, created by MainObject

Definition at line 27 of file WorldState.cc.

Referenced by ProfilerCheckControl::activate(), Wireless::blockingSend(), BatteryMonitorBehavior::calcFlipDelay(), SegmentedColorGenerator::calcImage(), RLEGenerator::calcImage(), RegionGenerator::calcImage(), RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), InterleavedYUVGenerator::calcImage(), CDTGenerator::calcImage(), Kinematics::calculateGroundPlane(), Wireless::close(), Wireless::connect(), OldHeadPointerMC::convFromBodyRelative(), OldHeadPointerMC::convToBodyRelative(), LedEngine::displayNumber(), MMCombo::DoInit(), ToggleHeadLightBehavior::DoStart(), StareAtPawBehavior2::DoStart(), StareAtPawBehavior::DoStart(), MMCombo::DoStart(), HeadLevelBehavior::DoStart(), CameraBehavior::DoStart(), Aibo3DControllerBehavior::DoStart(), EmergencyStopMC::EmergencyStopMC(), EmergencyStopMC::freezeJoints(), MotionManager::getOutputs(), MMCombo::GotAudio(), MMCombo::GotImage(), MMCombo::GotPowerEvent(), MMCombo::GotSensorFrame(), MMCombo::GotWorldState(), GroundPlaneBehavior::GroundPlaneBehavior(), HeadLevelBehavior::HeadLevelBehavior(), HeadPointerMC::HeadPointerMC(), Controller::init(), Wireless::listen(), OldHeadPointerMC::OldHeadPointerMC(), ValueEditControl< T >::pause(), SoundTestBehavior::play(), WorldStateVelDaemon::processEvent(), WorldStateSerializerBehavior::processEvent(), WallTestBehavior::processEvent(), WalkToTargetNode::processEvent(), VisualTargetCloseTrans::processEvent(), ValueEditControl< T >::processEvent(), StareAtPawBehavior::processEvent(), StareAtBallBehavior::processEvent(), SimpleChaseBallBehavior::processEvent(), SensorObserverControl::processEvent(), PostureEditor::processEvent(), LookForSoundBehavior::processEvent(), KinematicSampleBehavior2::processEvent(), HeadLevelBehavior::processEvent(), GroundPlaneBehavior::processEvent(), FollowHeadBehavior::processEvent(), ChaseBallBehavior::processEvent(), BatteryMonitorBehavior::processEvent(), BallDetectionGenerator::processEvent(), AutoGetupBehavior::processEvent(), AlanBehavior::processEvent(), MMCombo::ReadySendJoints(), Wireless::receive(), Wireless::ReceiveCont(), BatteryCheckControl::refresh(), EmergencyStopMC::releaseJoints(), BatteryCheckControl::report(), WalkMC::resetLegPos(), MotionSequenceEngine::resume(), Wireless::send(), BatteryMonitorBehavior::setFlipper(), MotionManager::setPID(), ExploreMachine::setup(), BanditMachine::setup(), WalkCalibration::setupMoving(), BatteryMonitorBehavior::shouldWarn(), SoundTestBehavior::SoundTestBehavior(), BatteryMonitorBehavior::startWarning(), PostureEngine::takeSnapshot(), EmergencyStopMC::takeSnapshot(), WorldStateVelDaemon::trapEvent(), Controller::trapEvent(), EmergencyStopMC::trigger(), Kinematics::update(), TailWagMC::updateOutputs(), OldHeadPointerMC::updateOutputs(), EmergencyStopMC::updateOutputs(), MotionManager::updatePIDs(), and MotionManager::updateWorldState().


Tekkotsu v2.2.2
Generated Tue Jan 4 15:45:18 2005 by Doxygen 1.4.0