24 int main(
int argc,
char* argv[])
40 cerr <<
"Initialize failed! Are you using the correct IP address?" << endl;
45 unsigned int status = 1;
46 unsigned int num_measurements = 0;
47 unsigned int range_1_vals[SickLMS1xx::SICK_LMS_1XX_MAX_NUM_MEASUREMENTS];
48 unsigned int range_2_vals[SickLMS1xx::SICK_LMS_1XX_MAX_NUM_MEASUREMENTS];
53 sick_lms_1xx.
SetSickScanDataFormat(SickLMS1xx::SICK_LMS_1XX_SCAN_FORMAT_DIST_DOUBLE_PULSE_REFLECT_16BIT);
54 for (
int i = 0; i < 1000; i++) {
55 sick_lms_1xx.
GetSickMeasurements(range_1_vals,range_2_vals,range_1_vals,range_2_vals,num_measurements,&status);
56 std::cout << i <<
": " << num_measurements <<
" " << status << std::endl;
61 std::cout << sick_exception.
what() << std::endl;
65 std::cout << sick_exception.
what() << std::endl;
69 std::cout << sick_exception.
what() << std::endl;
73 cerr <<
"An Error Occurred!" << endl;
86 cerr <<
"Uninitialize failed!" << endl;
int main(int argc, char *argv[])
Defines the SickLMS1xx class for working with the Sick LMS1xx laser range finders.