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/vpDebug.h>
#include <visp3/sensor/vpSickLDMRS.h>
#include <visp3/io/vpParseArgv.h>
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
int main()
{
try {
std::string ip = "131.254.12.119";
unsigned long int iter = 0;
for ( ; ; ) {
if (laser.
measure(laserscan) ==
false)
continue;
iter ++;
std::cout << "iter: " << iter << " time: "
}
return 0;
}
std::cout << "Catch an exception: " << e << std::endl;
return 1;
}
}
#else // #ifdef UNIX
int main()
{
std::cout << "This example is only working on UNIX platforms \n"
<< "since the Sick LD-MRS driver was not ported to Windows."
<< std::endl;
return 0;
}
#endif // #ifdef UNIX