2 #include <gsl/gsl_rng.h> 3 #include <gsl/gsl_randist.h> 4 #include <gsl/gsl_math.h> 8 #include "../csm/csm_all.h" 26 "This program prepares the data for one of the experiments. \n\n" 27 "The input is any sensor log (Carmen or JSON format) \n" 28 "The output are two files that contain laser_ref and laser_sens\n" 29 "(you have to match the i-th scan in the first file with the i-th\n" 30 " in the second).\n\n" 31 "The two files contain exactly the same date but for the 'odometry' field\n" 32 "The odometry error is uniform in the intervals given.\n";
34 int main(
int argc,
const char ** argv) {
44 options_int (ops,
"seed", &p.
seed, 0,
"Seed for random number generator (if 0, use GSL_RNG_SEED env. variable).");
62 gsl_rng *
rng = gsl_rng_alloc (gsl_rng_ranlxs0);
64 gsl_rng_set(rng, (
unsigned int) p.
seed);
87 sm_error(
"Invalid laser data (#%d in file)\n", count);
void options_banner(const char *message)
void sm_set_program_name(const char *name)
void ld_write_as_json(LDP ld, FILE *stream)
const char * file_output1
const char * file_output2
void options_double(struct option *, const char *name, double *p, double def_value, const char *desc)
int ld_valid_fields(LDP ld)
FILE * open_file_for_writing(const char *filename)
LDP ld_read_smart(FILE *)
struct option * options_allocate(int n)
void options_int(struct option *, const char *name, int *p, int def_value, const char *desc)
void sm_debug_write(int flag)
FILE * open_file_for_reading(const char *filename)
void options_print_help(struct option *options, FILE *f)
int main(int argc, const char **argv)
void options_string(struct option *, const char *name, const char **p, const char *def_balue, const char *desc)
double max_theta_error_deg
void sm_error(const char *msg,...)
int options_parse_args(struct option *ops, int argc, const char *argv[])