Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

WorldState.cc File Reference

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

#include "WorldState.h"
#include "Shared/RobotInfo.h"
#include "IPC/ProcessID.h"
#include <vector>
#include "Shared/get_time.h"
#include "Events/EventRouter.h"
#include "Events/EventBase.h"
#include "ERS210Info.h"
#include "ERS220Info.h"
#include "ERS7Info.h"
#include "Shared/Config.h"
#include "local/DataSource.h"
Include dependency graph for WorldState.cc:
This graph shows which files directly or indirectly include this file:

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)   (((OJointValue*)(void*)&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

WorldStateLookup state
 the global state object, points into a shared memory region, created by MainObject

Detailed Description

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

Author:
ejt (Creator)

Definition in file WorldState.cc.


Define Documentation

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

returns value from OPEN-R, as bool

Definition at line 24 of file WorldState.cc.

#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 23 of file WorldState.cc.

#define GETDUTY ( cpc   )     (((OJointValue*)(void*)&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 27 of file WorldState.cc.

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

return value from OPEN-R, as int

Definition at line 25 of file WorldState.cc.

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

returns signal from OPEN-R as word

Definition at line 26 of file WorldState.cc.


Variable Documentation

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

Definition at line 35 of file WorldState.cc.

Referenced by Wireless::blockingSend(), BatteryMonitorBehavior::calcFlipDelay(), Kinematics::calculateGroundPlane(), Wireless::connect(), ArmController::connect(), MotionManager::convertMotion(), Kodu::Parser::KodeCreator::createGrabKode(), WorldStateSerializerBehavior::doEvent(), RecordMotionNode::doEvent(), FlashIPAddrBehavior::doEvent(), BatteryMonitorBehavior::doEvent(), ArmController::doEvent(), Grasper::Verify::CheckGripperLoad::doStart(), DeadReckoningBehavior< ParticleT >::doStart(), EmergencyStopMC::freezeJoints(), CreateOdometry::getCreateOdometry(), WorldState::getCurrent(), ArmMC::getGripperLoad(), MotionManager::getOutputs(), ArmMC::incrementGrasp(), PostureMC::isAlive(), HeadPointerMC::isAlive(), ArmMC::isAlive(), Wireless::listen(), ArmController::pointPicked(), Wireless::pollProcess(), Wireless::pollSetup(), RecordMotionNode::preStart(), TorqueCalibrate::TakeMeasurementControl::processEvent(), SensorObserverControl::processEvent(), PostureEditor::processEvent(), PostureEditor::refresh(), Wireless::send(), CameraStreamBehavior::sendSensors(), EventProxy::sendState(), BatteryMonitorBehavior::setFlipper(), ArmMC::setOutputCmd(), MotionManager::setPID(), WalkCalibration::setupMoving(), BatteryMonitorBehavior::shouldWarn(), XWalkMC::start(), BatteryMonitorBehavior::startWarning(), SineMC::sync(), HeadPointerMC::takeSnapshot(), ArmMC::takeSnapshot(), Controller::trapEvent(), Kinematics::update(), XWalkMC::updateOutputs(), EmergencyStopMC::updateOutputs(), XWalkMC::updateOutputsInitial(), MotionManager::updatePIDs(), SensorObserverControl::updateRT(), and LogNode::writeSensor().


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