Main MRPT website > C++ reference
MRPT logo
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

mrpt::hwdrivers::CPtuHokuyo Class Reference


Detailed Description

Definition at line 52 of file CPtuHokuyo.h.

#include <mrpt/hwdrivers/CPtuHokuyo.h>

Inheritance diagram for mrpt::hwdrivers::CPtuHokuyo:
Inheritance graph
[legend]

List of all members.

Classes

struct  my_pos

Public Member Functions

 CPtuHokuyo ()
 Default constructor.
 ~CPtuHokuyo ()
 Destructor, delete observations of the vector.
bool init (const std::string &portPtu, const std::string &portHokuyo)
 Initialization of laser and ptu.
bool scan (char &axis, const int &tWait, double &initial, double &final, const double &radPre, const int &mean, const bool &interlaced=false)
 Performs a complete scan.
bool continuousScan (char &axis, const double &velocity, double &initial, double &final)
 Performs a continuous scan.
bool saveVObs2File (char *fname="Data.rawlog")
 Show a graphic with the points obtained from the scan or a map.
bool saveVObsPoints2File (char *fname="Data.pts", const bool &colours=false)
 Save vector points of observations into a simple file.
bool savePitchAndDistances2File ()
 Save pitchs and raw distances of all scans.
void setHigh (const double &newHigh)
 Method for limit map points obtained from a scan.
bool obtainObs (mrpt::slam::CObservation2DRangeScan &obs)
 Obtain a observation from the laser.
void initialize ()
 This method can or cannot be implemented in the derived class, depending on the need for it.
void doProcess ()
 This method will be invoked at a minimum rate of "process_rate" (Hz)

Exceptions:
Thismethod must throw an exception with a descriptive message if some critical error is found.

Public Attributes

CHokuyoURG laser
CPtuBaseptu
int m_ptu_type
 Specify type of ptu.
std::vector
< mrpt::slam::CObservation2DRangeScan
vObs
double high
std::vector
< mrpt::hwdrivers::CPtuHokuyo::my_pos
v_my_pos
std::vector< double > v_ptu_pos
std::vector< double > v_ptu_time

Protected Member Functions

void loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string &section)
 Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)

Exceptions:
Thismethod must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value.

Protected Attributes

std::string m_ptu_port
char m_axis
double m_velocity
double m_initial
double m_final
double m_hokuyo_frec

Private Member Functions

double saveObservation (const char &axis, const int &mean)
 Save a observation from the laser into a vector of observations, calculating sensor position.
bool singleScan (const char &axis, const int &tWait, const int &movements, const double &radPre, const int &mean)
 Performs a simple scan.
int minLengthVectors (mrpt::slam::CObservation2DRangeScan &obs, std::vector< mrpt::slam::CObservation2DRangeScan > &vObsAux)
 Calculate minimum lenght of scan vectors.
int minLengthVectors (mrpt::slam::CObservation2DRangeScan &obs1, mrpt::slam::CObservation2DRangeScan &obs2, const int &mode)
 Calculate minimum lenght of 2 scan vectors.
void refineVObs (const char &axis)
 Load observations in a points map.
void calculateSensorPose (const char &axis, const double &pos, mrpt::slam::CObservation2DRangeScan &obs)
 Calculate the sensor pose depending teh axis of movements and the ptu position.
int obsPosition ()
 Obtain position of observations between first and second position in m_my_pos map.

Constructor & Destructor Documentation

mrpt::hwdrivers::CPtuHokuyo::CPtuHokuyo (  )

Default constructor.

mrpt::hwdrivers::CPtuHokuyo::~CPtuHokuyo (  )

Destructor, delete observations of the vector.


Member Function Documentation

void mrpt::hwdrivers::CPtuHokuyo::calculateSensorPose ( const char &  axis,
const double &  pos,
mrpt::slam::CObservation2DRangeScan obs 
) [private]

Calculate the sensor pose depending teh axis of movements and the ptu position.

bool mrpt::hwdrivers::CPtuHokuyo::continuousScan ( char &  axis,
const double &  velocity,
double &  initial,
double &  final 
)

Performs a continuous scan.

void mrpt::hwdrivers::CPtuHokuyo::doProcess (  ) [virtual]

This method will be invoked at a minimum rate of "process_rate" (Hz)

Exceptions:
Thismethod must throw an exception with a descriptive message if some critical error is found.

Implements mrpt::hwdrivers::CGenericSensor.

bool mrpt::hwdrivers::CPtuHokuyo::init ( const std::string &  portPtu,
const std::string &  portHokuyo 
)

Initialization of laser and ptu.

void mrpt::hwdrivers::CPtuHokuyo::initialize (  ) [virtual]

This method can or cannot be implemented in the derived class, depending on the need for it.

Exceptions:
Thismethod must throw an exception with a descriptive message if some critical error is found.

Reimplemented from mrpt::hwdrivers::CGenericSensor.

void mrpt::hwdrivers::CPtuHokuyo::loadConfig_sensorSpecific ( const mrpt::utils::CConfigFileBase configSource,
const std::string &  section 
) [protected, virtual]

Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)

Exceptions:
Thismethod must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value.

Implements mrpt::hwdrivers::CGenericSensor.

int mrpt::hwdrivers::CPtuHokuyo::minLengthVectors ( mrpt::slam::CObservation2DRangeScan obs,
std::vector< mrpt::slam::CObservation2DRangeScan > &  vObsAux 
) [private]

Calculate minimum lenght of scan vectors.

int mrpt::hwdrivers::CPtuHokuyo::minLengthVectors ( mrpt::slam::CObservation2DRangeScan obs1,
mrpt::slam::CObservation2DRangeScan obs2,
const int &  mode 
) [private]

Calculate minimum lenght of 2 scan vectors.

int mrpt::hwdrivers::CPtuHokuyo::obsPosition (  ) [private]

Obtain position of observations between first and second position in m_my_pos map.

bool mrpt::hwdrivers::CPtuHokuyo::obtainObs ( mrpt::slam::CObservation2DRangeScan obs )

Obtain a observation from the laser.

void mrpt::hwdrivers::CPtuHokuyo::refineVObs ( const char &  axis ) [private]

Load observations in a points map.

Limit the valid position of scan points Refine the observations obtains from a continuous scan

double mrpt::hwdrivers::CPtuHokuyo::saveObservation ( const char &  axis,
const int &  mean 
) [private]

Save a observation from the laser into a vector of observations, calculating sensor position.

bool mrpt::hwdrivers::CPtuHokuyo::savePitchAndDistances2File (  )

Save pitchs and raw distances of all scans.

bool mrpt::hwdrivers::CPtuHokuyo::saveVObs2File ( char *  fname = "Data.rawlog" )

Show a graphic with the points obtained from the scan or a map.

Save a simple points map into a simple file (if colours==true save points with a color) Save vector of observations in a CFileOutputStream file

bool mrpt::hwdrivers::CPtuHokuyo::saveVObsPoints2File ( char *  fname = "Data.pts",
const bool &  colours = false 
)

Save vector points of observations into a simple file.

bool mrpt::hwdrivers::CPtuHokuyo::scan ( char &  axis,
const int &  tWait,
double &  initial,
double &  final,
const double &  radPre,
const int &  mean,
const bool &  interlaced = false 
)

Performs a complete scan.

Parameters:
<axis>Pan or Till
<tWait>Wait time betwen commands
<initial>initial position
<final>final position
<radPre>radians precision for the scan
<interlaced>if interlaced==true performs a double sweep
void mrpt::hwdrivers::CPtuHokuyo::setHigh ( const double &  newHigh ) [inline]

Method for limit map points obtained from a scan.

Set high between ptu tilt axis and hokuyo laser scan

Definition at line 146 of file CPtuHokuyo.h.

bool mrpt::hwdrivers::CPtuHokuyo::singleScan ( const char &  axis,
const int &  tWait,
const int &  movements,
const double &  radPre,
const int &  mean 
) [private]

Performs a simple scan.

Parameters:
<axis>Pan or Till
<tWait>Wait time betwen commands
<movements>number total of movements
<radPre>radians precision for the scan
<vObs>reference to obsevations vector for save the observation

Member Data Documentation

Definition at line 84 of file CPtuHokuyo.h.

Definition at line 72 of file CPtuHokuyo.h.

Definition at line 60 of file CPtuHokuyo.h.

Definition at line 61 of file CPtuHokuyo.h.

Definition at line 61 of file CPtuHokuyo.h.

Definition at line 61 of file CPtuHokuyo.h.

std::string mrpt::hwdrivers::CPtuHokuyo::m_ptu_port [protected]

Definition at line 59 of file CPtuHokuyo.h.

Specify type of ptu.

Current options are: m_ptu_type = 0 => CPtuDPerception m_ptu_type = 1 => CPtuMicos

Definition at line 79 of file CPtuHokuyo.h.

Definition at line 61 of file CPtuHokuyo.h.

Definition at line 73 of file CPtuHokuyo.h.

Definition at line 92 of file CPtuHokuyo.h.

Definition at line 93 of file CPtuHokuyo.h.

Definition at line 93 of file CPtuHokuyo.h.

Definition at line 81 of file CPtuHokuyo.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011