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

# Modules/CollisionDetector/CollisionDetector.h

Go to the documentation of this file.

    00001 /**
    00002 * @file CollisionDetector.h
    00003 *
    00004 * This file contains a generic class for collision detection.
    00005 *
    00006 * @author Daniel Göhring
    00007 */
    00008
    00009 #ifndef __CollisionDetector_h_
    00010 #define __CollisionDetector_h_
    00011
    00012
    00013 #include "Tools/Module/Module.h"
    00014
    00015 #include "Representations/Perception/SensorDataBuffer.h"
    00016 #include "Representations/Perception/CollisionPercept.h"
    00017 #include "Representations/Motion/MotionInfo.h"
    00018
    00019 /**
    00020 * @class CollisionDetectorInterfaces
    00021 *
    00022 * The interfaces of the CollisionDetector module.
    00023 */
    00024 class CollisionDetectorInterfaces
    00025 {
    00026 public:
    00027   /** Constructor. */
    00028   CollisionDetectorInterfaces(
    00029     const SensorDataBuffer& sensorDataBuffer,
    00030     const MotionInfo& motionInfo,
    00031     CollisionPercept& collisionPercept)
    00032     : sensorDataBuffer(sensorDataBuffer),
    00033     motionInfo(motionInfo),
    00034     collisionPercept(collisionPercept)
    00035   {
    00036   }
    00037
    00038   /** The SensorDataBuffer */
    00039   const SensorDataBuffer& sensorDataBuffer;
    00040
    00041   /** The motions that are executed by the Motion process */
    00042   const MotionInfo& motionInfo;
    00043
    00044   /** The JointState to be generated */
    00045   CollisionPercept& collisionPercept;
    00046 };
    00047
    00048
    00049 /**
    00050 * @class CollisionDetector
    00051 *
    00052 * The base class for collision detectors
    00053 *
    00054 * @author Daniel Göhring
    00055 */
    00056 class CollisionDetector : public Module, public CollisionDetectorInterfaces
    00057 {
    00058 public:
    00059 /*
    00060 * Constructor.
    00061 * @param interfaces The paramters of the CollisionDetector module.
    00062   */
    00063   CollisionDetector(const CollisionDetectorInterfaces& interfaces)
    00064     : CollisionDetectorInterfaces(interfaces)
    00065   {}
    00066
    00067   /** Destructor */
    00068   virtual ~CollisionDetector() {}
    00069 };
    00070
    00071 #endif // __CollisionDetector_h_