25 int main(
int argc,
char** argv)
31 confFileName =
string(
"./conf.ini");
33 confFileName =
string(argv[1]);
36 string section(
"IK_1");
45 for (
size_t i = 0; i < obs.
sensedData.size(); i++)
47 cout << obs.
sensedData[i].sensedDistance <<
"\t";
50 std::this_thread::sleep_for(10ms);
55 catch (std::exception& e)
57 std::cerr << e.what();
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
This class allows loading and storing values and vectors of different types from ".ini" files easily.
void getObservation(mrpt::obs::CObservationRange &outObservation)
This method tries to get a set of range measurements from the IR sensors.
Contains classes for various device interfaces.
This namespace contains representation of robot actions and observations.
void loadConfig(const mrpt::config::CConfigFileBase &configSource, const std::string §ion)
Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensor...
GLsizei const GLchar ** string
: An interface for the phidget Interface kit board (1018).
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
void doProcess()
This method should be called periodically.
void initialize()
Initialize the sensor according to the parameters previously read in the configuration file...
TMeasurementList sensedData
All the measurements.