sensor_parameter.c
Go to the documentation of this file.
1 
10 #include "urg_c/urg_sensor.h"
11 #include "urg_c/urg_utils.h"
12 #include "open_urg_sensor.h"
13 #include <stdio.h>
14 
15 
16 int main(int argc, char *argv[])
17 {
18  urg_t urg;
19  int min_step;
20  int max_step;
21  long min_distance;
22  long max_distance;
23 
24  if (open_urg_sensor(&urg, argc, argv) < 0) {
25  return 1;
26  }
27 
28  printf("Sensor product type: %s\n", urg_sensor_product_type(&urg));
29  printf("Sensor firmware version: %s\n", urg_sensor_firmware_version(&urg));
30  printf("Sensor serial ID: %s\n", urg_sensor_serial_id(&urg));
31  printf("Sensor status: %s\n", urg_sensor_status(&urg));
32  printf("Sensor state: %s\n", urg_sensor_state(&urg));
33 
34  urg_step_min_max(&urg, &min_step, &max_step);
35  printf("step: [%d, %d]\n", min_step, max_step);
36 
37  urg_distance_min_max(&urg, &min_distance, &max_distance);
38  printf("distance: [%ld, %ld)\n", min_distance, max_distance);
39 
40  printf("scan interval: %ld [usec]\n", urg_scan_usec(&urg));
41  printf("sensor data size: %d\n", urg_max_data_size(&urg));
42 
43  urg_close(&urg);
44 
45 #if defined(URG_MSC)
46  getchar();
47 #endif
48  return 0;
49 }
int main(int argc, char *argv[])
const char * urg_sensor_firmware_version(urg_t *urg)
Definition: urg_sensor.c:1244
URG sensor.
Definition: urg_sensor.h:72
void urg_distance_min_max(const urg_t *urg, long *min_distance, long *max_distance)
Definition: urg_utils.c:73
long urg_scan_usec(const urg_t *urg)
Definition: urg_utils.c:104
URG sensor.
void urg_close(urg_t *urg)
Definition: urg_sensor.c:745
const char * urg_sensor_status(urg_t *urg)
Definition: urg_sensor.c:1325
int open_urg_sensor(urg_t *urg, int argc, char *argv[])
const char * urg_sensor_product_type(urg_t *urg)
Definition: urg_sensor.c:1180
void urg_step_min_max(const urg_t *urg, int *min_step, int *max_step)
Definition: urg_utils.c:91
const char * urg_sensor_state(urg_t *urg)
Definition: urg_sensor.c:1350
URG sensor utility.
const char * urg_sensor_serial_id(urg_t *urg)
Definition: urg_sensor.c:1201
int urg_max_data_size(const urg_t *urg)
Definition: urg_utils.c:114


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Jun 10 2020 03:48:10