ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

I want to control 10 dynamixel motors using ROS Python. I am succeeding up to 6 motors at a time but not all

asked 2017-06-03 05:42:57 -0500

ADIROSGAZ gravatar image

updated 2017-06-03 21:22:10 -0500

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()
edit retag flag offensive close merge delete

Comments

2

Could it be related to the fact that your shift or caps-lock keys seem to be stuck?

gvdhoorn gravatar image gvdhoorn  ( 2017-06-03 06:16:04 -0500 )edit
1

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.

ahendrix gravatar image ahendrix  ( 2017-06-03 14:54:50 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2018-03-15 02:08:12 -0500

ADIROSGAZ gravatar image

I used 2 different files a1.py & a2.py to write 2 different functions of five arguments (for each motor) in each py file. i called those functions from other py file to communicate to the motors at a time. I succeeded for my operation what i want to do.

edit flag offensive delete link more
0

answered 2018-03-14 10:11:20 -0500

This looks like a voltage drop issue. In our arm we have 7 motors, we supply 14 V to the first and the last receives about 11 V ... so for 10 motors this might be the problem. Additionally it captures my attention that you are not using dynamixel_motor drivers which has 111 forks!

edit flag offensive delete link more

Comments

Thanks for your reply, But it is not related to the Voltage drop. I didn't find any voltage drop in it & i am using the same dynamixel motor drivers.Kindly see my answer i solved it.

ADIROSGAZ gravatar image ADIROSGAZ  ( 2018-03-15 02:02:06 -0500 )edit
0

answered 2018-03-15 02:22:53 -0500

Darby Lim gravatar image

Hello :)

You can try with another package. How about official ROBOTIS package for controlling DYNAMIXEL such as Dynamixel SDK or Dynamixel-Workbench?

If you want to any information, please visit emanual

Thanks

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-03 05:42:57 -0500

Seen: 1,094 times

Last updated: Mar 15 '18