Public Member Functions | Protected Member Functions
IRSensor Class Reference

Sensor with one or more rays. More...

#include <IRSensor.hh>

Inheritance diagram for IRSensor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IRSensor (Body *body)
 Constructor.
virtual ~IRSensor ()
 Destructor.
unsigned int GetIRCount () const
 Get the ray count.
double GetRange (unsigned int index) const
 Get detected range for a ray.
Pose GetPose (unsigned int index) const

Protected Member Functions

virtual void LoadChild (sdf::ElementPtr &_sdf)
 Load the ray using parameter from an SDF.
virtual void InitChild ()
 Initialize the ray.
virtual void UpdateChild ()
 Update sensed values.
virtual void FiniChild ()
 Finalize the ray.

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


Constructor & Destructor Documentation

IRSensor ( Body *  body)

Constructor.

Parameters:
bodyThe underlying collision test uses an ODE collision, so ray sensors must be attached to a body.

Member Function Documentation

unsigned int GetIRCount ( ) const

Get the ray count.

Returns:
The number of rays
double GetRange ( unsigned int  index) const

Get detected range for a ray.

Returns:
Returns DBL_MAX for no detection.
virtual void LoadChild ( sdf::ElementPtr &  _sdf) [protected, virtual]

Load the ray using parameter from an SDF.

Parameters:
_sdfThe SDF parameter

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