IRSensor Class Reference
Class for IR sensors.
More...
#include <irsensor.h>
Inherits lpzrobots::RaySensor.
List of all members.
Detailed Description
Class for IR sensors.
IR sensors are based on distance measurements using the ODE geom class Ray. The sensor value is obtained by collisions, which are handled by the simulation environement. The information of a collision comes to the sensor via the collision callback of the substance used for the ray (actually for the transform). However of no collision is detected the sensor needs to ajust its output as well. Therefore a reset function is provided.
Constructor & Destructor Documentation
IRSensor |
( |
float |
exponent = 1 , |
|
|
double |
size = 0.05 | |
|
) |
| | |
- Parameters:
-
| exponent | exponent of the sensor characteritic (default: 1 (linear)) |
Member Function Documentation
float characteritic |
( |
float |
len |
) |
[protected, virtual] |
describes the sensor characteritic An exponential curve is used.
- See also:
- setExponent()
returns the sensor value in the range [0,1]; 0 means nothing no object in the sensor distance range 1 means contact with another object
- See also:
- characteritic()
Implements RaySensor.
double getExponent |
( |
|
) |
const [inline] |
returns the exponent of the sensor characteritic (default: 1 (linear))
providing essential information
- Parameters:
-
| odeHandle | OdeHandle |
| osgHandle | OsgHandle |
| body | primitive to which the sensor will be attached |
| pose | relative pose in respect to body in which the sensor will be placed |
| range | length of the sensor |
| drawMode | whether to draw nothing, sensor body, ray, or both |
Implements RaySensor.
used for reseting the sensor value to a value of maximal distance.
Implements RaySensor.
void setExponent |
( |
float |
exp |
) |
[inline] |
sets the exponent of the sensor characteritic (default: 1 (linear))
void setLength |
( |
float |
len |
) |
[virtual] |
void setRange |
( |
float |
range |
) |
[virtual] |
set the range of the sensor
- Parameters:
-
| range | new length of the sensor |
Implements RaySensor.
void update |
( |
|
) |
[virtual] |
updates the position of the osg nodes
Implements RaySensor.
Member Data Documentation
The documentation for this class was generated from the following files: