Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Learning how to use scurves with AX-12

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
6 postsPage 1 of 1
6 postsPage 1 of 1

Learning how to use scurves with AX-12

Post by siempre.aprendiendo » Mon Apr 09, 2012 6:38 pm

Post by siempre.aprendiendo
Mon Apr 09, 2012 6:38 pm

I'm learning how to use scurves with AX-12, so I've created a test CM-510 C program where I try different approachs. Any help will be very well received, because my goal is to control several AX-12 and I'm far far away from it!

Here is the program with an spreadsheet with the calculations (LibreOffice and Excel). I have started from an old post from Bullit in the Tribotix forum (now in PDF format at Robosavvy)

Clockwise is the standard motion, counter clockwise is the scurve intended motion

phpBB [media]
I'm learning how to use scurves with AX-12, so I've created a test CM-510 C program where I try different approachs. Any help will be very well received, because my goal is to control several AX-12 and I'm far far away from it!

Here is the program with an spreadsheet with the calculations (LibreOffice and Excel). I have started from an old post from Bullit in the Tribotix forum (now in PDF format at Robosavvy)

Clockwise is the standard motion, counter clockwise is the scurve intended motion

phpBB [media]
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona

Post by Fritzoid » Tue Apr 10, 2012 12:12 pm

Post by Fritzoid
Tue Apr 10, 2012 12:12 pm

I'm dying to see your results but I'm having trouble viewing your video, it claims to be "private."

I've always thought that the whole s-curves model (and that thread) was misleading, based on an incomplete understanding of the motion processor. A better description would be the trapezoid model with four phases; accelerating, cruising, decelerating and stopped. The motion is smooth because the sharp corners of the trapezoid are rounded off due to mechanical and software constraints. A glimpse at the source code shows that that's the way Robotis designed it.

A true spline-curve implementation is much more computationally intensive and would require floating point processing. Not the kind of stuff an AVR does well.
I'm dying to see your results but I'm having trouble viewing your video, it claims to be "private."

I've always thought that the whole s-curves model (and that thread) was misleading, based on an incomplete understanding of the motion processor. A better description would be the trapezoid model with four phases; accelerating, cruising, decelerating and stopped. The motion is smooth because the sharp corners of the trapezoid are rounded off due to mechanical and software constraints. A glimpse at the source code shows that that's the way Robotis designed it.

A true spline-curve implementation is much more computationally intensive and would require floating point processing. Not the kind of stuff an AVR does well.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by siempre.aprendiendo » Tue Apr 10, 2012 12:29 pm

Post by siempre.aprendiendo
Tue Apr 10, 2012 12:29 pm

Oops, sorry, now it's public. I think that there should be some problems with inertia and deceleration, and for some articles I found the trapezoid model seems more appropiate.


[Edited, links added]
An interesting article, Mathematics of Motion Control Profiles

And a 92 pages thesis, Motion Control Theory Needed in the Implementation of Practical Robotic Systems S Curves, page 17 (25 for Adobe).

In the Darwin Action.cpp source file, there is this interesting ASCII diagram, by the way, why are there two PRE-MAIN pairs?
Code: Select all
    /**************************************
    * Section               /----\
    *                         /|      |\
    *         /+---------/ |      |  \
    *        / |            | |      |    \
    * -----/  |            | |      |     \----
    *      PRE MAIN PRE MAIN POST PAUSE
    ***************************************/
    enum{ PRE_SECTION, MAIN_SECTION, POST_SECTION, PAUSE_SECTION };
Oops, sorry, now it's public. I think that there should be some problems with inertia and deceleration, and for some articles I found the trapezoid model seems more appropiate.


[Edited, links added]
An interesting article, Mathematics of Motion Control Profiles

And a 92 pages thesis, Motion Control Theory Needed in the Implementation of Practical Robotic Systems S Curves, page 17 (25 for Adobe).

In the Darwin Action.cpp source file, there is this interesting ASCII diagram, by the way, why are there two PRE-MAIN pairs?
Code: Select all
    /**************************************
    * Section               /----\
    *                         /|      |\
    *         /+---------/ |      |  \
    *        / |            | |      |    \
    * -----/  |            | |      |     \----
    *      PRE MAIN PRE MAIN POST PAUSE
    ***************************************/
    enum{ PRE_SECTION, MAIN_SECTION, POST_SECTION, PAUSE_SECTION };
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona

Post by Bullit » Tue Apr 10, 2012 11:56 pm

Post by Bullit
Tue Apr 10, 2012 11:56 pm

You might also like to include this:
Patent US 4988935

I found it particularly useful some years ago.
You might also like to include this:
Patent US 4988935

I found it particularly useful some years ago.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by Fritzoid » Wed Apr 11, 2012 12:26 pm

Post by Fritzoid
Wed Apr 11, 2012 12:26 pm

Jose asked
why are there two PRE-MAIN pairs?


This is because the action routine handles the post (deceleration) phase a little differently depending upon whether the next motion continues in the same direction, reverses or stops. See references to variables bDirectionChanged and bpFinishType. The second "hump" in the diagram is a supposed to indicate the continued case.
Jose asked
why are there two PRE-MAIN pairs?


This is because the action routine handles the post (deceleration) phase a little differently depending upon whether the next motion continues in the same direction, reverses or stops. See references to variables bDirectionChanged and bpFinishType. The second "hump" in the diagram is a supposed to indicate the continued case.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by siempre.aprendiendo » Wed Apr 11, 2012 7:14 pm

Post by siempre.aprendiendo
Wed Apr 11, 2012 7:14 pm

Another time, thank you very much Bullit. I only have browsed the document, but it seems that it will help me to get a deeper understanding of motion control.

I have been browsing and reading several books, but usually they are very theoretical and only a few of them help to get a working knowledge.

And, again too, thanks Fritzoid, I never thought that it could be related with chaining steps.
Another time, thank you very much Bullit. I only have browsed the document, but it seems that it will help me to get a deeper understanding of motion control.

I have been browsing and reading several books, but usually they are very theoretical and only a few of them help to get a working knowledge.

And, again too, thanks Fritzoid, I never thought that it could be related with chaining steps.
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona


6 postsPage 1 of 1
6 postsPage 1 of 1