Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

ShmemVehPoseSource Class Reference

Implements the VehPoseSource interface class which reads data from a shared memory region. More...

Inheritance diagram for ShmemVehPoseSource:

Inheritance graph
[legend]
Collaboration diagram for ShmemVehPoseSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ShmemVehPoseSource ()
virtual ~ShmemVehPoseSource ()
virtual bool getPose (utils::Time time, VehPose &pose)
 Returns the vehicle pose at the given time. The implementation will attempt to interpolate or extrapolate from known poses to get the pose at the desired time.

Parameters:
[in] time The time for which to get the vehicle pose.
[out] pose The resulting vehicle pose
Returns:
true if the routine was able to obtain a vehicle pose at the desired time, false if not.

virtual bool getCurPose (utils::Time &time, VehPose &pose, bool blocking=0)
 Returns the latest vehicle pose along with the time at which it was collected. The call can be blocking, i.e., we block until the next unread vehicle pose is acquired, but it is usually polling, i.e., it returns immediately with the most recent vehicle pose

Parameters:
[out] time The time at which the road information was collected. (0 if the road is invalid)
[out] pose The vehicle pose
[in] blocking If true, then the call is blocking, if false, it is polling.
Returns:
true if "new" data has been acquired successfully, false on an invalid read or if no new road data has been acquired since the last read. Note an invalid read can be verified by checking to see if time.isZero() is true.

bool init (utils::ConfigFile &params, utils::SymbolTable *globals)
 initialize

Static Public Member Functions

static void interpolate (const VehPoseShmemStruct &prev_pose, const VehPoseShmemStruct &next_pose, double t, VehPose &veh_pose)
 interpolate shmem structures

Detailed Description

Implements the VehPoseSource interface class which reads data from a shared memory region.

This pose source is a little tricky in that it initiates a thread which collects the poses as they come through the shared memory individually and maintains a ring buffer which can be used, through interpolation and extrapolation, to generate poses anytime in the recent past or very near future. Pose requests too old to be in the ring buffer or too far in the future fail.

Tag: shmem
Parameters:

Definition at line 49 of file ShmemVehPoseSource.cc.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 13:21:26 2006 for ModUtils by  doxygen 1.4.4