add aikit-320 ros

This commit is contained in:
weijian 2023-06-13 14:39:18 +08:00
parent 383a82f5e6
commit 2d590cc13c

View file

@ -152,9 +152,11 @@ class MycobotTopics(object):
ma = MycobotAngles() ma = MycobotAngles()
while not rospy.is_shutdown(): while not rospy.is_shutdown():
if self.mc: if self.mc:
self.lock.acquire() # self.lock.acquire()
lock = acquire("/tmp/mycobot_lock")
angles = self.mc.get_angles() angles = self.mc.get_angles()
self.lock.release() release(lock)
# self.lock.release()
if angles: if angles:
ma.joint_1 = angles[0] ma.joint_1 = angles[0]
ma.joint_2 = angles[1] ma.joint_2 = angles[1]