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_1
- Revision
- 1.26
- State
- Exp
- Date
- 2004/11/04 19:45:17
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 |
WorldState * | state = 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) |
|
#define GETD |
( |
cpc |
|
) |
(((float)sensor.GetData(cpc)->frame[lastFrame].value) / 1.0E6f) |
|
#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) |
|
#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
|
the global state object, is a shared memory region, created by MainObject
Definition at line 27 of file WorldState.cc.
Referenced by ProfilerCheckControl::activate(), BatteryMonitorBehavior::calcFlipDelay(), SegmentedColorGenerator::calcImage(), RLEGenerator::calcImage(), RegionGenerator::calcImage(), RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), InterleavedYUVGenerator::calcImage(), CDTGenerator::calcImage(), Kinematics::calculateGroundPlane(), 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(), Socket::getWriteBuffer(), MMCombo::GotAudio(), MMCombo::GotImage(), MMCombo::GotPowerEvent(), MMCombo::GotSensorFrame(), MMCombo::GotWorldState(), GroundPlaneBehavior::GroundPlaneBehavior(), HeadLevelBehavior::HeadLevelBehavior(), HeadPointerMC::HeadPointerMC(), Controller::init(), OldHeadPointerMC::OldHeadPointerMC(), ValueEditControl< T >::pause(), SoundTestBehavior::play(), WorldStateVelDaemon::processEvent(), WorldStateSerializerBehavior::processEvent(), WallTestBehavior::processEvent(), WalkToTargetMachine::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(), BatteryCheckControl::refresh(), EmergencyStopMC::releaseJoints(), BatteryCheckControl::report(), WalkMC::resetLegPos(), MotionSequence::resume(), BatteryMonitorBehavior::setFlipper(), MotionManager::setPID(), ExploreMachine::setup(), BanditMachine::setup(), WalkCalibration::setupMoving(), BatteryMonitorBehavior::shouldWarn(), Socket::Socket(), 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(). |
|