22 {
23 boost::program_options::options_description boost_desc("Allowed options");
24 boost_desc.add_options()("help", "produce help message")(
25 "input_poses_path", boost::program_options::value<std::string>(),
26 "provide input poses path")("ref_timestamps_path",
27 boost::program_options::value<std::string>(),
28 "provide reference timestamp path")(
29 "extrinsic_path", boost::program_options::value<std::string>(),
30 "provide velodyne extrinsic path")(
31 "output_poses_path", boost::program_options::value<std::string>(),
32 "provide output poses path");
33
34 boost::program_options::variables_map boost_args;
35 boost::program_options::store(
36 boost::program_options::parse_command_line(argc, argv, boost_desc),
37 boost_args);
38 boost::program_options::notify(boost_args);
39
40 if (boost_args.count("help") || !boost_args.count("input_poses_path") ||
41 !boost_args.count("ref_timestamps_path") ||
42 !boost_args.count("extrinsic_path") ||
43 !boost_args.count("output_poses_path")) {
45 return 0;
46 }
47
48 std::string input_poses_path =
49 boost_args["input_poses_path"].as<std::string>();
50 std::string ref_timestamps_path =
51 boost_args["ref_timestamps_path"].as<std::string>();
52 std::string extrinsic_path = boost_args["extrinsic_path"].as<std::string>();
53 std::string out_poses_path =
54 boost_args["output_poses_path"].as<std::string>();
55
57 bool success = pose_interpolation.
Init(input_poses_path, ref_timestamps_path,
58 out_poses_path, extrinsic_path);
59
60 if (success) {
61 pose_interpolation.DoInterpolation();
62 }
63
64 return 0;
65}
bool Init(const std::string &input_poses_path, const std::string &ref_timestamps_path, const std::string &out_poses_path, const std::string &extrinsic_path)