RaySensor Class Reference
[Sensors, Ray]
#include <RaySensor.hh>
Inheritance diagram for RaySensor:
Detailed Description
Sensor with one or more rays.This sensor cast rays into the world, tests for intersections, and reports the range to the nearest object. It is used by ranging sensor models (e.g., sonars and scanning laser range finders).
Public Member Functions | |
RaySensor (Body *body) | |
Constructor. | |
virtual | ~RaySensor () |
Destructor. | |
double | GetMinAngle () const |
Get the minimum angle. | |
double | GetMaxAngle () const |
Get the maximum angle. | |
double | GetMinRange () const |
Get the minimum range. | |
double | GetMaxRange () const |
Get the maximum range. | |
int | GetRayCount () const |
Get the ray count. | |
int | GetRangeCount () const |
Get the range count. | |
void | SetRay (int index, const Vector3 &a, const Vector3 &b) |
Set ray parameters. | |
void | GetRay (int index, Vector3 &pos, Vector3 &dir) |
Get ray parameters. | |
double | GetRange (int index) |
Get detected range for a ray. | |
double | GetRetro (int index) |
Get detected retro (intensity) value for a ray. | |
int | GetFiducial (int index) |
Get detected fiducial value for a ray. | |
Protected Member Functions | |
virtual void | LoadChild (XMLConfigNode *node) |
Load the ray using parameter from an XMLConfig node. | |
virtual void | InitChild () |
Initialize the ray. | |
virtual void | UpdateChild (UpdateParams ¶ms) |
Update sensed values. | |
virtual void | FiniChild () |
Finalize the ray. |
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
body The underlying collision test uses an ODE geom, so ray sensors must be attached to a body.
Member Function Documentation
virtual void LoadChild | ( | XMLConfigNode * | node | ) | [protected, virtual] |
double GetMinAngle | ( | ) | const |
Get the minimum angle.
- Returns:
- The minimum angle
double GetMaxAngle | ( | ) | const |
Get the maximum angle.
- Returns:
- the maximum angle
double GetMinRange | ( | ) | const |
Get the minimum range.
- Returns:
- The minimum range
double GetMaxRange | ( | ) | const |
Get the maximum range.
- Returns:
- The maximum range
int GetRayCount | ( | ) | const |
Get the ray count.
- Returns:
- The number of rays
int GetRangeCount | ( | ) | const |
Get the range count.
- Returns:
- The number of ranges
Set ray parameters.
- Parameters:
-
index Rayindex (from 0 to rayCount - 1). a,b Ray endpoints (initial and final points). These are in body-relative coordiantes.
Get ray parameters.
- Parameters:
-
index Ray index (from 0 to rayCount -1). pos,dir Ray position and direction.
double GetRange | ( | int | index | ) |
Get detected range for a ray.
- Returns:
- Returns DBL_MAX for no detection.
The documentation for this class was generated from the following file: