Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rangeFinder.h
Go to the documentation of this file.
1 #ifndef __RANGEFINDER_H
2 #define __RANGEFINDER_H
3 
4 #include "raysensorbank.h"
5 #include "irsensor.h"
6 
7 #include <selforg/types.h>
8 #include <selforg/stl_adds.h>
9 
10 #include <list>
11 
12 namespace lpzrobots {
13 
14  /**
15  * Class representing a range finder. It consists of several ray sensors.
16  * This class is basically an extended (and easier) interface to a RaySensorBank, which allows
17  * a more convenient handling of several IR sensors in a given angular range.
18  */
19  class RangeFinder : public RaySensorBank{
20  public:
21 
23 
24  virtual void init(Primitive* own, Joint* joint = 0) override;
25 
26  /**
27  * Register equidistant IR sensor in a given angular range
28  * @param numBeams: number of beams of the range finder
29  * @param startAngle: angle of the leftmost beam
30  * @param endAngle: angle of the rightmost beam
31  * @param maxRange: maximum range of the raysensors
32  * @param height: At which height to attach the range finder (0 will attach it to the center of gravity of own)
33  * @param drawMode: Specifies if rays should be drawn or not (default is drawing rays)
34  */
35  virtual void registerSensorRange(int numBeams, double startAngle, double endAngle, double maxRange, double height,
37 
38  protected:
40  };
41 
42 }
43 
44 #endif
Class for a bank (collection) of ray sensors.
Definition: raysensorbank.h:36
Class representing a range finder.
Definition: rangeFinder.h:19
Definition: joint.h:41
rayDrawMode
Definition: raysensor.h:56
Primitive * own
Definition: rangeFinder.h:39
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
virtual void registerSensorRange(int numBeams, double startAngle, double endAngle, double maxRange, double height, RaySensor::rayDrawMode drawMode=RaySensor::drawRay)
Register equidistant IR sensor in a given angular range.
Definition: rangeFinder.cpp:11
Definition: raysensor.h:56
virtual void init(Primitive *own, Joint *joint=0) override
initialises sensor with a body of robot and optionally with a joint.
Definition: rangeFinder.cpp:5
RangeFinder()
Definition: rangeFinder.h:22