47 double m_velocity, m_initial,
m_final, m_hokuyo_frec;
52 const std::string §ion );
65 std::vector<mrpt::obs::CObservation2DRangeScan>
vObs;
76 std::vector<mrpt::hwdrivers::CPtuHokuyo::my_pos>
v_my_pos;
90 bool init(
const std::string &portPtu,
const std::string &portHokuyo);
101 bool scan(
char &axis,
const int &tWait,
double &initial,
double &
final,
const double &radPre,
const int &
mean,
const bool &interlaced=
false);
105 bool continuousScan(
char &axis,
const double &velocity,
double &initial,
double &
final);
130 void setHigh(
const double &newHigh) { high = newHigh; }
163 bool singleScan(
const char &axis,
const int &tWait,
const int &movements,
const double &radPre,
const int &
mean);
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
This software driver implements the protocol SCIP-2.0 for interfacing HOKUYO URG, UTM and UXM laser s...
This class implements initialization and comunication methods to control a generic Pan and Tilt Unit,...
std::vector< mrpt::hwdrivers::CPtuHokuyo::my_pos > v_my_pos
void initialize()
This method can or cannot be implemented in the derived class, depending on the need for it.
void setHigh(const double &newHigh)
Method for limit map points obtained from a scan.
std::vector< double > v_ptu_pos
void refineVObs(const char &axis)
Load observations in a points map.
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string §ion)
See the class documentation at the top for expected parameters.
void calculateSensorPose(const char &axis, const double &pos, mrpt::obs::CObservation2DRangeScan &obs)
Calculate the sensor pose depending teh axis of movements and the ptu position.
bool continuousScan(char &axis, const double &velocity, double &initial, double &final)
Performs a continuous scan.
int minLengthVectors(mrpt::obs::CObservation2DRangeScan &obs1, mrpt::obs::CObservation2DRangeScan &obs2, const int &mode)
Calculate minimum lenght of 2 scan vectors.
bool singleScan(const char &axis, const int &tWait, const int &movements, const double &radPre, const int &mean)
Performs a simple scan.
bool obtainObs(mrpt::obs::CObservation2DRangeScan &obs)
Obtain a observation from the laser.
int obsPosition()
Obtain position of observations between first and second position in m_my_pos map.
bool init(const std::string &portPtu, const std::string &portHokuyo)
Initialization of laser and ptu.
int minLengthVectors(mrpt::obs::CObservation2DRangeScan &obs, std::vector< mrpt::obs::CObservation2DRangeScan > &vObsAux)
Calculate minimum lenght of scan vectors.
double saveObservation(const char &axis, const int &mean)
Save a observation from the laser into a vector of observations, calculating sensor position.
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 saveVObs2File(const char *fname="Data.rawlog")
Show a graphic with the points obtained from the scan or a map.
int m_ptu_type
Specify type of ptu.
bool savePitchAndDistances2File()
Save pitchs and raw distances of all scans.
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
bool saveVObsPoints2File(const char *fname="Data.pts", const bool &colours=false)
Save vector points of observations into a simple file.
CPtuHokuyo()
Default constructor.
~CPtuHokuyo()
Destructor, delete observations of the vector.
std::vector< mrpt::obs::CObservation2DRangeScan > vObs
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
This class allows loading and storing values and vectors of different types from a configuration text...
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::system::TTimeStamp timeStamp