change baud

This commit is contained in:
wangWking 2022-05-05 14:31:42 +08:00
parent 63d872461b
commit cca5330483

View file

@ -25,12 +25,10 @@ def callback(data):
def listener(): def listener():
global mc global mc
rospy.init_node("mycobot_reciver", anonymous=True) rospy.init_node("mycobot_reciver", anonymous=True)
port = subprocess.check_output(['echo -n /dev/ttyAMA*'],
shell=True)
port = rospy.get_param("~port", port) port = rospy.get_param("~port", "/dev/ttyAMA0")
baud = rospy.get_param("~baud", 1000000) baud = rospy.get_param("~baud", 115200)
# 1000000 # 115200
mc = MyCobot(port, baud) mc = MyCobot(port, baud)
rospy.Subscriber("joint_states", JointState, callback) rospy.Subscriber("joint_states", JointState, callback)