Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
WorldState Class ReferenceThe state of the robot and its environment. More...
Detailed DescriptionThe state of the robot and its environment. Contains sensor readings, current joint positions, etc. Notable members are:
Generally you will use enumerated values from a robot-specific namespace to index into these arrays. Each of those members' documentation specifies where to find the list of indices to use with them. This is a shared memory region between Main, Motion, and possibly others in the future. Be very careful about including structures that use pointers in this class... they will only be valid from the OObject that created them, others may cause a crash if they try to access them. WorldState takes power and sensor updates from the system and maintains the last known values in its member fields. It throws events when some of these values change, listed in the SensorSourceID, PowerSourceID namespaces, and the ButtonOffset_t enumeration for your robot model's info namespace. (e.g. ERS7Info::ButtonOffset_t) Status events for buttons only generated if the WorldState::alwaysGenerateStatus flag is turned on. Otherwise, by default, they are only generated when a value has changed. (i.e. when the pressure sensitive buttons get a new pressure reading) Definition at line 127 of file WorldState.h.
Constructor & Destructor Documentation
constructor - sets everything to zeros Definition at line 38 of file WorldState.cc.
this shouldn't be called... Member Function Documentation
Apply calibration to the sensors and joint positions (reversing motion calibration parameters). Definition at line 462 of file WorldState.cc.
given the next value, calculates and stores the next current, the velocity, and the acceleration
Definition at line 206 of file WorldState.h.
Tests to see if the button status has changed and post events as needed. Definition at line 439 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, unlike chkEvent() Definition at line 189 of file WorldState.h.
returns the current WorldState instance for the running process, needed if your code may be in a shared memory region; otherwise you can directly access state Generally you can access state directly, but if your code is running as a member of an object in a shared memory region, this handles the shared object context switching problem on Aperios, and simply returns state on non-Aperios. Definition at line 248 of file WorldState.h. Referenced by MotionSequenceEngine::resume(), MotionSequenceEngine::setNextFrameTime(), MotionSequenceEngine::setTime(), PostureEngine::takeSnapshot(), and EmergencyStopMC::trigger().
this shouldn't be called...
processes incoming sensor data, generating events for buttons Definition at line 379 of file WorldState.cc. Member Data Documentationcontrols whether status events are generated for the boolean buttons Definition at line 132 of file WorldState.h. Referenced by chkEvent().
bitmask, see OPENR/OPower.h Definition at line 146 of file WorldState.h.
value is time of current press, 0 if not down Definition at line 149 of file WorldState.h. Referenced by chkEvent(), read(), EmergencyStopMC::trigger(), and WorldState().
magnitude is pressure for some, 0/1 for others; indexes are defined in the ButtonOffset_t of the target model's namespace (e.g. ERS7Info::ButtonOffset_t) Definition at line 135 of file WorldState.h. Referenced by chkEvent(), PostureEngine::getBinSize(), read(), PostureEngine::saveBuffer(), EmergencyStopMC::trigger(), and WorldState().
set by read(OSensorFrameVectorData& sensor, EventRouter* er) for chkEvent() so each call doesn't have to Definition at line 178 of file WorldState.h. Referenced by chkEvent(), and read().
the serial number of the currently available frame Definition at line 152 of file WorldState.h. Referenced by PostureEngine::getBinSize(), read(), and PostureEngine::saveBuffer().
the number of sensor updates which have been processed Definition at line 153 of file WorldState.h. Referenced by read().
the gravitational acceleration of objects on earth Definition at line 155 of file WorldState.h.
If IR returns this, we're out of range. Definition at line 156 of file WorldState.h.
primarily so calcDers can determine the time difference between updates, but others might want to know this too... Definition at line 151 of file WorldState.h. Referenced by PostureEngine::getBinSize(), read(), and PostureEngine::saveBuffer().
last sensed positions of joints, last commanded value of LEDs; indexes (aka offsets) are defined in the target model's namespace (e.g. "Output Offsets" section of ERS7Info) Definition at line 134 of file WorldState.h. Referenced by applyCalibration(), read(), MotionSequenceEngine::resume(), MotionSequenceEngine::setNextFrameTime(), MotionSequenceEngine::setTime(), PostureEngine::takeSnapshot(), and WorldState().
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. (same ordering as the outputs); note this is only valid for PID joints, has NumPIDJoint entries (as opposed to NumOutputs) Definition at line 138 of file WorldState.h. Referenced by PostureEngine::getBinSize(), PostureEngine::saveBuffer(), and WorldState().
current PID settings (same ordering as the outputs), not sensed -- updated by MotionManager whenever it sends a PID setting to the system; note this is only valid for PID joints, has NumPIDJoint entries (as opposed to NumOutputs) Definition at line 137 of file WorldState.h. Referenced by WorldState().
bitmasks of similarly-grouped items from previous two masks, corresponds to the PowerSrcID::PowerSourceID_t's Definition at line 147 of file WorldState.h. Referenced by chkPowerEvent(), and WorldState().
bitmask, see OPENR/OPower.h Definition at line 145 of file WorldState.h.
IR, Accel, Thermo, Power stuff; indexes are defined in SensorOffset_t of the target model's namespace (e.g. ERS7Info::SensorOffset_t). Definition at line 136 of file WorldState.h. Referenced by PostureEngine::getBinSize(), read(), PostureEngine::saveBuffer(), EmergencyStopMC::trigger(), and WorldState(). the current, egocentric rate of rotational (counterclockwise is positive) locomotion, radian/second Definition at line 142 of file WorldState.h.
the time at which we began moving along the current velocity vector Definition at line 143 of file WorldState.h. the current, egocentric rate of forward locomotion, mm/second Definition at line 140 of file WorldState.h. the current, egocentric rate of sideways (leftward is positive) locomotion, mm/second Definition at line 141 of file WorldState.h. The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:18 2016 by Doxygen 1.6.3 |