Go to the documentation of this file.00001 #include "urg_sensor.h"
00002 #include <stdio.h>
00003
00004 int main(void)
00005 {
00006 urg_t urg;
00007 long *length_data = NULL;
00008 int ret;
00009
00010
00011
00012
00013 const int scan_times = 123;
00014 int length_data_size;
00015 long timestamp;
00016 int i;
00017
00018
00019 ret = urg_start_measurement(&urg, URG_DISTANCE, scan_times, 0);
00020
00021
00022 for (i = 0; i < scan_times; ++i) {
00023 length_data_size = urg_get_distance(&urg, length_data, ×tamp);
00024
00025
00026
00027 printf("%ld\n", timestamp);
00028 }
00029 return 0;
00030 }