mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
fix bug
This commit is contained in:
parent
3a06ec4ef8
commit
3244f0246c
2 changed files with 5 additions and 5 deletions
|
|
@ -15,8 +15,8 @@ def talker():
|
|||
rospy.init_node("display", anonymous=True)
|
||||
|
||||
print("Try connect real mypal...")
|
||||
port = rospy.get_param("~port", "/dev/ttyUSB0")
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0")
|
||||
baud = rospy.get_param("~baud", 1000000)
|
||||
print("port: {}, baud: {}\n".format(port, baud))
|
||||
try:
|
||||
mypa = MyPalletizer(port, baud)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ def callback(data):
|
|||
data_list = []
|
||||
for index, value in enumerate(data.position):
|
||||
data_list.append(value)
|
||||
del data_list[3] # delete the angle of joint3 to joint4,because it do not exsist actually! 把joint3到joint4的角度删掉,因为它实际上不存在!
|
||||
# del data_list[3] # delete the angle of joint3 to joint4,because it do not exsist actually! 把joint3到joint4的角度删掉,因为它实际上不存在!
|
||||
# data_list[3] = data_list[4]
|
||||
# print(data_list)
|
||||
mc.send_radians(data_list, 80)
|
||||
|
|
@ -38,8 +38,8 @@ def listener():
|
|||
rospy.init_node("control_slider", anonymous=True)
|
||||
|
||||
rospy.Subscriber("joint_states", JointState, callback)
|
||||
port = rospy.get_param("~port", "/dev/ttyUSB0") # Select connected device. 选择连接设备
|
||||
baud = rospy.get_param("~baud", 115200)
|
||||
port = rospy.get_param("~port", "/dev/ttyAMA0") # Select connected device. 选择连接设备
|
||||
baud = rospy.get_param("~baud", 1000000)
|
||||
print(port, baud)
|
||||
mc = MyPalletizer(port, baud)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue