Skip to content

Commit

Permalink
adjusted delay a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
julienthevenoz committed Jan 26, 2024
1 parent 5df38dc commit a38ece8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions systemtests/plotter_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def __init__(self, sim_backend = False):

self.SIM = sim_backend #indicates if we are plotting data from real life test or from a simulated test. Default is false (real life test)
self.EPSILON = 0.05 # euclidian distance in [m] between ideal and recorded trajectory under which the drone has to stay to pass the test
self.DELAY_CONST_FIG8 = 0 #4.75 #this is the delay constant which I found by adding up all the time.sleep() etc in the figure8.py file.
self.DELAY_CONST_FIG8 = 4.75 #this is the delay constant which I found by adding up all the time.sleep() etc in the figure8.py file.
if self.SIM : #It allows to temporally adjust the ideal and real trajectories on the graph. Could this be implemented in a better (not hardcoded) way ?
self.DELAY_CONST_FIG8 = 0 #1.35 #5.45 #for an unknown reason, the delay constant with the sim_backend is slightly different
self.DELAY_CONST_FIG8 = -0.18 #for an unknown reason, the delay constant with the sim_backend is slightly different
self.ALTITUDE_CONST_FIG8 = 1 #this is the altitude given for the takeoff in figure8.py. I should find a better solution than a symbolic constant ?
self.ALTITUDE_CONST_MULTITRAJ = 1 #takeoff altitude for traj0 in multi_trajectory.py
self.X_OFFSET_CONST_MULTITRAJ = -0.3 #offest on the x axis between ideal and real trajectory. Reason: ideal trajectory (traj0.csv) starts with offset of 0.3m and CrazyflieServer.startTrajectory() is relative to start position
Expand Down
10 changes: 5 additions & 5 deletions systemtests/test_flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ def test_figure8(self):
test_passed = self.translate_plot_and_check("figure8")
test_passed, "figure8 test failed : deviation larger than epsilon"

# def test_multi_trajectory(self):
# self.test_file = "../crazyflie_examples/crazyflie_examples/data/multi_trajectory/traj0.csv"
# self.record_start_and_clean("multi_trajectory", 80)
# test_passed = self.translate_plot_and_check("multi_trajectory")
# assert test_passed, "multitrajectory test failed : deviation larger than epsilon"
def test_multi_trajectory(self):
self.test_file = "../crazyflie_examples/crazyflie_examples/data/multi_trajectory/traj0.csv"
self.record_start_and_clean("multi_trajectory", 80)
test_passed = self.translate_plot_and_check("multi_trajectory")
assert test_passed, "multitrajectory test failed : deviation larger than epsilon"



Expand Down

0 comments on commit a38ece8

Please sign in to comment.