From 461641621c239d0ac2e062d938afbd1e2c35cfc1 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Wed, 19 Jan 2022 13:35:55 +0100 Subject: [PATCH] Add test54, update template with reset --- CMakeLists.txt | 3 +++ src/template-with-reset.cc | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6ec182..ab99995 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,3 +38,6 @@ target_compile_definitions(test52 PRIVATE OSP=P36) add_executable(test53 src/template.cc) target_compile_definitions(test53 PRIVATE OSP=P38) + +add_executable(test54 src/template-with-reset.cc) +target_compile_definitions(test54 PRIVATE OSP=P39) diff --git a/src/template-with-reset.cc b/src/template-with-reset.cc index 3060190..c9f3ea0 100644 --- a/src/template-with-reset.cc +++ b/src/template-with-reset.cc @@ -20,6 +20,8 @@ int main() std::cout << std::fixed; std::cerr << std::fixed; assert(jvi["slot"] != Json::nullValue); + rrts::Ter ip_time; + ip_time.start(); bcar::ParkingSlot s( jvi["slot"][0][0].asDouble(), jvi["slot"][0][1].asDouble(), jvi["slot"][1][0].asDouble(), jvi["slot"][1][1].asDouble(), @@ -36,6 +38,7 @@ int main() s.swap_side(); pr.reflect(s.entry()); } + std::cerr << ip_time.scnt() << std::endl; // The following uses precomputed entries and needs `"fiat_punto.h"` to // be included. //auto pr = get_fiat_punto_entry(s.len(), s.w()); @@ -71,6 +74,9 @@ int main() jvi["goal"][1] = pr.y(); jvi["goal"][2] = pr.b(); jvi["goal"][3] = pr.e(); + jvi["goal_inside"][0] = ispath.back().x(); + jvi["goal_inside"][1] = ispath.back().y(); + jvi["goal_inside"][2] = ispath.back().h(); p.json(jvi); unsigned int icnt = 0; unsigned int rcnt = 0; -- 2.39.2