From f674be3722932499058b729161c8c97fe90bf26d Mon Sep 17 00:00:00 2001 From: weijian Date: Tue, 11 Oct 2022 17:14:18 +0800 Subject: [PATCH] fix mycobot_topics_pi.py --- mycobot_communication/scripts/mycobot_topics_pi.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mycobot_communication/scripts/mycobot_topics_pi.py b/mycobot_communication/scripts/mycobot_topics_pi.py index f40ef07..f529c53 100755 --- a/mycobot_communication/scripts/mycobot_topics_pi.py +++ b/mycobot_communication/scripts/mycobot_topics_pi.py @@ -18,8 +18,8 @@ from mycobot_communication.msg import ( ) - -from pymycobot import MyCobotSocket +from pymycobot import MyCobot +# from pymycobot import MyCobotSocket class Watcher: @@ -77,8 +77,9 @@ class MycobotTopics(object): port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1]) baud = rospy.get_param("~baud", 1000000) rospy.loginfo("%s,%s" % (port, baud)) - self.mc = MyCobotSocket(port, baud) # port - self.mc.connect() #pi + # self.mc = MyCobotSocket(port, baud) # port + # self.mc.connect() #pi + self.mc = MyCobot(port, baud) self.lock = threading.Lock() def start(self):