From 836a02d57c9daf509aeac2cfab053fda0a9293c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Fri, 18 Aug 2023 11:15:42 +0200 Subject: [PATCH] optimize --- rmp220_middleware/rmp220_middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmp220_middleware/rmp220_middleware.py b/rmp220_middleware/rmp220_middleware.py index 762bfbc..5d863d2 100644 --- a/rmp220_middleware/rmp220_middleware.py +++ b/rmp220_middleware/rmp220_middleware.py @@ -94,7 +94,7 @@ class StateMachineNode(Node): self.state = State.ENABLED self.get_logger().info("State: ENABLED (cmd_vel)") self.enable_chassis() - else: + if self.state == State.DISABLED and (self.abs_x < 0.1 and self.abs_z < 0.1): self.cmd_vel_pub.publish(self.twist) def main(args=None):