Example that shows how to acquire Sick LD-MRS laser measurements.
- Warning
- For the moment, this example is only working on UNIX platforms since the Sick LD-MRS driver was not ported to Windows.
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpDebug.h>
#include <visp3/io/vpParseArgv.h>
#include <visp3/sensor/vpSickLDMRS.h>
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
#endif
try {
vpSickLDMRS laser;
std::string ip = "131.254.12.119";
laser.setIpAddress(ip);
laser.setup();
unsigned long int iter = 0;
for (;;) {
if (laser.measure(laserscan) == false)
continue;
iter++;
}
return EXIT_SUCCESS;
}
std::cout << "Catch an exception: " << e << std::endl;
return EXIT_FAILURE;
}
}
#else
int main()
{
std::cout << "This example is only working on unix-like platforms \n"
<< "since the Sick LD-MRS driver was not ported to Windows." << std::endl;
return EXIT_SUCCESS;
}
#endif
error that can be emitted by ViSP classes.
Implements a laser scan data structure that contains especially the list of scanned points that have ...
VISP_EXPORT double measureTimeMs()