3 #include <jsoncpp/json/json.h>
7 std::chrono::high_resolution_clock::time_point TSTART_;
8 std::chrono::high_resolution_clock::time_point TEND_;
9 inline void TSTART() { TSTART_ = std::chrono::high_resolution_clock::now(); }
10 inline void TEND() { TEND_ = std::chrono::high_resolution_clock::now(); }
13 std::chrono::duration<double> DT_;
14 DT_ = std::chrono::duration_cast<std::chrono::duration<double>>(
19 inline void TPRINT(const char *what)
21 std::cerr << what << ": " << TDIFF() << std::endl;
26 Json::Value jvi; // JSON input
27 Json::Value jvo; // JSON output
30 if (jvi["init"] == Json::nullValue) {
31 std::cerr << "I need `init` in JSON input scenario";
32 std::cerr << std::endl;
36 if (jvi["goal"] == Json::nullValue) {
37 std::cerr << "I need `goal` in JSON input scenario";
38 std::cerr << std::endl;
42 if (jvi["goals"] == Json::nullValue) {
43 std::cerr << "I need `goals` in JSON input scenario";
44 std::cerr << std::endl;
48 if (jvi["obst"] == Json::nullValue) {
49 std::cerr << "I need `obst` in JSON input scenario";
50 std::cerr << std::endl;
54 std::cout << jvo << std::endl;