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

Some Questions

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

Some Questions

Post by jaho434 » Sun Sep 24, 2006 7:58 pm

Post by jaho434
Sun Sep 24, 2006 7:58 pm

Hey all, my Bioloid arrived on Thursday and I've finally got him up and running!

I've got a few questions that I haven't been able to find the answer to in previous posts, so any help would be great.

1) I've got the whining servo problem as others have described, but changing the margins to 0 or 2 doesn't seem to fix it as suggested (I am yet to try the silence servo routine posted). I noticed that being in RAM, these values got reset when the CM5 is turned off. Is there any way to set the default values in RAM?

2) In the absence of gyros, I'm attempting to create some kind of crude balancing code. Using the "Present Load" value on the ankle joints, I am attempting to move the ankle to counter-act the lean. It's crude, but it should work while standing straight up. Has anybody attempted anything similar?

3) In attempting to do this, I 've written some code in the Behaviour Control Program but it is giving me errors!

Image

Can anybody tell me what's wrong with that "AND"?!!? It's exactly the same as in the manual. :?

4) The Behaviour Control Program is so frustrating! Is there no easier way to program it?!!? Did Inaki ever get his Biotoken working?


Cheers all, happy Bioloiding.

Jules
Hey all, my Bioloid arrived on Thursday and I've finally got him up and running!

I've got a few questions that I haven't been able to find the answer to in previous posts, so any help would be great.

1) I've got the whining servo problem as others have described, but changing the margins to 0 or 2 doesn't seem to fix it as suggested (I am yet to try the silence servo routine posted). I noticed that being in RAM, these values got reset when the CM5 is turned off. Is there any way to set the default values in RAM?

2) In the absence of gyros, I'm attempting to create some kind of crude balancing code. Using the "Present Load" value on the ankle joints, I am attempting to move the ankle to counter-act the lean. It's crude, but it should work while standing straight up. Has anybody attempted anything similar?

3) In attempting to do this, I 've written some code in the Behaviour Control Program but it is giving me errors!

Image

Can anybody tell me what's wrong with that "AND"?!!? It's exactly the same as in the manual. :?

4) The Behaviour Control Program is so frustrating! Is there no easier way to program it?!!? Did Inaki ever get his Biotoken working?


Cheers all, happy Bioloiding.

Jules
jaho434
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 41
Joined: Mon Sep 04, 2006 1:00 am
Location: London, UK

Post by Robo1 » Mon Sep 25, 2006 1:11 pm

Post by Robo1
Mon Sep 25, 2006 1:11 pm

not sure but you the problem with the and could be that it's out side the bracket e.g. if(! > 64) and , should be i (! > 64 and )

bren
not sure but you the problem with the and could be that it's out side the bracket e.g. if(! > 64) and , should be i (! > 64 and )

bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Juha » Mon Sep 25, 2006 1:17 pm

Post by Juha
Mon Sep 25, 2006 1:17 pm

Hi,

I actually got my robo on friday, and build it over the weekend.

About section 3 in your email, clearly the syntax is broken.

I mean, what are you trying to do? Create if (condition) else if (condition) or if (condition1 AND condition 2) else if (condition) ??

What I think your probably trying to do is the first one, so replace "AND" with THEN + what you want to do if the first condition is met. You don't join "if" and "else if" with "and".


