Loading ...
Sorry, an error occurred while loading the content.

Re: Question about the Dynamixel_util tool

Expand Messages
  • gengiskanhg
    Right now, I return to this thread because I thing it is the better. Actually this question is related to control a AX12-Dynamixel engine (robot) under
    Message 1 of 13 , Apr 1, 2010
    • 0 Attachment
      Right now, I return to this thread because I thing it is the better. Actually this question is related to control a AX12-Dynamixel engine (robot) under GNU/Linux with the Tekkotsu and through the iDynaBus firmware loaded in the uC Propeller Demo Board.

      I am in contact with the iDynabus' author and that thread is here:
      http://forum.agaverobotics.com/viewtopic.php?f=7&t=3&p=77#p77

      Because the company (a third part) said that this interface works exactly the same as the USB2Dynamixel we decided to buy such one (the propeller board) Right now I realize that this is not exactly the same. So I am looking for information in order to decide if I make up some work to use it or just buy the direct interface.

      --

      Using the dynamixel_tool I am able to control the dynamixels with the dynamixel_tool of Tekkotsu project but I get errors (as reported at the beginning of this thread)

      ./dynamixel_util write 1 30=100 2
      "Servo 1...ERROR: Received response with bad checksum, cannot verify successful"

      Nevertheless, using the "move" command, it most of the times says...
      ./dynamixel_util move 1 512
      "verified" and no error is present.

      In both case the movement is done.

      Having proved with different velocities and sleep times, I realize that the described problem with the time between two ./dynamixel_tool commands is because of, - at least in part -, the second command is given while the first move is being in process. I have changed the "sleep 2" in my command with an ENTER input, so I can give the next command when the first is done and so the movement is always done. Is this behavior as expected in a direct 1000000 connection?

      what do you thing about?

      Regards.

      P.S. I hope all these information help others as well.
    • gengiskanhg
      Hello Ethan and community: I have written this simple script based in ./dynamixel_util in order to prove my interface. I want to isolate my problem so it will
      Message 2 of 13 , Apr 7, 2010
      • 0 Attachment
        Hello Ethan and community:

        I have written this simple script based in ./dynamixel_util in order to prove my interface. I want to isolate my problem so it will be very good if you or someone from the community can run it.

        My problem is that with an "sleep" smaller than 2, this means 1 or 0 I get error and the next moves are not done.

        What will be the normal servo response when two "move" instruction to the same servo are send together in this way?

        Thanks.


        #!/bin/bash
        #This script oscillate the Dynamixel Servo ID=1
        #Using dynamixel_util from Tekkotsu project
        #Interface between AX-12 bus and PC with the Propeller Demo Board with iPropMix as firmware.
        #Script to be run in the same dir as ./dynamixel_util

        usage () {
        echo
        echo "Usage: $0 <start position> <second position> <speed
        >"
        echo
        }

        # Check command-line arguments
        if [ -z "$3" ]; then
        usage
        exit 1
        fi

        t=2 #Time to wait between moves
        echo "Ctrl+c to exit"
        while [ 1 ]
        do
        ./dynamixel_util move 1 $1 $3;
        sleep $t
        ./dynamixel_util move 1 $2 $3;
        sleep $t
        done
      • gengiskanhg
        Trying to simplify my problem: $ more basicProve #!/bin/bash time=$1 for x in $(seq 1 10) do ./dynamixel_util scan 1 echo sleeping $time s. sleep $time
        Message 3 of 13 , Apr 8, 2010
        • 0 Attachment
          Trying to simplify my problem:

          $ more basicProve
          #!/bin/bash
          time=$1
          for x in $(seq 1 10)
          do
          ./dynamixel_util scan 1
          echo "sleeping "$time" s."
          sleep $time
          done

          $ ./basicProve 2
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 2 s.
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 2 s.
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 2 s.
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 2 s.
          ^C


          $ ./basicProve 1
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 1 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 1 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 1 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 1 s.
          ^C

          $ ./basicProve 0
          Opening comm port...done!
          Servo 1: AX-12 detected
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: not found
          sleeping 0 s.
          Opening comm port...done!
          Servo 1: ^C

          $ ./dynamixel_util conf
          Baud = 115200
          DataBits = 8
          Mode = 60
          Parity = NONE
          Path = /dev/ttyUSB0
          StopBits = 1
          TTYFlags =
          Timeout = 100

          $ ./dynamixel_util read 1
          Opening comm port...done!
          Sending query...
          Reading response...
          ADDRESS VALUE
          0 (0x00) 12 (0x0c)
          1 (0x01) 0 (0x00)
          2 (0x02) 24 (0x18)
          3 (0x03) 1 (0x01)
          4 (0x04) 1 (0x01)
          5 (0x05) 2 (0x02)
          6 (0x06) 0 (0x00)
          7 (0x07) 0 (0x00)
          8 (0x08) 255 (0xff)
          9 (0x09) 3 (0x03)
          10 (0x0a) 0 (0x00)
          11 (0x0b) 70 (0x46)
          12 (0x0c) 60 (0x3c)
          13 (0x0d) 140 (0x8c)
          14 (0x0e) 255 (0xff)
          15 (0x0f) 3 (0x03)
          16 (0x10) 2 (0x02)
          17 (0x11) 36 (0x24)
          18 (0x12) 36 (0x24)
          19 (0x13) 0 (0x00)
          20 (0x14) 49 (0x31)
          21 (0x15) 0 (0x00)
          22 (0x16) 208 (0xd0)
          23 (0x17) 3 (0x03)
          24 (0x18) 1 (0x01)
          25 (0x19) 0 (0x00)
          26 (0x1a) 1 (0x01)
          27 (0x1b) 1 (0x01)
          28 (0x1c) 32 (0x20)
          29 (0x1d) 32 (0x20)
          30 (0x1e) 7 (0x07)
          31 (0x1f) 2 (0x02)
          32 (0x20) 0 (0x00)
          33 (0x21) 0 (0x00)
          34 (0x22) 255 (0xff)
          35 (0x23) 3 (0x03)
          36 (0x24) 7 (0x07)
          37 (0x25) 2 (0x02)
          38 (0x26) 0 (0x00)
          39 (0x27) 0 (0x00)
          40 (0x28) 0 (0x00)
          41 (0x29) 0 (0x00)
          42 (0x2a) 97 (0x61)
          43 (0x2b) 35 (0x23)
          44 (0x2c) 0 (0x00)
          45 (0x2d) 0 (0x00)
          46 (0x2e) 0 (0x00)
          47 (0x2f) 0 (0x00)
          48 (0x30) 0 (0x00)
          49 (0x31) 0 (0x00)
          50 (0x32) 0 (0x00)
          51 (0x33) 0 (0x00)
          52 (0x34) 8 (0x08)
          53 (0x35) 2 (0x02)
          54 (0x36) 0 (0x00)
          55 (0x37) 0 (0x00)
          56 (0x38) 0 (0x00)
          57 (0x39) 0 (0x00)
          58 (0x3a) 65 (0x41)
          59 (0x3b) 183 (0xb7)
          60 (0x3c) 255 (0xff)
          61 (0x3d) 195 (0xc3)
          62 (0x3e) 255 (0xff)
          63 (0x3f) 255 (0xff)
          64 (0x40) 1 (0x01)


          How can I isolate more this problem?
          I have successfully done the ping prove given by the author of the firmware of the Propeller uC in MSWindows as reported here:
          http://forum.agaverobotics.com/posting.php?mode=reply&f=7&t=3
        • Ethan Tira-Thompson
          I think a fundamental difference between the two tests is that dynamixel_util is opening/closing the serial port each time, whereas I bet the other ping tool
          Message 4 of 13 , Apr 8, 2010
          • 0 Attachment
            I think a fundamental difference between the two tests is that dynamixel_util is opening/closing the serial port each time, whereas I bet the other ping tool just keeps it open.

            For instance, I wonder if you run the 'perf' test, it trigger a bunch of traffic using only one connection.

            If that works I can only assume there is some overhead on either your system (are you running this in a virtual machine?) or the propeller initialization which requires some time to reset the serial port between openings.

            I can tell you on OS X and directly-running linux I haven't seen any trouble with running dynamixel_util back-to-back.

            -Ethan 
          • gengiskanhg
            Gobs of thanks. I think perf tests are ok. All the servos answer similar as this example: $ ./dynamixel_util perf 2 Opening comm port...done! Gathering
            Message 5 of 13 , Apr 8, 2010
            • 0 Attachment
              Gobs of thanks. I think "perf" tests are ok.
              All the servos answer similar as this example:

              $ ./dynamixel_util perf 2
              Opening comm port...done!
              Gathering statistics...
              Press <enter> or ctrl-D to end test
              /
              === 1 servos, tested for 5.62 seconds, using per-servo writes ===
              701/701 reads completed
              700 writes completed
              700 complete cycles
              Read cmd time (ms): Median 0.01 Avg 0.01 StDev 0.00
              Read time (ms): Median 3.99 Avg 4.01 StDev 0.26
              Write time (ms): Median 3.99 Avg 4.00 StDev 0.11
              Per servo: 124.65Hz (8.02 ms/cycle period)
              Per cycle: 124.65Hz (8.02 ms/cycle period)


              and with option sync...


              $ ./dynamixel_util perf sync save perfFile 1-7
              Opening comm port...done!
              Gathering statistics...
              Press <enter> or ctrl-D to end test
              -
              === 7 servos, tested for 3.39 seconds, using sync_write commands ===
              7/8 reads completed
              1 writes completed
              1 complete cycles
              Read cmd time (ms): Median 0.01 Avg 0.01 StDev 0.01
              Read time (ms): Median 8.00 Avg 7.98 StDev 0.04
              Write time (ms): Median 0.02 Avg 0.02 StDev 0.00
              Per servo: 125.06Hz (8.00 ms/cycle period)order
              Per cycle: 17.87Hz (55.97 ms/cycle period)
              Saving data to 'perfFile'...done!
              order


              Right!, the problem should be on the time for open/close the port. So, I can avoid it in an application.

              I go to the other thread to keep order.

              Regards.
            Your message has been successfully submitted and would be delivered to recipients shortly.