sensor_parameter.c
Go to the documentation of this file.
00001 
00010 #include "urg_c/urg_sensor.h"
00011 #include "urg_c/urg_utils.h"
00012 #include "open_urg_sensor.h"
00013 #include <stdio.h>
00014 
00015 
00016 int main(int argc, char *argv[])
00017 {
00018     urg_t urg;
00019     int min_step;
00020     int max_step;
00021     long min_distance;
00022     long max_distance;
00023 
00024     if (open_urg_sensor(&urg, argc, argv) < 0) {
00025         return 1;
00026     }
00027 
00028     printf("Sensor product type: %s\n", urg_sensor_product_type(&urg));
00029     printf("Sensor firmware version: %s\n", urg_sensor_firmware_version(&urg));
00030     printf("Sensor serial ID: %s\n", urg_sensor_serial_id(&urg));
00031     printf("Sensor status: %s\n", urg_sensor_status(&urg));
00032     printf("Sensor state: %s\n", urg_sensor_state(&urg));
00033 
00034     urg_step_min_max(&urg, &min_step, &max_step);
00035     printf("step: [%d, %d]\n", min_step, max_step);
00036 
00037     urg_distance_min_max(&urg, &min_distance, &max_distance);
00038     printf("distance: [%ld, %ld)\n", min_distance, max_distance);
00039 
00040     printf("scan interval: %ld [usec]\n", urg_scan_usec(&urg));
00041     printf("sensor data size: %d\n", urg_max_data_size(&urg));
00042 
00043     urg_close(&urg);
00044 
00045 #if defined(URG_MSC)
00046     getchar();
00047 #endif
00048     return 0;
00049 }


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Aug 26 2015 16:38:27