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.

Renato Florentino Garcia.
August 2008


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

< EpuckInterface::Triple

Constructor & Destructor Documentation

EpuckIR::EpuckIR ( const SerialPort *const  serialPort)

The EpuckIR class constructor.

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.

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.

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: