Definition at line 58 of file CPtuHokuyo.h.
#include <mrpt/hwdrivers/CPtuHokuyo.h>
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)
| |||
Public Attributes | |||
CHokuyoURG | laser | ||
CPtuBase * | ptu | ||
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 §ion) | ||
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)
| |||
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. |
mrpt::hwdrivers::CPtuHokuyo::CPtuHokuyo | ( | ) |
Default constructor.
mrpt::hwdrivers::CPtuHokuyo::~CPtuHokuyo | ( | ) |
Destructor, delete observations of the vector.
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)
This | method 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.
This | method 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)
This | method 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.
<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 152 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.
<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 |
Definition at line 90 of file CPtuHokuyo.h.
Definition at line 78 of file CPtuHokuyo.h.
char mrpt::hwdrivers::CPtuHokuyo::m_axis [protected] |
Definition at line 66 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_final [protected] |
Definition at line 67 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_hokuyo_frec [protected] |
Definition at line 67 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_initial [protected] |
Definition at line 67 of file CPtuHokuyo.h.
std::string mrpt::hwdrivers::CPtuHokuyo::m_ptu_port [protected] |
Definition at line 65 of file CPtuHokuyo.h.
Specify type of ptu.
Current options are: m_ptu_type = 0 => CPtuDPerception m_ptu_type = 1 => CPtuMicos
Definition at line 85 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_velocity [protected] |
Definition at line 67 of file CPtuHokuyo.h.
Definition at line 79 of file CPtuHokuyo.h.
Definition at line 98 of file CPtuHokuyo.h.
std::vector<double> mrpt::hwdrivers::CPtuHokuyo::v_ptu_pos |
Definition at line 99 of file CPtuHokuyo.h.
std::vector<double> mrpt::hwdrivers::CPtuHokuyo::v_ptu_time |
Definition at line 99 of file CPtuHokuyo.h.
Definition at line 87 of file CPtuHokuyo.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011 |