Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Real time Dynamixel controls options?

  1. Real time Dynamixel controls options?

    I am building an UAV with Dynamixel servos to manage thrust vectoring. I want to modidfy motor orientation on the fly.

    I have the OpenCM 9.04C controller for TTL daisy chaining.
    The code is compiled and sent from a computer to the controller, which then sends signals to the servos.
    Is there a way to change the controller code in real time? The code "download" from the computer takes approximately one second. How to send instructions to servos faster?

    Best regards, Maxime.

  2. #2

    Re: Real time Dynamixel controls options?

    To send instructions over the USB port, you have to use a serial protocol of some sort.
    On the computer, you open the OpenCM as a "serial port" (or COM port on Windows.)
    On the OpenCM, you use the SerialUSB object to check whether there is data available() to read(), and to write() data.

    Note that the USB serial port support on the OpenCM is somewhat flaky. If you try to send too much data, it may lock up the sketch that's running, or reset the board. Send small packets (< 60 bytes) and wait for one packet to get sent and acknowledged before sending the next packet, and you'll probably be fine.

  3. Re: Real time Dynamixel controls options?

    Okay, that's for the OpenCM. Can one achieve better results with Arbotix, arduinos...?

  4. #4

    Re: Real time Dynamixel controls options?

    It might help to have additional information, like what code do you have running on the OpenCM? How much and what type of information you are trying to send between the PC and OpenCM?

    Is it simply being used to connect the servos to the PC? If so you might be better served by something like a USB2AX.
    I also use Teensy 3.2 processors to control servos. If your Host has hardware TTL USarts, I have had some good look with using those to talk to Teensy3.2 as well as Arbotix Pro.

    If your OpenCM is doing some additional stuff, it might help to understand what level of stuff it is doing and then try to figure out where the bottleneck is.

  5. #5

    Re: Real time Dynamixel controls options?

    No, there is no difference in how you talk to code running on a microcontroller between OpenCM or arduino/arbotix.

    And, generally, the OpenCM (ARM based) is faster than the arduino (AVR-based) and arbotix (AVR-based) although the PRO is more like the OpenCM. Not intended for custom software development, though.

    The OpenCM is great for talking to Dynamixel servos, and you should be able to develop the code you need on that. I've had several robots running great on OpenCM, with remote serial control even.

  6. Re: Real time Dynamixel controls options?

    I am willing to program a defined set of functions.
    Basic ones for example would be to switch between joint mode and wheel mode, simple 3DOF kinematic poses... I would just need to have real-time control over the function switch.
    The brain board would trigger those functions onto the servo controller. Is it feasible? Maybe is it possible to interface the two modules with UART instead of microUSB?

  7. #7

    Re: Real time Dynamixel controls options?

    There isn't very much difference between microUSB and general UART, as long as each message sent is less than 32 bytes.
    A command to trigger a mode would certainly be shorter than that, so I think you can keep going with USB just fine.
    If you want to use UART (TTL level, 3.3V -- not 5V!) then there are three hardware serial ports on the OpenCM; one of which is used for the Dynamixels already.

  8. Re: Real time Dynamixel controls options?

    Okay and thank you both very much for your inputs.
    Is the code C++? when trying to program joint-to-wheel function compiler states I need a destructor. Is it a classical one? any documentation about the code?
    Do you think I can get realtime control over OpenCM (like ~1┬Ásecond)?
    Last edited by Maxzor; 04-04-2016 at 11:28 AM.

  9. #9

    Re: Real time Dynamixel controls options?

    The OpenCM is programmed using C++, yes. However, it's not common that you need a destructor, and the compiler will generally generate one for you if you don't define it yourself. Only if you declare but don't define it might you get a linker error.
    But you shouldn't use "new" or "malloc" in embedded systems. Statically allocate/pre-initialize everything you need.

    Separately, yes, you have full control over the OpenCM. It runs fast enough that you can run dozens of instructions per microsecond. To get exact microsecond resolution, you will likely need to turn off interrupts, which means that most other peripherals may stop working or will work less effectively (this is true for all embedded systems.) The OpenCM is a lot better than regular AVR boards, though, as it does use DMA for serial ports, whereas AVRs only have a single byte buffer.

    The Dynamixel motors only run their contorl loop at about 120 Hz, though, so control better than 8 milliseconds is unlikely to be very helpful in that regard. Plus it takes at least 60 microseconds to send a 6-byte control message at 1 Mbps.

  10. Re: Real time Dynamixel controls options?

    How do you access OpenCM libraries?
    Can I for example compile the comprehensive functions I need in one file and download it to OpenCM? Then call the required functions with ~1-byte instructions? The template file consists of setup and loop. Any way to get in the loop brain messages?
    Noob-level wonders for sure but only used C++ for OOP, complete rookie in embedded.
    Last edited by Maxzor; 04-04-2016 at 05:20 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HUD creation with real time graphics overlay over webcam stream
    By Grumpybeard in forum Software and Programming
    Replies: 6
    Last Post: 04-25-2013, 03:12 AM
  2. Question(s) Controlling hexapod in real-time
    By lweydert in forum Software and Programming
    Replies: 1
    Last Post: 04-08-2013, 05:51 PM
  3. Question(s) Looking for Robot that can be control in real time from external data
    By Redding in forum Humanoids, Walkers & Crawlers
    Replies: 1
    Last Post: 04-16-2012, 09:06 AM
  4. general question on real time control and continuous motion
    By animaniac in forum Software and Programming
    Replies: 1
    Last Post: 10-17-2011, 03:43 PM
  5. real time plot of sensor data (in VB 2008)
    By cloud_skyblue in forum Software and Programming
    Replies: 0
    Last Post: 05-25-2010, 08:26 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