From 93e610470039408d0005fca240fd2a5ccad13efb Mon Sep 17 00:00:00 2001 From: "Calvin O." Date: Mon, 27 Jan 2025 15:23:52 +1100 Subject: [PATCH] changed origin robot pose to a none local variable --- controllers/reef_intake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reef_intake.py b/controllers/reef_intake.py index 7b95239..46ad9a9 100644 --- a/controllers/reef_intake.py +++ b/controllers/reef_intake.py @@ -45,10 +45,10 @@ def intaking(self, initial_call: bool): @state(must_finish=True) def safing(self, initial_call: bool): if initial_call: - origin_robot_pose = self.chassis.get_pose() + self.origin_robot_pose = self.chassis.get_pose() robot_pose = self.chassis.get_pose() - distance = origin_robot_pose.translation() - robot_pose.translation() + distance = self.origin_robot_pose.translation() - robot_pose.translation() if distance.norm() >= self.UNSAFE_DISTANCE: self.done()