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

Madhu's profile - activity

2017-10-25 15:27:04 -0500 received badge  Famous Question (source)
2016-01-25 08:25:29 -0500 received badge  Notable Question (source)
2015-06-19 08:50:18 -0500 received badge  Popular Question (source)
2015-06-17 07:36:16 -0500 asked a question Trouble communicating with Dynamixel in Python

I am using Dynamixel 106+ those were connected to some manipulator.Initially the people worked on that manipulator developed the code and used them in C++ in ROS Fuerte. With using those codes ,they worked ..

When I come to work on on those I used the code of Python in Ros Indigo.After running those motors through C++ they worked properly,immediately after I connected the same motors with Ros indigo Python.They were pinged and showed the motor IDs and all.Later on when I published the position they worked fine for first,and from the next time the motors are neither responding to my publishing data not to that C++ code. What should I do.??

Am usng Python 2.7.6..

Its the program that I used for Publishing position in python ..

#!/usr/bin/env python
import roslib;roslib.load_manifest('dynamixel_tutorials')
import rospy
from std_msgs.msg import Float64

if __name__ =="__main__":
    rospy.init_node("Publisher")
    pub = rospy.Publisher('/motor1/command', Float64)
    r = rospy.Rate(10)
    if not rospy.is_shutdown():
        counter = -15
        i=0
        while (True):
            int = counter*3.14/180  #Converting degrees to radians.
            pub.publish(int)
    #This part ensures that the input is sent continously clockwise and anti-clockwise.
            if(counter == 15):
                i=1
            elif(counter == -15):
                i=0
            if(i==1):
                counter-=1
            elif(i==0):
                counter+=1
            r.sleep()

help me out..