Go to the documentation of this file.
4 #include "../csm/csm_all.h"
5 #include "../csm/laser_data_drawing.h"
12 int main(
int argc,
const char * argv[]) {
15 const char *in_filename;
16 const char *ref_filename;
17 const char *out_filename;
26 options_string(
ops,
"ref_field", &ref_field_string,
"estimate",
"What field to find in ref.");
27 options_string(
ops,
"out_field", &out_field_string,
"true_pose",
"What field to copy to.");
30 fprintf(stderr,
" This program works on two logs: A and B. "
31 "For each scan in A, the program searches for the scan in B having the same timestamp. "
32 "Then, the true_pose field in B is copied to the scan form A, and it is written to the output.\n");
45 if(!in_stream || !ref_stream || !out_stream)
return -1;
57 copy_d(ref_pose, 3, out_pose);
59 fputs(
"\n", out_stream);
67 if(feof(ref_stream)) {
68 sm_error(
"..because ref stream has ended.\n");
83 return (ld1->
tv.tv_sec == ld2->
tv.tv_sec) &&
84 (ld1->
tv.tv_usec == ld2->
tv.tv_usec);
89 sprintf(
buf,
"LD, tv=%d,%d", (
int) ld->
tv.tv_sec, (
int) ld->
tv.tv_usec);
void copy_d(const double *from, int n, double *to)
const char * short_desc(LDP ld)
double * ld_get_reference_pose(LDP ld, ld_reference use_reference)
FILE * open_file_for_writing(const char *filename)
void sm_set_program_name(const char *name)
double * ld_get_reference_pose_silent(LDP ld, ld_reference use_reference)
int main(int argc, const char *argv[])
struct option * options_allocate(int n)
FILE * open_file_for_reading(const char *filename)
int same_scan(LDP ld1, LDP ld2)
ld_reference ld_string_to_reference(const char *s)
void options_print_help(struct option *options, FILE *f)
void sm_error(const char *msg,...)
LDP ld_read_smart(FILE *)
void options_string(struct option *, const char *name, const char **p, const char *def_balue, const char *desc)
int options_parse_args(struct option *ops, int argc, const char *argv[])
void ld_write_as_json(LDP ld, FILE *stream)
csm
Author(s): Andrea Censi
autogenerated on Wed Aug 17 2022 02:50:33