Gazebo logo

RayProximity Class Reference

Proximity sensor with one or more rays. More...

#include <RayProximity.hh>

Inheritance diagram for RayProximity:

Sensor List of all members.

Public Member Functions

 RayProximity (World *world, Body *body, int rayCount)
 Constructor.
virtual ~RayProximity ()
 Destructor.
void SetRay (int index, GzVector a, GzVector b)
 Set ray parameters.
void GetRay (int index, GzVector *pos, GzVector *dir)
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.
void Update ()
 Update sensed values.

Detailed Description

Proximity 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).


Constructor & Destructor Documentation

RayProximity::RayProximity World world,
Body body,
int  rayCount
 

Constructor.

Parameters:
world The world in which to place the sensor
body The underlying collision test uses an ODE geom, so ray sensors must be attached to a body.
rayCount Maximum number of rays in sensor.

RayProximity::~RayProximity  )  [virtual]
 

Destructor.


Member Function Documentation

void RayProximity::SetRay int  index,
GzVector  a,
GzVector  b
 

Set ray parameters.

Parameters:
index Ray index (from 0 to rayCount - 1).
a,b Ray endpoints (initial and final points). These are in body-relative coordiantes.

void RayProximity::GetRay int  index,
GzVector pos,
GzVector dir
 

Get ray parameters

Parameters:
index Ray index (from 0 to rayCount -1).
pos,dir Ray position and direction.

double RayProximity::GetRange int  index  ) 
 

Get detected range for a ray.

Returns:
Returns DBL_MAX for no detection.

double RayProximity::GetRetro int  index  ) 
 

Get detected retro (intensity) value for a ray.

int RayProximity::GetFiducial int  index  ) 
 

Get detected fiducial value for a ray.

void RayProximity::Update  ) 
 

Update sensed values.


The documentation for this class was generated from the following files:

Last updated 12 September 2005 21:38:45