mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
fix mycobot_topics_pi.py
This commit is contained in:
parent
458930ca4f
commit
f674be3722
1 changed files with 5 additions and 4 deletions
|
|
@ -18,8 +18,8 @@ from mycobot_communication.msg import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
from pymycobot import MyCobot
|
||||||
from pymycobot import MyCobotSocket
|
# from pymycobot import MyCobotSocket
|
||||||
|
|
||||||
|
|
||||||
class Watcher:
|
class Watcher:
|
||||||
|
|
@ -77,8 +77,9 @@ class MycobotTopics(object):
|
||||||
port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
port = rospy.get_param("~port", os.popen("ls /dev/ttyAMA*").readline()[:-1])
|
||||||
baud = rospy.get_param("~baud", 1000000)
|
baud = rospy.get_param("~baud", 1000000)
|
||||||
rospy.loginfo("%s,%s" % (port, baud))
|
rospy.loginfo("%s,%s" % (port, baud))
|
||||||
self.mc = MyCobotSocket(port, baud) # port
|
# self.mc = MyCobotSocket(port, baud) # port
|
||||||
self.mc.connect() #pi
|
# self.mc.connect() #pi
|
||||||
|
self.mc = MyCobot(port, baud)
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue