-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
45 lines (29 loc) · 949 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
##
# @file run.py
#
# @brief Provide executation of the program.
#
# @section author_doxygen_example Author(s)
# - Created by Tran Viet Thanh on 2024/08/01
# External library
# Internal library
from visualizers.plotter import Plotter
from simulators.time_stepping import TimeStepping
from models.trailer_tractor import TrailerTractor
from trajectory_generators.backward_recovery import BackwardRecovery
def main():
T = 4
dt = 0.1
model = TrailerTractor(0.1)
trajectory_generator = BackwardRecovery(model, T, dt)
simulator = TimeStepping(model, T, dt)
visualizer = Plotter(simulator)
inital_position = [0, 0, 0, 0]
final_position = [1, 1, 0, 0]
u = trajectory_generator.generate_trajectory(
inital_position, final_position)
simulator.run(inital_position, u)
visualizer.plot()
if __name__ == '__main__':
main()