mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
add test
This commit is contained in:
@@ -9,7 +9,7 @@ Ref:
|
||||
- Python implementation of 'Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time' paper
|
||||
by Michael Szmuk and Behçet Açıkmeşe.
|
||||
|
||||
- inspired by EmbersArc/SuccessiveConvexificationFreeFinalTime: Implementation of "Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time" https://github.com/EmbersArc/SuccessiveConvexificationFreeFinalTime
|
||||
- EmbersArc/SuccessiveConvexificationFreeFinalTime: Implementation of "Successive Convexification for 6-DoF Mars Rocket Powered Landing with Free-Final-Time" https://github.com/EmbersArc/SuccessiveConvexificationFreeFinalTime
|
||||
|
||||
"""
|
||||
|
||||
@@ -35,6 +35,8 @@ W_NU = 1e5 # virtual control
|
||||
solver = 'ECOS'
|
||||
verbose_solver = False
|
||||
|
||||
show_animation = True
|
||||
|
||||
|
||||
class Integrator:
|
||||
def __init__(self, m, K):
|
||||
@@ -656,7 +658,8 @@ def main():
|
||||
print(f'Converged after {it + 1} iterations.')
|
||||
break
|
||||
|
||||
plot_animation(X, U)
|
||||
if show_animation:
|
||||
plot_animation(X, U)
|
||||
|
||||
print("done!!")
|
||||
|
||||
|
||||
14
tests/test_rocket_powered_landing.py
Normal file
14
tests/test_rocket_powered_landing.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from unittest import TestCase
|
||||
|
||||
import sys
|
||||
sys.path.append("./AerialNavigation/rocket_powered_landing/")
|
||||
|
||||
from AerialNavigation.rocket_powered_landing import rocket_powered_landing as m
|
||||
print(__file__)
|
||||
|
||||
|
||||
class Test(TestCase):
|
||||
|
||||
def test1(self):
|
||||
m.show_animation = False
|
||||
m.main()
|
||||
Reference in New Issue
Block a user