arebgun / dynamixel_motor

ROS stack for interfacing with Robotis Dynamixel line of servo motors.
BSD 3-Clause "New" or "Revised" License
70 stars 169 forks source link

serial read poor speed #84

Open ashsifat opened 6 years ago

ashsifat commented 6 years ago

Hello, Can anyone please tell me why it is taking 0.015 sec for me just to read 22 bytes from the serial port? i am attaching the code below. I use a modified version of this package and try to use the ser.read in the dynamixel_driver/dynamixel_io functions. I use FTDI USBcomm 485 port and have 2 dynamixel xh430 motors in the daisy chain.

    t0=time.time()  
        # read response
    self.data.extend(self.ser.read(22))
    timestamp = time.time()
    print "read_spent_time", timestamp-t0

output: read_spent_time 0.01518201828

ashsifat commented 6 years ago

improvised by making timeout shorter. but if timeour reduced much, cannot catch the data.