From c16897b2475a6dae8000756a2faebad84d49dfc7 Mon Sep 17 00:00:00 2001 From: Martin Huynh Date: Wed, 24 Jan 2024 17:26:06 +0100 Subject: [PATCH] Changed magic number to be like Ivan sim (still not work) --- guidance/los_guidance/los_guidance/los_guidance.py | 2 +- .../vessel_simulator/vessel_simulator/vessel_simulator_node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guidance/los_guidance/los_guidance/los_guidance.py b/guidance/los_guidance/los_guidance/los_guidance.py index f0584022..b3486e1e 100644 --- a/guidance/los_guidance/los_guidance/los_guidance.py +++ b/guidance/los_guidance/los_guidance/los_guidance.py @@ -4,7 +4,7 @@ class LOSGuidance: def __init__(self, p0: list[float], p1: list[float]): self.set_path(p0, p1) - self.heading_ref = 30*np.pi/180 # magic init number!!! + self.heading_ref = 50*np.pi/180 # magic init number!!! def set_path(self, p0: list[float], p1: list[float]): self.p0 = np.array(p0) diff --git a/motion/vessel_simulator/vessel_simulator/vessel_simulator_node.py b/motion/vessel_simulator/vessel_simulator/vessel_simulator_node.py index e13ccf25..3fdfc4b1 100644 --- a/motion/vessel_simulator/vessel_simulator/vessel_simulator_node.py +++ b/motion/vessel_simulator/vessel_simulator/vessel_simulator_node.py @@ -104,7 +104,7 @@ def wrench_input_cb(self, msg): self.x_history[self.num_steps_simulated] = x_next self.x_ref_history[self.num_steps_simulated, : ] = self.x_ref self.u_history[self.num_steps_simulated] = u - print(f"self.x_ref_history[{self.num_steps_simulated}]: {self.x_ref_history[self.num_steps_simulated]}") + # print(f"self.x_ref_history[{self.num_steps_simulated}]: {self.x_ref_history[self.num_steps_simulated]}") if (self.num_steps_simulated >= self.num_steps): self.plot_history()