EpuckIR Class Reference

Class for to get data from e-puck IR sensors. More...

#include <epuckIR.hpp>

Inheritance diagram for EpuckIR:
Collaboration diagram for EpuckIR:

List of all members.


Detailed Description

Class for to get data from e-puck IR sensors.

Author:
Renato Florentino Garcia.
Date:
August 2008

Classes

struct  IRData
 Represents the data got from e-puck IR sensors. More...

Public Member Functions

 EpuckIR (const SerialPort *const serialPort)
 The EpuckIR class constructor.
IRData GetIRData () const
 Read the IR sensors.
std::vector
< EpuckInterface::Triple
GetGeometry () const
 Give the geometry of each IR sensor in e-puck.

Static Public Attributes

static const unsigned SENSOR_QUANTITY = 8
 The number of IR sensors on e-puck.

Private Attributes

std::vector
< EpuckInterface::Triple
geometry

Constructor & Destructor Documentation

EpuckIR::EpuckIR ( const SerialPort *const  serialPort)

The EpuckIR class constructor.

Parameters:
serialPortPointer for a SerialPort class already created and connected with an e-puck.

References EpuckInterface::Triple::theta, EpuckInterface::Triple::x, and EpuckInterface::Triple::y.


Member Function Documentation

std::vector<EpuckInterface::Triple> EpuckIR::GetGeometry ( ) const [inline]

Give the geometry of each IR sensor in e-puck.

Returns:
A std::vector with the sensors geometry.
EpuckIR::IRData EpuckIR::GetIRData ( ) const

Read the IR sensors.

Read the values of IR sensor from e-puck, and translate it for distance in meters.

Returns:
A IRData struct with the read values.

References EpuckInterface::GET_IR_PROX, EpuckIR::IRData::ranges, SerialPort::recvInt(), SENSOR_QUANTITY, EpuckInterface::serialPort, and EpuckIR::IRData::voltages.

Here is the call graph for this function:


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