I want to control 10 dynamixel motors using ROS Python. I am succeeding up to 6 motors at a time but not all
I want to control 10 Dynamixel motors using ROS PYTHON, I am succeeded to control 6 motors at a time. But while not all 10. What should i do to move them using my slider control program, As i started my executing my code ALL MOTORS ARE MOVING IN RANDOM DIRECTION
HERE IS MY CODE
#!/usr/bin/env python
import sys
import time
import rospy
from std_msgs.msg import Float64
from Tkinter import *
rospy.init_node('adi', anonymous=True)
pub1 = rospy.Publisher('/joint1/command', Float64, queue_size=10)
.
.
.
pub10 = rospy.Publisher('/joint10/command', Float64, queue_size=10)
def a():
pub1.publish(3) # It sets the motor to center position
.
.
.
.
pub10.publish(3)
print w1.get(), w2.get() , w3.get(), w4.get() , w5.get() , w6.get() , w7.get() , w8.get() , w9.get() , w10.get()
pub1.publish(w1.get()*0.01)
.
.
.
.
pub10.publish(w10.get()*0.01)
master = Tk()
master.title("ADI")
w1 = Scale(master, from_=-360, to=360, orient=HORIZONTAL,length=300)
w1.pack()
.
.
.
w10 = Scale(master, from_=-360, to=360, orient=HORIZONTAL,length=300)
w10.pack()
Button(master, text='Move', command=a).pack()
a()
master.mainloop()
Could it be related to the fact that your
shift
orcaps-lock
keys seem to be stuck?I've fixed your question title. Please don't use ALL CAPS for titles; it's the online equivalent of shouting and is considered rude on this forum.