#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 | showGraphic (mrpt::slam::CSimplePointsMap *theMap=0) | |||
Show a graphic with the points obtained from the scan or a map. | ||||
bool | saveMap2File (mrpt::slam::CSimplePointsMap &theMap, char *fname="Data.pts", const bool &colours=false) | |||
Save a simple points map into a simple file (if colours==true save points with a color). | ||||
bool | saveVObs2File (char *fname="Data.rawlog") | |||
Save vector of observations in a CFileOutputStream file. | ||||
bool | saveVObsPoints2File (char *fname="Data.pts", const bool &colours=false) | |||
Save vector points of observations into a simple file. | ||||
void | limit (mrpt::slam::CSimplePointsMap &theMap) | |||
Method for limit map points obtained from a scan. | ||||
void | setHigh (const double &newHigh) | |||
Set high between ptu tilt axis and hokuyo laser scan. | ||||
bool | obtainObs (mrpt::slam::CObservation2DRangeScan &obs) | |||
Obtain a observation from the laser. | ||||
void | loadConfig (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)
| ||||
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 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 | loadObs2PointsMap (mrpt::slam::CSimplePointsMap &theMap) | |||
Load observations in a points map. | ||||
bool | limitScan (const char &axis, double &low, double &high, mrpt::slam::CSimplePointsMap &theMap) | |||
Limit the valid position of scan points. | ||||
void | refineVObs (const char &axis) | |||
Refine the observations obtains from a continuous scan. | ||||
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. |
Definition at line 56 of file CPtuHokuyo.h.
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::limit | ( | mrpt::slam::CSimplePointsMap & | theMap | ) |
Method for limit map points obtained from a scan.
bool mrpt::hwdrivers::CPtuHokuyo::limitScan | ( | const char & | axis, | |
double & | low, | |||
double & | high, | |||
mrpt::slam::CSimplePointsMap & | theMap | |||
) | [private] |
Limit the valid position of scan points.
void mrpt::hwdrivers::CPtuHokuyo::loadConfig | ( | const mrpt::utils::CConfigFileBase & | configSource, | |
const std::string & | section | |||
) | [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.
void mrpt::hwdrivers::CPtuHokuyo::loadObs2PointsMap | ( | mrpt::slam::CSimplePointsMap & | theMap | ) | [private] |
Load observations in a points map.
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::minLengthVectors | ( | mrpt::slam::CObservation2DRangeScan & | obs, | |
std::vector< mrpt::slam::CObservation2DRangeScan > & | vObsAux | |||
) | [private] |
Calculate minimum lenght of 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] |
Refine the observations obtains from a continuous scan.
bool mrpt::hwdrivers::CPtuHokuyo::saveMap2File | ( | mrpt::slam::CSimplePointsMap & | theMap, | |
char * | fname = "Data.pts" , |
|||
const bool & | colours = false | |||
) |
Save a simple points map into a simple file (if colours==true save points with a color).
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::saveVObs2File | ( | char * | fname = "Data.rawlog" |
) |
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] |
bool mrpt::hwdrivers::CPtuHokuyo::showGraphic | ( | mrpt::slam::CSimplePointsMap * | theMap = 0 |
) |
Show a graphic with the points obtained from the scan or a map.
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 81 of file CPtuHokuyo.h.
Definition at line 69 of file CPtuHokuyo.h.
char mrpt::hwdrivers::CPtuHokuyo::m_axis [protected] |
Definition at line 64 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_final [protected] |
Definition at line 65 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_hokuyo_frec [protected] |
Definition at line 65 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_initial [protected] |
Definition at line 65 of file CPtuHokuyo.h.
std::string mrpt::hwdrivers::CPtuHokuyo::m_ptu_port [protected] |
Definition at line 63 of file CPtuHokuyo.h.
Specify type of ptu.
Current options are: m_ptu_type = 0 => CPtuDPerception m_ptu_type = 1 => CPtuMicos
Definition at line 76 of file CPtuHokuyo.h.
double mrpt::hwdrivers::CPtuHokuyo::m_velocity [protected] |
Definition at line 65 of file CPtuHokuyo.h.
Definition at line 70 of file CPtuHokuyo.h.
Definition at line 89 of file CPtuHokuyo.h.
std::vector<double> mrpt::hwdrivers::CPtuHokuyo::v_ptu_pos |
Definition at line 90 of file CPtuHokuyo.h.
std::vector<double> mrpt::hwdrivers::CPtuHokuyo::v_ptu_time |
Definition at line 90 of file CPtuHokuyo.h.
Definition at line 78 of file CPtuHokuyo.h.
Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:32:05 EDT 2009 |