From 71c82855833552f136960905a48fa36aed26b260 Mon Sep 17 00:00:00 2001 From: ermolaev_p Date: Mon, 2 Dec 2024 12:46:10 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=81=D0=B8=D0=B3=D0=BD=D0=B0=D0=BB=20Oncomming?= =?UTF-8?q?,=20=D0=B1=D0=B5=D0=B7=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/system_params.json | 17 +++++++++-------- src/utils/diagram_parser.py | 5 ++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/params/system_params.json b/params/system_params.json index 017e7fb..5749167 100644 --- a/params/system_params.json +++ b/params/system_params.json @@ -1,11 +1,11 @@ { "a_max_1": 5.41, - "v_max_1": 0.108, + "v_max_1": 0.278, "a_max_2": 35.81, - "v_max_2": 0.678, - "mass_1": 257, + "v_max_2": 0.7, + "mass_1": 270, "mass_2": 1, - "k_hardness_1": 1759291, + "k_hardness_1": 2148570, "k_hardness_2": 0, "torque_max_1": 20, "torque_max_2": 0, @@ -13,11 +13,12 @@ "transmission_ratio_2": 1, "position_start_1": 0.08, "position_start_2": 0.08, - "k_prop": 0.05, - "time_capture": 100000, + "k_prop": 0.075, + "time_capture": 10, "UML_time_scaler": 1000, "Closure_signal": "Closing", "Squeeze_signal": "Squeeze", "Welding_signal": "Welding", - "Release_signal": "Relief" -} + "Release_signal": "Relief", + "Oncomming_signal": "Oncomming" +} \ No newline at end of file diff --git a/src/utils/diagram_parser.py b/src/utils/diagram_parser.py index 5c7451d..c72559a 100644 --- a/src/utils/diagram_parser.py +++ b/src/utils/diagram_parser.py @@ -7,7 +7,8 @@ class DiagramParser: self.signals = [system_config["Closure_signal"], system_config["Squeeze_signal"], system_config["Welding_signal"], - system_config["Release_signal"]] + system_config["Release_signal"], + system_config["Oncomming_signal"]] self.boolDict = {} self.floatDict = {} @@ -22,6 +23,7 @@ class DiagramParser: for signalName in self.data.columns: if type (self.data[signalName].iloc[0]) == np.bool: + print("!", signalName) self.boolDict[signalName] = self._getBoolChanges(signalName) for signalName in self.data.columns: @@ -33,6 +35,7 @@ class DiagramParser: elif key == self.signals[1]: name = "compression" elif key == self.signals[2]: name = "welding" elif key == self.signals[3]: name = "opening" + elif key == self.signals[4]: name = "oncomming" self.timingsDict[name] = [] len_items = len(items)