mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
change baud
This commit is contained in:
parent
63d872461b
commit
cca5330483
1 changed files with 3 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue