From 2d590cc13c36ddb4b6b4f23358c8a0b39d5c41a7 Mon Sep 17 00:00:00 2001 From: weijian Date: Tue, 13 Jun 2023 14:39:18 +0800 Subject: [PATCH] add aikit-320 ros --- .../mycobot_320_communication/scripts/mycobot_topics_pi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mycobot_320/mycobot_320_communication/scripts/mycobot_topics_pi.py b/mycobot_320/mycobot_320_communication/scripts/mycobot_topics_pi.py index ac1f449..146dfb3 100755 --- a/mycobot_320/mycobot_320_communication/scripts/mycobot_topics_pi.py +++ b/mycobot_320/mycobot_320_communication/scripts/mycobot_topics_pi.py @@ -152,9 +152,11 @@ class MycobotTopics(object): ma = MycobotAngles() while not rospy.is_shutdown(): if self.mc: - self.lock.acquire() + # self.lock.acquire() + lock = acquire("/tmp/mycobot_lock") angles = self.mc.get_angles() - self.lock.release() + release(lock) + # self.lock.release() if angles: ma.joint_1 = angles[0] ma.joint_2 = angles[1]