From 32a44d4340a354e9452abeed82a8efc2926ad2b5 Mon Sep 17 00:00:00 2001 From: Hongkai Dai Date: Fri, 21 Apr 2023 16:55:41 -0700 Subject: [PATCH] Throw errors when running dubins car demo. --- .../examples/car/train_acceleration_car_demo.py | 3 +++ neural_network_lyapunov/examples/car/train_unicycle_demo.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/neural_network_lyapunov/examples/car/train_acceleration_car_demo.py b/neural_network_lyapunov/examples/car/train_acceleration_car_demo.py index 5452ce52..124ae218 100644 --- a/neural_network_lyapunov/examples/car/train_acceleration_car_demo.py +++ b/neural_network_lyapunov/examples/car/train_acceleration_car_demo.py @@ -73,6 +73,9 @@ def compute_delta_pos(model, network_input): if __name__ == "__main__": + raise Exception("Dubins car cannot be stabilized by a continuous controller, refer" + + "to https://arxiv.org/pdf/math/9902026.pdf for a proof. Using" + + "neural-network controllers is doomed to fail for Dubins car.") parser = argparse.ArgumentParser( description="Acceleration car training demo") parser.add_argument("--generate_dynamics_data", action="store_true") diff --git a/neural_network_lyapunov/examples/car/train_unicycle_demo.py b/neural_network_lyapunov/examples/car/train_unicycle_demo.py index 2dd3e7a3..f8196542 100644 --- a/neural_network_lyapunov/examples/car/train_unicycle_demo.py +++ b/neural_network_lyapunov/examples/car/train_unicycle_demo.py @@ -153,6 +153,9 @@ def compute_v(model, x): if __name__ == "__main__": + raise Exception("Dubins car cannot be stabilized by a continuous controller, refer" + + "to https://arxiv.org/pdf/math/9902026.pdf for a proof. Using" + + "neural-network controllers is doomed to fail for Dubins car.") parser = argparse.ArgumentParser(description="Unicycle training demo") parser.add_argument("--generate_dynamics_data", action="store_true") parser.add_argument("--load_dynamics_data",