carmen2json.c
Go to the documentation of this file.
00001 #include "../csm/csm_all.h"
00002 
00003 int main(int argc, char * argv[]) {
00004         sm_set_program_name(argv[0]);
00005 
00006         LDP ld; int count=0, errors=0; 
00007         while((ld = ld_read_smart(stdin))) {
00008                 if(!ld_valid_fields(ld))  {
00009                         sm_error("Invalid laser data (#%d in file)\n", count);
00010                         errors++;
00011                         continue;
00012                 }
00013 
00014                 ld_write_as_json(ld, stdout);
00015                 
00016                 ld_free(ld);
00017                 count++;
00018         }
00019         
00020         return errors;
00021 }


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29