Now, about the problem that I have with my robot (I haven't really spent much time trying to solve it yet), I've downloaded the data for the "walking humanoid" or whatever to the robot (the one that replies to claping hands, takes the attack position etc).

Hand claping / attact position seems to work, but if I press for example "L" (as far as I can remember) there's a really loud beep-sound. And it does not stop.
Some kind of error I quess?

I didn't have the serial cable connected, I'll try with the cable connected when I get home... the TX light was blinking, so hopefully I'll get some error message in the console.
Hi,

I actually got my robo on friday, and build it over the weekend.

About section 3 in your email, clearly the syntax is broken.

I mean, what are you trying to do? Create if (condition) else if (condition) or if (condition1 AND condition 2) else if (condition) ??

What I think your probably trying to do is the first one, so replace "AND" with THEN + what you want to do if the first condition is met. You don't join "if" and "else if" with "and".


Now, about the problem that I have with my robot (I haven't really spent much time trying to solve it yet), I've downloaded the data for the "walking humanoid" or whatever to the robot (the one that replies to claping hands, takes the attack position etc).

Hand claping / attact position seems to work, but if I press for example "L" (as far as I can remember) there's a really loud beep-sound. And it does not stop.
Some kind of error I quess?

I didn't have the serial cable connected, I'll try with the cable connected when I get home... the TX light was blinking, so hopefully I'll get some error message in the console.
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by jaho434 » Mon Sep 25, 2006 1:56 pm

Post by jaho434
Mon Sep 25, 2006 1:56 pm

I'm trying to do the following:

Code: Select all
IF (condition_1 AND condition_2) THEN do_something


In the Quickstart guide it gives the example above. I know you would not normally join 2 conditions with an AND and an ELSE_IF, but that's what it says!

Any idea how this is done?

Cheers.
I'm trying to do the following:

Code: Select all
IF (condition_1 AND condition_2) THEN do_something


In the Quickstart guide it gives the example above. I know you would not normally join 2 conditions with an AND and an ELSE_IF, but that's what it says!

Any idea how this is done?

Cheers.
jaho434
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 41
Joined: Mon Sep 04, 2006 1:00 am
Location: London, UK

Post by KurtE » Mon Sep 25, 2006 2:10 pm

Post by KurtE
Mon Sep 25, 2006 2:10 pm

jaho434 wrote:I'm trying to do the following:

Code: Select all
IF (condition_1 AND condition_2) THEN do_something


In the Quickstart guide it gives the example above. I know you would not normally join 2 conditions with an AND and an ELSE_IF, but that's what it says!

Any idea how this is done?

Cheers.


I am no expert in this as I do not have a bioloid, but in this case you could probably do it in reverse.
Code: Select all
if (dY <= 64) then jump begin
if (dy >= 512) then jump begin
call RightA
jump begin

This is not very pretty but it migtht work until you can figure out how to do more complex if statements...
jaho434 wrote:I'm trying to do the following:

Code: Select all
IF (condition_1 AND condition_2) THEN do_something


In the Quickstart guide it gives the example above. I know you would not normally join 2 conditions with an AND and an ELSE_IF, but that's what it says!

Any idea how this is done?

Cheers.


I am no expert in this as I do not have a bioloid, but in this case you could probably do it in reverse.
Code: Select all
if (dY <= 64) then jump begin
if (dy >= 512) then jump begin
call RightA
jump begin

This is not very pretty but it migtht work until you can figure out how to do more complex if statements...
KurtE
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 28
Joined: Thu Apr 13, 2006 1:00 am
Location: Washington State

Post by jaho434 » Mon Sep 25, 2006 4:03 pm

Post by jaho434
Mon Sep 25, 2006 4:03 pm

Actually, I think I've found another way around it.

The "present_load" value of the AX-12 increases from 0 upwards if the torque is in one direction but increases from 1024 upwards if the torque is in the other direction.

So basically, I can check the higher value first:

Code: Select all
IF ("present_load" > 1024) THEN ankleForward
ELSE_IF ("present_load" > 0) THEN ankleBackward


Hmmm, not ideal...... but might work. Will try when I get home.
Actually, I think I've found another way around it.

The "present_load" value of the AX-12 increases from 0 upwards if the torque is in one direction but increases from 1024 upwards if the torque is in the other direction.

So basically, I can check the higher value first:

Code: Select all
IF ("present_load" > 1024) THEN ankleForward
ELSE_IF ("present_load" > 0) THEN ankleBackward


Hmmm, not ideal...... but might work. Will try when I get home.
jaho434
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 41
Joined: Mon Sep 04, 2006 1:00 am
Location: London, UK

Post by jaho434 » Mon Sep 25, 2006 9:30 pm

Post by jaho434
Mon Sep 25, 2006 9:30 pm

On the AND issue:

Ok, it seems there is a typo in the manual. If you want to use an AND, you need to use a CONT_IF afterwards, not an ELSE_IF.

For Example:

Code: Select all
IF (condition_1) AND
CONT IF (condition_2) THEN do_something


The above will execute "do_something" only if both conditions are met. It does say this in the manual, but it has ELSE IF instead of CONT IF.


On the Balancing:

I've got my very crude balancing code to do something! Very simply put..... by checking the load on the ankle servos, I am moving the servos slightly in the opposite direction. I am able to vary the load threshold at which the servos move and how far they move. Of course this could be sloped. ie: the larger the load, the more the servo moves...... or perhaps bring other servos into the equation, such as the hips.

A very interesting observation is that on the first few trials, I get the same resonating oscillation that is described by the Robonova users when the gain on their gyro is not correctly set. In order to overcome this, I will have to play with load thresholds and servo movements.

Inital tests are promising! What other things can I do?!!? Possibilities are endless!

MWHAHAHA, loving this robot! :P
On the AND issue:

Ok, it seems there is a typo in the manual. If you want to use an AND, you need to use a CONT_IF afterwards, not an ELSE_IF.

For Example:

Code: Select all
IF (condition_1) AND
CONT IF (condition_2) THEN do_something


The above will execute "do_something" only if both conditions are met. It does say this in the manual, but it has ELSE IF instead of CONT IF.


On the Balancing:

I've got my very crude balancing code to do something! Very simply put..... by checking the load on the ankle servos, I am moving the servos slightly in the opposite direction. I am able to vary the load threshold at which the servos move and how far they move. Of course this could be sloped. ie: the larger the load, the more the servo moves...... or perhaps bring other servos into the equation, such as the hips.

A very interesting observation is that on the first few trials, I get the same resonating oscillation that is described by the Robonova users when the gain on their gyro is not correctly set. In order to overcome this, I will have to play with load thresholds and servo movements.

Inital tests are promising! What other things can I do?!!? Possibilities are endless!

MWHAHAHA, loving this robot! :P
jaho434
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 41
Joined: Mon Sep 04, 2006 1:00 am
Location: London, UK

Post by smoothchat » Sat Oct 14, 2006 11:10 pm

Post by smoothchat
Sat Oct 14, 2006 11:10 pm

Well done jaho434,

I have a Bioloid on the way and want to experiment with the same concept. One approach I was thinking of is using a waist joint on the Humanoid to compensate for forward backward balancing. eg If the rearward torque of the foot increases, then tilt the upper torso slightly forward. Side balance might be achieved by simply extending the leg on the side of the increased torque very slightly to shift the centre of gravity. Alternatively you could bend the "knee" ever so slightly to shorten the opposite leg. This could be a subroutine at the end of a motion cycle to "steady" the Bioloid before the next action. On a perfectly flat horizontal surface, it will be interesting to experiment with.

I want to have the bioloid standing and be able to push it slightly and have it attempt to correct its balance. Even to the point where if I push it past a certain point, it will take a step to balance itself. Maybe it wont work, but it's something fun to experiment with. Just the interactive element will be cool.

I'd appreciate being able to share notes with you and to others on this forum. As your last post was in September, I would appreciate it if you could post any developments on the subject. Thanks.
Well done jaho434,

I have a Bioloid on the way and want to experiment with the same concept. One approach I was thinking of is using a waist joint on the Humanoid to compensate for forward backward balancing. eg If the rearward torque of the foot increases, then tilt the upper torso slightly forward. Side balance might be achieved by simply extending the leg on the side of the increased torque very slightly to shift the centre of gravity. Alternatively you could bend the "knee" ever so slightly to shorten the opposite leg. This could be a subroutine at the end of a motion cycle to "steady" the Bioloid before the next action. On a perfectly flat horizontal surface, it will be interesting to experiment with.

I want to have the bioloid standing and be able to push it slightly and have it attempt to correct its balance. Even to the point where if I push it past a certain point, it will take a step to balance itself. Maybe it wont work, but it's something fun to experiment with. Just the interactive element will be cool.

I'd appreciate being able to share notes with you and to others on this forum. As your last post was in September, I would appreciate it if you could post any developments on the subject. Thanks.
smoothchat
Robot Builder
Robot Builder
User avatar
Posts: 13
Joined: Tue Oct 10, 2006 1:00 am
Location: Australia

Post by jaho434 » Mon Oct 16, 2006 12:27 pm

Post by jaho434
Mon Oct 16, 2006 12:27 pm

Hi Smoothchat,

From what I have done so far, it is definitely possible to balance the robot when it is standing upright. I had the same idea as you - to make the robot maintain an upright posture when you push him. Whether you are then able to reproduce this same type of balancing while it is walking is another question.

Let me know how you go. I made some progress, but got annoyed with the Behaviour Control Program. I would much prefer to code in C, but haven't yet gone down the road of replacing the CM5 code.

Some tips: I would advise using a stepped response to the torque. ie: the more torque you register on the ankles, the more you move to counter-balance. Also, don't make the counter movements too large or the torque threshold too low, otherwise your robot will thrash around even to the slightest movements!

Good Luck!
Hi Smoothchat,

From what I have done so far, it is definitely possible to balance the robot when it is standing upright. I had the same idea as you - to make the robot maintain an upright posture when you push him. Whether you are then able to reproduce this same type of balancing while it is walking is another question.

Let me know how you go. I made some progress, but got annoyed with the Behaviour Control Program. I would much prefer to code in C, but haven't yet gone down the road of replacing the CM5 code.

Some tips: I would advise using a stepped response to the torque. ie: the more torque you register on the ankles, the more you move to counter-balance. Also, don't make the counter movements too large or the torque threshold too low, otherwise your robot will thrash around even to the slightest movements!

Good Luck!
jaho434
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 41
Joined: Mon Sep 04, 2006 1:00 am
Location: London, UK


9 postsPage 1 of 1
9 postsPage 1 of 1