Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: What would hou do if you could have 1ms loop on the whole robot?

  1. Question What would hou do if you could have 1ms loop on the whole robot?

    If you could send new goal position to every servo in your robot, and get their current position, speed, etc every millisecond, what would you do with it that is currently difficult or impossible?

    Imagine that you could query the position of the servos, and the value you would get instantly was always less than 1ms old, and sending new positions to them would return instantly and be applied to the servo before the next 0.5ms are elapsed, all that from the convenience of your high-level language on your embedded (or not embedded) computer runninv your OS of choice.
    What would such a thing enable you to make?

    As a comparition, currently what most people use will take more than 10ms to write and read all positions, and block execution during that time.

    I do not have even a prototype yet and am not sure there will ever be, but I sure have an idea that could make thing close to that. No promise whatsoever that it will ever see the light of day.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  2. #2

    Re: What would hou do if you could have 1ms loop on the whole robot?

    Sounds interesting,

    I am torn on some of this, as some of this data may be useful for things like terrain adaption support.

    Versus, going potentially more in different direction, of trying to push more of the support into the servo controller, examples of things that would be great to handle in the controller:
    a) If you are doing some form of timed moves for groups of servos, have the controller do that for you. (like SSC-32 for rc servos)
    a') Ability to setup next move to start when previous one completes...
    b) Monitor battery voltage, servo temps...
    c) Maybe monitor torque or like, and maybe setup some form of actions, like, if servo x's torque exceeds x, stop servos x, y, z and/or alert me or ...

    But again having the ability to quickly set and query many of the values could be very interesting.

  3. #3
    Join Date
    May 2016
    Location
    USA
    Posts
    145
    Images
    12
    Rep Power
    16

    Re: What would hou do if you could have 1ms loop on the whole robot?

    I'm not as experienced with walking robots as you guys, but my feeling was that a ~10ms loop is fast enough. I can't think of any scenario where <1ms would be needed. Humans can't react that fast.

  4. #4
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,313
    Images
    27
    Rep Power
    278

    Re: What would hou do if you could have 1ms loop on the whole robot?

    It would be needed for a robot to cheat at janken (rock-paper-scissors). The Ishikawa Watanabe Lab developed a custom high-speed, highly-parallel imaging sensor several years ago and have been doing some very cool stuff with it ever since.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    [git][mech][hack]
    gives free advice only on public threads

  5. #5

    Re: What would hou do if you could have 1ms loop on the whole robot?

    1ms is fast enough to create convincing haptic feedback. It's also fast enough to sync up to VR displays. There are things you can do in that situation that you can't with a significantly longer latency.
    For walking robots, you could also apply balance sensor information faster (with lower latency) and thus get more stable walk.
    However, communications is only one half, and the cheaper one to fix. The motors and gear train need to have sufficient bandwidth to keep up.

  6. Re: What would hou do if you could have 1ms loop on the whole robot?

    Quote Originally Posted by jwatte View Post
    1ms is fast enough to create convincing haptic feedback. It's also fast enough to sync up to VR displays. There are things you can do in that situation that you can't with a significantly longer latency.
    For walking robots, you could also apply balance sensor information faster (with lower latency) and thus get more stable walk.
    However, communications is only one half, and the cheaper one to fix. The motors and gear train need to have sufficient bandwidth to keep up.
    That's interesting, the VR side of things is what I'm working on. I think the simplest way of lowering the latency is to use something like an XMOS chip with heavily branched out communications - only one or two servos on each bus. XMOS chips are basically multicore CPUs with reduced instruction-set architectures and DSP extensions, with each core running independently but linked by configurable, ultra-low latency hardware "messaging" channels. If I remember correctly there's something like 8-16 logical cores depending on the model, and you can map the IO ports to separate cores through the inter-process messaging system, so in theory you could dedicate say one thread to host IO, one or more for IK or any other higher-level processing, and the rest to dedicated servo IO, potentially with a 1:1 mapping between threads and servos. The language is strange (C with message-passing extensions) and the messaging logic can be a pain, but I reckon you could put together a seriously low-latency controller. For haptic feedback you could even move the force response control code directly onto the board.

  7. #7
    Join Date
    Jun 2010
    Location
    Australia
    Posts
    161
    Rep Power
    35

    Re: What would hou do if you could have 1ms loop on the whole robot?

    Oooooh, dunno about you guys, but the first thing I thought of is a suspended AX-12 exo-skeleton with FPV goggles, wirelessly connected to a MX-64 or better humanoid robot for almost real-time control. Don't need a IMU for balance, 'cos I have one - ME! The wireless latency would be the limiting factor, instead of wireless latency added to servo latency etc.
    That. Would. Be. Awesome.

  8. #8

    Re: What would hou do if you could have 1ms loop on the whole robot?

    I think the AX-12 and MX-64 servos are slow enough in response that 1 ms response time is totally wasted on them.

  9. Re: What would hou do if you could have 1ms loop on the whole robot?

    AliShug: Sure, you can tackle the problem any way you want, but we're considering Dynamixel servos specifically here, and the fact that they are Daisy-chained is a pretty big and useful specificity. Going up to a 1:1 mapping between servo and bus line kind of ruins the idea. You would not say to Usain Bolt: "Dude! If you really want to go between here and there _fast_, you should get a bike!" ^^

    Also, on the original topic: After a lot of time spent on various work projects, I am finally designing the board for that fast USB interface

    It's currently a 32 x 45 x 15 mm design, with two boards.

    The bottom board has the micro USB port, the MCU (atsam3u2, cortex-M4 at 96MHz with USB High-Speed), a 6Dof IMU and a 16kB EEPROM for saving poses or something.
    The USB connector is recessed so the plug is completely enclosed in the volume of the device, and there is additional strain relief on the cable. I think it I make a product of it, it will have a 25 cm cable with 90° bend connector on the host side, this way it does not stick out too much from the various SBC you might want to connect it to.

    The top pcb has 6 DXL connectors (right angle like on the usb2ax), a screw terminal for power, a MOSFET to turn it on/off, and the protection circuitry and level adaptation for the DATA lines.
    I imagine making multiple versions of the top board to accomodate the various Dxl families (XL-320, AX/MX TTL, MX/RX RS485, XM, and/or possibly some combinations).

    It took me a long time to get there in part because I designed a new, low capacitance protection for the Dxl lines, that should be able to protect the lines from anything thrown at them. It's based on a JFET, that basically disconnects the DATA line when it is subject to voltages outside of acceptable range. I tested it with 2MHz square waves, and the deformation seems completely acceptable, and it easily protects the line against continuous -10/+20V (theoretically up to +-30V).


    I also designed a few other boards that fit in the same "let's go full Dynamixel for every communications on the robot". After all if trying to move servos at 1kHz does not make a lot of sense due to mechanical considerations, the other way to use such fast com' speed is to talk to more things than what was previously possible.

    So I designed an IMU board ("Dxld IMU", 14 x 26 x 8mm), a Dxl extension board ("DXLD Interface", 15 x 24 x 8mm) and a Small Solid State Lidar (SSSLidar) that can interface with the Dxl extension board.

    The IMU is just that, a MPU-6050 (6dof) on a board with a MCU, 2 DXL ports and 2 mounting holes.

    The interface has a 5x2 2.54mm header, with VBUS, 5V(500mA), 3V3(100mA), and 6 GPIO that can do PWM, ADC(4 of them), 1 serial, 1 I2C, 1 SPI. It's intended as either an interface for other boards, or a way to attach stuff directly to the bus, not sure yet.

    The SSSLidar is already on github, it's a 29 x 42 x 26mm assembly of 8 PCBs with 13 TOF lidars (12 in a circle and 1 looking perpendicular to the others) + 6dof IMU, with a serial interface, a ring of 12leds to get some visual feedback. It should weight maybe 5 or 6g, and have a refresh rate of maybe 25Hz on the whole set of sensors. The sensors can see up to 2m indoors, 70cm outoors, have a resolution in the millimeter and a FOV of 25°. The device will interleave IMU data with the distances from the lidars, to make interpretation easier and more accurate (like not freaking out when the robot is at an angle that makes its sensors look at the floor).

    I also made some other little adapter boards, like male-male Dxl connectors (for when you need the extra cable length but do not want to commit enough to make a custom cable), and 3 port hubs for branching without needing the bulk of the available 6 ports hubs.

    I still have to finish routing the USB interface to be able to order everything at once (prototyping 15 different pcbs in individual orders would not be economical :x). Maybe some of these will end up as real products one day, who knows. It's only been 5 years I have been thinking about some of them...
    In the meantime if some people want to get their hands on prototypes to play, just PM me.
    Last edited by Xevel; 09-12-2016 at 07:38 PM.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  10. #10

    Re: What would hou do if you could have 1ms loop on the whole robot?

    Sounds like you're having fun :-)

    Note that the Dynamixel servos will take a while (millisecond, or even milliseconds) to turn around if you read values back, and/or want write acknowledgement. Also, their control cycle is something like 8 milliseconds -- they don't poll their internal sensors more often than that, so faster updates aren't at all useful.

    Using SYNC_WRITE, at 2 Mbps, I think a maximum-length packet may take 1.5-2 milliseconds. If you have fewer servos and fewer registers to write, you will still need to read back status every so often, which will be a limitation.
    8 bytes per servo, time 14 servos for a simple quad 3DOF + aim, will fill up up to 2 milliseconds (depending on whether you use 1 Mbps or faster bus speed) and won't give you time to read back status.

    Now, I'd be totally happy with a full write-and-polling cycle every 10 milliseconds. In fact, I ran that for a while (on 14 MX-64s,) but the performance of the servos didn't go up, so I stayed at 60 Hz in the end IIRC.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. closed loop speed control on AX 12A
    By yang in forum DYNAMIXEL & Robot Actuators
    Replies: 5
    Last Post: 08-15-2013, 05:34 PM
  2. Question(s) Motion Pages Loop issue
    By blastdog in forum Software and Programming
    Replies: 0
    Last Post: 06-24-2012, 07:04 PM
  3. Interesting Closed loop control of AX-12 at 840 HZ
    By RobotAtlas in forum DYNAMIXEL & Robot Actuators
    Replies: 0
    Last Post: 12-13-2010, 06:31 PM
  4. Closed loop control of Dynamixel AX-12+ ?
    By ngom52 in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 03-07-2010, 02:52 PM
  5. PID controller loop
    By Wizeman in forum Software and Programming
    Replies: 2
    Last Post: 04-01-2008, 07:09 AM

Posting Permissions

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