Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Modules/SensorDataProcessor/SensorDataProcessor.h

Go to the documentation of this file.

    00001 /**
    00002 * @file SensorDataProcessor.h
    00003 *
    00004 * Declaration of abstract class SensorDataProcessor.
    00005 *
    00006 * @author Matthias Juengel
    00007 * @author Martin Lötzsch
    00008 */
    00009
    00010 #ifndef __SensorDataProcessor_h_
    00011 #define __SensorDataProcessor_h_
    00012
    00013 #include "Tools/RobotConfiguration.h"
    00014 #include "Tools/Module/Module.h"
    00015
    00016 #include "Representations/Perception/CameraMatrix.h"
    00017 #include "Representations/Perception/SensorDataBuffer.h"
    00018 #include "Representations/Perception/BodyPercept.h"
    00019 #include "Representations/Perception/BodyPosture.h"
    00020 #include "Representations/Perception/PSDPercept.h"
    00021 #include "Representations/Motion/MotionInfo.h"
    00022
    00023 /**
    00024 * @class SensorDataProcessorInterfaces
    00025 *
    00026 * Interfaces of the SensorDataProcessor module.
    00027 */
    00028 class SensorDataProcessorInterfaces
    00029 {
    00030 public:
    00031   /** Constructor */
    00032   SensorDataProcessorInterfaces(
    00033     const SensorDataBuffer& sensorDataBuffer,
    00034     const unsigned long& imageFrameNumber,
    00035     const MotionInfo& motionInfo,
    00036     BodyPercept& bodyPercept,
    00037     BodyPosture& bodyPosture,
    00038     CameraMatrix& cameraMatrix,
    00039     PSDPercept& psdPercept)
    00040     : sensorDataBuffer(sensorDataBuffer),
    00041     imageFrameNumber(imageFrameNumber),
    00042     motionInfo(motionInfo),
    00043     bodyPercept(bodyPercept),
    00044     bodyPosture(bodyPosture),
    00045     cameraMatrix(cameraMatrix),
    00046     psdPercept(psdPercept)
    00047   {}
    00048
    00049 protected:
    00050   /** The SensorDataBuffer to be processed. */
    00051   const SensorDataBuffer& sensorDataBuffer;
    00052
    00053   /** The frame number of the current image */
    00054   const unsigned long& imageFrameNumber;
    00055
    00056   /** The motion info last received from Motion */
    00057   const MotionInfo& motionInfo;
    00058
    00059   /** The BodyPercept to be calculated */
    00060   BodyPercept& bodyPercept;
    00061
    00062   /** The BodyPosture to be calculated */
    00063   BodyPosture& bodyPosture;
    00064
    00065   /** The offset and the rotation of the camera to be calculated */
    00066   CameraMatrix& cameraMatrix;
    00067
    00068   /** A spot relative to the robot that was detected by the PSD sensor to be calculated */
    00069   PSDPercept& psdPercept;
    00070 };
    00071
    00072 /**
    00073 * @class SensorDataProcessor
    00074 *
    00075 * An abstract class that defines a processor for raw sensor data.
    00076 */
    00077 class SensorDataProcessor : public Module, public SensorDataProcessorInterfaces, public RobotDimensions
    00078 {
    00079 public:
    00080 /*
    00081 * Constructor.
    00082 * @param interfaces The paramters of the ImageProcessor module.
    00083   */
    00084   SensorDataProcessor(const SensorDataProcessorInterfaces& interfaces)
    00085     : SensorDataProcessorInterfaces(interfaces),
    00086       RobotDimensions(getRobotConfiguration().getRobotDimensions())
    00087   {}
    00088
    00089   /** Destructor */
    00090   virtual ~SensorDataProcessor() {}
    00091 };
    00092
    00093 #endif // __SensorDataProcessor_h_