Results 1 to 9 of 9

Thread: SetID Robotis - issue (I made a mistake)

  1. SetID Robotis - issue (I made a mistake)

    Hello!

    While trying to configure my Dynamixel motor, I've tried to use Arduino ax12SetRegister function.

    I've decided to write:

    ax12SetRegister (1, 3, 5);

    1 was the current ID of motor.
    3 as the register location.
    5 was the new ID value.

    And here is where everything went wrong. Now my ID is -1. I cannot access it. Do you know a fix? I cannot enter RoboPlus, and I am not sure even that would help. I cannot find it with DynaManager now, as well. I've changed the baud to 16, so 115200, but it was also saying -1...

    Thanks,
    Kanabe

  2. #2

    Re: SetID Robotis - issue (I made a mistake)

    Not enough information here... Like how you have it hooked up, what controller, what servo...

    But assuming you have something that runs dynamixel wizard or R+ manager V2... If you can get your controller into the normal mode to be allow you to do firmware updates, you should try to get into that mode, then when it asks to update a servo, you then plug that servo in and only have that servo connected to the system). When a servo first boots it will first be in some known state, and if it sees a message, it will stay in that state and allow you to update the firmware, which will then set the servo into a known default state. (ID #1, default baud rate)..

  3. Re: SetID Robotis - issue (I made a mistake)

    Kurt,

    Thanks for the reply.

    I was posting in Arbotix forum for something, so I foolishly presumed people reading that topic would read this one. I'll explain it all here once more.

    I've just got: Arbotix Robocontroller because I saw people using it to configure Dynamixel motors. I've also got 12 AX12A motors I want to use.

    The first thing I've done was to install RoboPlus V1.1.3, since with R+ Manager V2 cannot work with my servos.
    For the past night, I was trying to establish communication with R+ and AX, but in vain. Then, I've decided to open up Arduino, and using ax12SetRegister function to try to configure registers via configuration script. That is when, printing new, change value, using ax12GetRegister function, I saw that my new ID is being -1, and new BAUD is being -1. Since, then I cannot talk to AX. It doesn't matter anything I try. I understand R+ might help, but it is not operable for me, 'cause I cannot find nowhere how to make R+ and Arbotix communicate.

    I am being shut down from talking via FTDI to Dynamixel connected to R+. In another topic someone suggested I need to make my Arbotix act as intermediary and send data via FTDI to Dynamixel.
    Do you possibly know how to do that, since I have no clue? You'd be of great help.

    I saw people on YouTube only configuring AX with FTDI and Arbotix. I didn't purchase anything else, like USB2Dyna, U2D2, adapters and similar.

    The only successful thing I've had was when I uploaded Arduino ROS sketch, which allowed me to talk to Dynamixel but only using DynaManager, TrossenRobotics software. I couldn't use R+ yet.

    If you could help me with this I'd be really really really grateful.

    Thanks,
    Kanabe
    Last edited by MayorKanabe; 2 Weeks Ago at 10:28 AM.

  4. #4

    Re: SetID Robotis - issue (I made a mistake)

    I still have a few Arbotix boards sitting around here somewhere, but I don't use them for much of anything these days...

    For low end stuff, would simply use an OpenCM9.04 board... Or pull out one of my USB2AX adapters... To run Robotis software...

    Now back to Arbotix. Which version of Arduino are you using? 1.0.4? Note: I personally don't do much (anything) with this version of stuff any more... I only have the Arduino 1.8.x installed and typically only use 1.8.8...

    A long time ago, Trossen had a beta version of stuff installed for the 1.6.x releases that works on 1.8.x... That started from my updated version... A member Tician made a boards installer, for the stuff... You can find more in the thread: http://forums.trossenrobotics.com/sh...2249#post82249

    Again I have not use Arbotix Boards with Roboplus... or the like so not sure how compatible the Dxl Manager is with Arbotix stuff, it might be able to see some servos running the ROS sketch... But I have my doubts about it handling the firmware upgrades, as I believe the upgrades require the DXL speed to change on the fly and I don't think there is code in place to handle this on these boards/sketch.

    That is the sketch would need to know that the USB system told the FTDI that it now wants a baud rate of X and then the sketch would see this and change the DXL Bus that speed. I have done this with Teensy procesors by PJRC, but not with AVR talking through FTDI.

    So if I were stuck, I would probably try things like:
    Run a sketch to try to find the servo: like I have my ax12test program...
    https://github.com/KurtE/AX12_Test

    With this there is a simple loop that tries to find any servo at the current baud rate: I think this is command: 5<cr>
    Code:
    void FindServos(void) {
    
      g_count_servos_found = 0;
      int w;
      DBGOut_Serial.println("\nSearch for all servos");
      DBGOut_Serial.println("Begin Protocol 1: ");
      for (int i = 0; i < 254; i++) {
        w = ax12GetRegister(i, AX_PRESENT_POSITION_L, 2 );
        if (w != (int) - 1) {
          g_servo_protocol[i] = SERVO_PROTOCOL1;
          g_count_servos_found++;
          DBGOut_Serial.print(i, DEC);
          DBGOut_Serial.print(" - ");
          DBGOut_Serial.println(w, DEC);
        } else {
          g_servo_protocol[i] = SERVO_NOT_FOUND;
        }
        delay (5);
      }
      DBGOut_Serial.println("Done");
      DBGOut_Serial.println("Begin Protocol 2: ");
      for (int i = 0; i < 254; i++) {
        uint32_t model_firmware = dxlP2Ping(i);
        if (model_firmware) {
          if (g_servo_protocol[i] == SERVO_PROTOCOL1) {
            DBGOut_Serial.println("Found both Protocol 1 and Protocol 2 Servo with same ID");
          } else {
            g_count_servos_found++;
          }
          g_servo_protocol[i] = SERVO_PROTOCOL2;
          DBGOut_Serial.print(i, DEC);
          DBGOut_Serial.print(", Model:");
          DBGOut_Serial.print(model_firmware & 0xffff, HEX);
          DBGOut_Serial.print(", firmware: ");
          DBGOut_Serial.print(model_firmware >> 16, HEX);
          w = dxlP2GetRegisters(i, DXL_X_PRESENT_POSITION, 4 );
          DBGOut_Serial.print(" : ");
          DBGOut_Serial.println(w, DEC);
        }
        delay (5);
      }
      DBGOut_Serial.println("Done");
    }
    I believe there is a command: b <baud rate><cr>

    I believe this is currently setup to use my own version of the Arbotix libraries BioloidSerial... Also up on my github...


    But it is sort of cryptic on commands...

    I have versions that run using openCM/CR boards, that simply loops over several different baud rates trying to query each servo ID to see if it gets a match...

    If you set the baud rate to 16 for 115200, the actual generated baud is probably about: 117647 which is off by something like 2% and not sure what the Arbotix baud rate is when you try 115200... I remember it is off by a reasonable amount... Which is why people run 8 bit avr boards at 14.77.... If they need 115200. The question is, if these two boards are off by the same amount as maybe both are avr chips... But if they choose to go in oposit directions than may have issues talking...

    Sorry not much help

  5. Re: SetID Robotis - issue (I made a mistake)

    Kurt,

    Thanks for the prompt and detailed answer.

    This is definitely a problem for me, since I haven't ordered OpenCM board or USB2AX or anything. And it would take me two weeks to order them now, two weeks that I don't have.

    I have watched a video from Trossen on Youtube:


    The only difference between their and mine setup is that they are using Arbotix Pro, not Arbotix, which doesn't use FTDI but USB, and I cannot understand what they've uploaded to Arbotix board since they are able to talk with the servo.

    I've tried with 1.8.8 version, but I couldn't find Arbotix board at all, so I've downgraded to 1.0.6 version and followed the instruction on Trossen, up to the part where it got to talking with Dynamixel Manager since I do not have the hardware. If I were to buy it now somehow, do you think it would work?
    This is what they suggest on the tutorial: https://learn.trossenrobotics.com/pr...oplus-1-0.html

    But, as I've noted, time is of essence for me, and my budget is low, so I'd like to find a way to do like on the video. Do you possibly know who I could contact about that? I'm new here so I haven't been up to date.

    From what I understand how UART works (though I am not an expert), there is a correlation between UART speed and UART tolerance. Even though I get 117647 as you've suggested it should still be able to talk with 115200 without any problem. Or am I mistaken?

    The sketch from your github, I've noticed this: Serial.println("8 - Set ID: <old> <new>");
    Have you implemented it that -1 as old would work?

    I have tried to check if that -1 is actually: 0b 1000 0001, which would mean it is 129 decimal ID, but I cannot understand why does it read it as -1... I cannot communicate with it through 0xFE ID, though.

    Sorry to bother you, I am a bit confused and I have no clue what I am doing anymore...

  6. #6

    Re: SetID Robotis - issue (I made a mistake)

    First thing: Arbotix-Pro and Arbotix-m are very different... Arbotix-Pro was made for the HR-OS1 Humanoid robot and was sort of a clone of I believe a Robotis CM-510? controller. I would have to look up again to remember which one... It was ARM based and not AVR, and you more less could not program it, it was simply a Servo controller...

    Note: You could actually program the Arbotix-Pro if you purchased a hardware programmer and adapter (another $50)... But ...
    It also uses an FTDI chip to do the USB communications.

    Again I believe the Arbotix support for Arduino 1.8.8 should still be there. Note the thread I pointed to? Is their stuff still up on github?
    Or is the board manager stuff by Tician still there? I have not looked in awhile.

    Again the stuff should work on Arduino 1.0.4, but I have not tried it in a long while...

    As for Uarts speed/tolerance? How far you can be off is probably somewhere between 2 and 3% off. But if both sides are off and if one chooses to go > 115200 and the other side lets say goes below 115200 than the delta difference can become a problem... I am not an expert on it... Again it depends on which way the different processors are setup and how far off they are...
    But if you look at the Atmega644p processor manual, the Baud rate is either generated by: either
    Baud = 16000000/(16 *(uBBR +1)) or Baud = 16000000/(8 *(uBBR +1)) depending of if double speed mode is turned on or off...
    And by their examples in the PDF. For 115200 with clock speed of 16mhz:
    115.2k 8 -3.5% 16 2.1%

    Is either off by -3.5 or by +2.1%... But again if both do the same, then they cancel out...

    As for my sketch no idea what -1 would do. Instead of using 0xfe you would probably just use 254. as for
    As for what -1 is represented by? It may depend on what variable type used. Example int8_t a value of -1 would probably be 0xff .
    A value 0f 100 0001 binary would be -127...

  7. Re: SetID Robotis - issue (I made a mistake)

    I've been looking at the links you've provided and ended up to this page: https://tician.github.io/arbotix/
    It is not really a github. Despite the instructions I must be blind or I don't see what I need here.

    So, what do you suggest in the end?
    Is it possible to configure this Arbotix to talk with Dynamixel Manager, or (eliminating all the obstacles) would you suggest for me to buy some additional stuff (and what) to be able to do this task?

    What would you say about AX12A? If I leave it on 1.000.000 baud rate, is it really tolerance 0% as they claim in the e-manual sections? I have a controller that can do 982.xxx baud rate. That means it is in 3% error range, but only if it is to believe the manufacturer's datasheet.

    Also, since I haven't worked with Robotis before, can you tell me (sorry for spamming you with some other not related questions) how do the servos react in Daisy Chain?
    I want to connect my RX and TX pins on one line without driver, since I can turn on and off my TX and RX pins at will, so I am worried what is the condition when the servo returns information (as configured by default)? It's easier for me to explain my question in an example.

    If I have 5 servos, ID = 1, ID = 2, ID = 3, ID = 4, ID = 5.
    I want to send my data to ID = 4.
    data goes to ID = 1, does the ID one immediately send data to controller via TX line, or does it ignore the request?
    If so, that means only ID = 4 would send data back?

    When I receive the data from ID = 4, what happens to the communication with that servo? Will it go into quiet state and wait for next instruction from controller, or will it keep the bus high with it's TX pin?

    I was actually using 254 but couldn't get the servo to do anything.
    The reasoning why I think it is 127 read as -1 is because of binary representation of negative numbers. 1 = 0b0000'0001, but -1 = 0b1000'0001. Since the IDs can't have a negative value, that's why I thought this must be the case.
    Nevermind, I'll have a lot of job on investigating that. Thank you so much for all the help!

  8. #8

    Re: SetID Robotis - issue (I made a mistake)

    First the link to Tician mentioned above. Again instructions on how to use sort of in thread message: http://forums.trossenrobotics.com/sh...2249#post82249

    The basics are: You run current arduino like 1.8.8. You bring up the preferences dialog: File->Preferences (Windows)..

    Near bottom of preferences page, there is a field Additional Boards Manager URLs: ....
    If blank just paste in the string:
    https://tician.github.io/arbotix/package_trossen_arbotix_index.json

    If not blank, add a command between locations, or use button on right edge of field to bring up secondary dialog.
    Now close out these dialogs with OK...

    Then go up to Tools menue, for the Boards sub menu and choose the Boards Manager
    Hopefully at this point there will be an entry "Arbotix AVR Boards by tician" choose the install button and hopefully
    everything gets installed. And you can choose the Arbotix board from the tools->Boards menu...

    Questions about Robotis products, can usually be best answered on the Robotis forum.
    http://en.robotis.com/service/forum.php

    Daisy chained: The two connectors on the servo are connected to each other. So when you send a request to servo #4
    and you have <controller> -> 1 -> 2 -> 3 -> 4 -> 5
    They will all see the message. Note: as the chain gets longer and the more connections, the signal voltages may drop
    some so I usually don't daisy chain too far. For example on Hexapod, typically only daisy chain per leg and then use
    Hub where all legs split off from...

    So yes if you send to #4 only it will respond back. That is each of the servos will see the message and if it is
    to their ID they process it, if not their ID they ignore it. Only the servo sent a command will optionally send back
    a response packet. There is a servo setting on when to return packets and when not to. Note: if you send a broadcast message it will not send a response packet back...
    Servo setting: http://emanual.robotis.com/docs/en/d...s-return-level

    More information about protocol 1 is up on their emanual: http://emanual.robotis.com/docs/en/dxl/protocol1/

    Setting Baud rate to 1000000 default for this servo, is good as the 16mhz Avr processors can generate this speed more or less exactly... That is the baud rates that the AVR can generate is something like (clock speed)/(16*n), so at 16000000 the speeds that can be generated reduces down to 1000000/n and n of 1 gives you exactly 1000000... That is not to say that the communications to another device like the servo does not have a tolerance, but simply the Arbotix is not contributing any delta from the 1mhz...
    As for 3%... Hard to say if 982K will work or not. I think it is off under 2% so may work. But the percentage that you can be off sort of decreases as the baud rate goes up...








  9. Re: SetID Robotis - issue (I made a mistake)

    Thanks, KurtE!

    I saw that .json file, but when I've opened it I just saw some code that didn't have any sense to me.

    I do not use Arduino IDE so I had no clue what it is.

    You've been of a great help to me! Thank you so much!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Getting PCB made
    By jdolecki in forum Robotics General Discussion
    Replies: 15
    Last Post: 06-19-2012, 01:51 AM
  2. Project Gnome to be made
    By gnome in forum Projects For Request and/or Sale
    Replies: 0
    Last Post: 09-03-2010, 01:09 PM
  3. Project Gnome to be made
    By gnome in forum Mechanics / Construction
    Replies: 0
    Last Post: 09-03-2010, 01:09 PM
  4. Soldering Mistake? ~*~56k warning~*~
    By No0bert in forum Robotics General Discussion
    Replies: 14
    Last Post: 01-29-2009, 04:39 PM
  5. Project I did it! I made my first bot. Please don't laugh.
    By Electricity in forum Humanoids, Walkers & Crawlers
    Replies: 37
    Last Post: 09-15-2008, 02:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •