mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
fix
This commit is contained in:
parent
d3f50a768b
commit
3aa412babd
1 changed files with 5 additions and 6 deletions
|
|
@ -17,21 +17,20 @@ from pymycobot.mycobot import MyCobot
|
|||
|
||||
mc = None
|
||||
|
||||
|
||||
def callback(data):
|
||||
# rospy.loginfo(rospy.get_caller_id() + "%s", data.position)
|
||||
# print('data_position======================>',data.position)
|
||||
|
||||
data_list = []
|
||||
for index, value in enumerate(data.position):
|
||||
data_list.append(value)
|
||||
|
||||
mc.send_radians(data_list, 80)
|
||||
# print('data_list=====================>',data_list)
|
||||
# time.sleep(0.5)
|
||||
|
||||
# time.sleep(0.5)
|
||||
|
||||
def listener():
|
||||
global mc
|
||||
|
||||
rospy.init_node("control_slider", anonymous=True)
|
||||
|
||||
rospy.Subscriber("joint_states", JointState, callback)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue