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

AX12 algorithm for moving

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

AX12 algorithm for moving

Post by Marmakoide » Sat Aug 18, 2007 11:14 am

Post by Marmakoide
Sat Aug 18, 2007 11:14 am

Hi
For a personal project, I have to know how the AX12 computes the torque to go from pos A to pos B with the speed V. Is somebody knowing that ?
Hi
For a personal project, I have to know how the AX12 computes the torque to go from pos A to pos B with the speed V. Is somebody knowing that ?
Marmakoide
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Mar 02, 2007 6:57 pm

Post by Dewey » Sat Aug 18, 2007 11:40 am

Post by Dewey
Sat Aug 18, 2007 11:40 am

Look at page 16 of the AX12 Manual.

The Ax12 moves to its goal position, addresses 30/31, at the speed V, addresses 32/33, if and only if the maximum torque in addresses 34/35 is not exceeded. If it is exceeded it will not continue moving and the goal position will never be reached no matter what speed is specified.

If the torque is not exceeded as it approaches the goal it reduced the maximum torque based on the compliance addresses 26/27 and 28/29.

So in the sense you ask the question it does not compute the torque merely limits it to the specified figure whenever a positional move is required.

Dewey
Look at page 16 of the AX12 Manual.

The Ax12 moves to its goal position, addresses 30/31, at the speed V, addresses 32/33, if and only if the maximum torque in addresses 34/35 is not exceeded. If it is exceeded it will not continue moving and the goal position will never be reached no matter what speed is specified.

If the torque is not exceeded as it approaches the goal it reduced the maximum torque based on the compliance addresses 26/27 and 28/29.

So in the sense you ask the question it does not compute the torque merely limits it to the specified figure whenever a positional move is required.

Dewey
Dewey
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 78
Joined: Sat May 12, 2007 1:17 pm
Location: Worcester UK

Post by Lenny » Sat Aug 18, 2007 2:10 pm

Post by Lenny
Sat Aug 18, 2007 2:10 pm

I have monitored the load of three AX12's of my bioloid-arm randomly moving around.

x-axes is the load of servo 1
y-axes blue stars is the load of servo 2
y-axes red o's is the load of servo 3

Image

Have someone an idea why the load is not uniform distributed?

Lenny
I have monitored the load of three AX12's of my bioloid-arm randomly moving around.

x-axes is the load of servo 1
y-axes blue stars is the load of servo 2
y-axes red o's is the load of servo 3

Image

Have someone an idea why the load is not uniform distributed?

Lenny
Lenny
Robot Builder
Robot Builder
User avatar
Posts: 8
Joined: Thu Jul 19, 2007 8:29 pm
Location: Bonn,DE

Post by JonHylands » Sat Aug 18, 2007 2:36 pm

Post by JonHylands
Sat Aug 18, 2007 2:36 pm

Its not really the load, and it only updates at 7 Hz.

What that value really represents is the amount of current the motor is consuming. If the servo isn't moving, then it gives a decent (although slow) approximation of load. If the servo is moving, you have to factor in the amount of torque you're inducing by the movement.

- Jon
Its not really the load, and it only updates at 7 Hz.

What that value really represents is the amount of current the motor is consuming. If the servo isn't moving, then it gives a decent (although slow) approximation of load. If the servo is moving, you have to factor in the amount of torque you're inducing by the movement.

- Jon
JonHylands
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by Fritzoid » Mon Jan 31, 2011 2:47 pm

Post by Fritzoid
Mon Jan 31, 2011 2:47 pm

Marmakoide asked:
I have to know how the AX12 computes the torque to go from pos A to pos B with the speed V. Is somebody knowing that ?


I'd say it probably works something like this:

http://robosavvy.com/Builders/Fritzoid/AX-12.zip
Marmakoide asked:
I have to know how the AX12 computes the torque to go from pos A to pos B with the speed V. Is somebody knowing that ?


I'd say it probably works something like this:

http://robosavvy.com/Builders/Fritzoid/AX-12.zip
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by Fraser » Tue Feb 01, 2011 12:44 am

Post by Fraser
Tue Feb 01, 2011 12:44 am

Hi Fritzoid,

The code is nice and readable, thanks for posting.

Slightly off topic, but then the thread is very old:

How did you generate the Temperature conversion table. i.e. what did you measure? the temperature of the servo case? the motor? temp sensor package?

(And do you mind if I use the table :) )

P.S.
I just noticed this, and thought I'd mention just in case operation is not as intended:
Code: Select all
// update temperature and voltage entries
if((++Timer0Count & 0x0100) == 0)
{
    ...
}

Block ... executes when bit 9 of Timer0Count is low, so executes continuously for 255 passes and then off for 255 passes. Should it be this:
Code: Select all
// update temperature and voltage entries
if((++Timer0Count & 0x00FF) == 0)
{
    ...
}

which executes once every 255 passes.
Hi Fritzoid,

The code is nice and readable, thanks for posting.

Slightly off topic, but then the thread is very old:

How did you generate the Temperature conversion table. i.e. what did you measure? the temperature of the servo case? the motor? temp sensor package?

(And do you mind if I use the table :) )

P.S.
I just noticed this, and thought I'd mention just in case operation is not as intended:
Code: Select all
// update temperature and voltage entries
if((++Timer0Count & 0x0100) == 0)
{
    ...
}

Block ... executes when bit 9 of Timer0Count is low, so executes continuously for 255 passes and then off for 255 passes. Should it be this:
Code: Select all
// update temperature and voltage entries
if((++Timer0Count & 0x00FF) == 0)
{
    ...
}

which executes once every 255 passes.
Fraser
Savvy Roboteer
Savvy Roboteer
Posts: 84
Joined: Tue Nov 30, 2010 2:16 pm

Post by Fritzoid » Tue Feb 01, 2011 1:32 pm

Post by Fritzoid
Tue Feb 01, 2011 1:32 pm

Thanks Fraser,

In fact the line should read
Code: Select all
   if((Timer0Count++ & 0x01FF) == 0)
...which runs once every 512 passes.

What you are looking at is my best "reading" of the actual ax-12 firmware translated into c-like form. The output is meant to be used as a document that finally answers all the questions about the ax-12 algorithm for moving.

The input comes from an ax-12 storage dump posted in binary format on an earlier thread at this site, titled "Ax-12 firmware update gone wrong". You can find that thread from the Bioloid wiki page, reachable from the RoboSavvy site menu.

Because much of the translation process is done by hand and because it has never been compiled, there are probably more errors, like the one you identified, still in there. I'll fix them if someone points them out to me. Also, because the input is nearly two years old, the current firmware may have changed a bit.

The reason that I choose to post on this thread is because it is also linked to the Bioloid wiki page, an excellent resource.
Thanks Fraser,

In fact the line should read
Code: Select all
   if((Timer0Count++ & 0x01FF) == 0)
...which runs once every 512 passes.

What you are looking at is my best "reading" of the actual ax-12 firmware translated into c-like form. The output is meant to be used as a document that finally answers all the questions about the ax-12 algorithm for moving.

The input comes from an ax-12 storage dump posted in binary format on an earlier thread at this site, titled "Ax-12 firmware update gone wrong". You can find that thread from the Bioloid wiki page, reachable from the RoboSavvy site menu.

Because much of the translation process is done by hand and because it has never been compiled, there are probably more errors, like the one you identified, still in there. I'll fix them if someone points them out to me. Also, because the input is nearly two years old, the current firmware may have changed a bit.

The reason that I choose to post on this thread is because it is also linked to the Bioloid wiki page, an excellent resource.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by Fraser » Tue Feb 01, 2011 9:53 pm

Post by Fraser
Tue Feb 01, 2011 9:53 pm

Wow, some nice work to decompile the Robotis ASM and add meaningful variable names to everything. I will check that thread out.

If I decide to try and implement a superset of Robotis firmware then your work will be a very nice reference. So many thanks for sharing it!

If I spot anymore errors along the way then i shall list them and send you a PM.
Wow, some nice work to decompile the Robotis ASM and add meaningful variable names to everything. I will check that thread out.

If I decide to try and implement a superset of Robotis firmware then your work will be a very nice reference. So many thanks for sharing it!

If I spot anymore errors along the way then i shall list them and send you a PM.
Fraser
Savvy Roboteer
Savvy Roboteer
Posts: 84
Joined: Tue Nov 30, 2010 2:16 pm

Post by Fritzoid » Wed Feb 02, 2011 12:58 pm

Post by Fritzoid
Wed Feb 02, 2011 12:58 pm

I found a number of similar errors with bit mask usage. :oops:

The revised code has been placed in my files area.
I found a number of similar errors with bit mask usage. :oops:

The revised code has been placed in my files area.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am


9 postsPage 1 of 1
9 postsPage 1 of 1