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

libavr/libbioloid C library for CM5 released!

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
289 postsPage 7 of 201 ... 4, 5, 6, 7, 8, 9, 10 ... 20
289 postsPage 7 of 201 ... 4, 5, 6, 7, 8, 9, 10 ... 20

Post by BillB » Tue Feb 03, 2009 8:07 pm

Post by BillB
Tue Feb 03, 2009 8:07 pm

anjocama wrote:
Anybody have a pattern to share for walking bioloid in C?


I would love to be able to help out but my Bioloid is in a Hexapod configuation using Inverse Kinematics (i.e. I do not use motion editor sequences).

Sorry
anjocama wrote:
Anybody have a pattern to share for walking bioloid in C?


I would love to be able to help out but my Bioloid is in a Hexapod configuation using Inverse Kinematics (i.e. I do not use motion editor sequences).

Sorry
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by anjocama » Tue Feb 03, 2009 8:33 pm

Post by anjocama
Tue Feb 03, 2009 8:33 pm

You can tell me how you aply the Inverse Kinematics?

I think leave the motion editor via, I have not good results.
You can tell me how you aply the Inverse Kinematics?

I think leave the motion editor via, I have not good results.
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by BillB » Wed Feb 04, 2009 2:41 pm

Post by BillB
Wed Feb 04, 2009 2:41 pm

anjocama wrote:

You can tell me how you apply the Inverse Kinematics?

I think leave the motion editor via, I have not good results.


My hexapod has only 3 degres of freedom(DOF) on each leg. The Inverse Kinematics for 3 degrees is quite straight forward provided that you are comfortable with trigonometry (Sin, Cos, Atan etc.).

With the 3 DOF you do have a singularity directly underneath the hip, but fortunately with the Hexapod I don't need to go close to the singularity, so (so far) it is not a problem for me.

The Bioloid Humaniod has 3 DOF in each arm and 6 DOF in each leg. The arms should be relatively easy to apply IK too, although due to the servo configuration the singularity may become get a bit annoying.

The humanoid legs will be a different kettle of fish since they have double the number of servos. I have a few ideas on how to efficiently solve it, but I will need to rebuild my Bioloid Humanoid to try them out (but I am having too much fun with the Hexapod to do that anytime soon).

Once I have my Hexapod working properly I can borrow some servos from my Hexapod, rebuild the humanoid arms and get my IK code working on the Bioloid arms at least. Hopefully that should help you out.

One thing to point out is that the problem with bipeds is not so much the IK - but being able to deal with the dynamics of (balance, momentum, inertia etc.) which is a much, much bigger problem than the IK.
anjocama wrote:

You can tell me how you apply the Inverse Kinematics?

I think leave the motion editor via, I have not good results.


My hexapod has only 3 degres of freedom(DOF) on each leg. The Inverse Kinematics for 3 degrees is quite straight forward provided that you are comfortable with trigonometry (Sin, Cos, Atan etc.).

With the 3 DOF you do have a singularity directly underneath the hip, but fortunately with the Hexapod I don't need to go close to the singularity, so (so far) it is not a problem for me.

The Bioloid Humaniod has 3 DOF in each arm and 6 DOF in each leg. The arms should be relatively easy to apply IK too, although due to the servo configuration the singularity may become get a bit annoying.

The humanoid legs will be a different kettle of fish since they have double the number of servos. I have a few ideas on how to efficiently solve it, but I will need to rebuild my Bioloid Humanoid to try them out (but I am having too much fun with the Hexapod to do that anytime soon).

Once I have my Hexapod working properly I can borrow some servos from my Hexapod, rebuild the humanoid arms and get my IK code working on the Bioloid arms at least. Hopefully that should help you out.

One thing to point out is that the problem with bipeds is not so much the IK - but being able to deal with the dynamics of (balance, momentum, inertia etc.) which is a much, much bigger problem than the IK.
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by anjocama » Wed Feb 04, 2009 2:57 pm

Post by anjocama
Wed Feb 04, 2009 2:57 pm

OK. Thanks BillB.

I look for the algoritms for IK whit 3 degres of freedom and i do any test for move a leg at the moment.

Once i look the trig_tables.c of StuartL but i am confused. I do not understand this.

I understand what the trig_tables.c have relations whith precalculate for IK. But in this moment not understand this.

Can you share any example how apply this relations(in C)?
OK. Thanks BillB.

I look for the algoritms for IK whit 3 degres of freedom and i do any test for move a leg at the moment.

Once i look the trig_tables.c of StuartL but i am confused. I do not understand this.

I understand what the trig_tables.c have relations whith precalculate for IK. But in this moment not understand this.

Can you share any example how apply this relations(in C)?
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by StuartL » Wed Feb 04, 2009 6:19 pm

Post by StuartL
Wed Feb 04, 2009 6:19 pm

This is part of the IK for my humanoid. It's incomplete (deliberately) but it should give you an idea of how to use the library.

Code: Select all
void populateleg_left(point_t target, struct dx_stance *s, angle_t heel, angle_t ankle) {
    target = trig_rotatez(target, s->servo[HIP_L].position);
    angle_t hipflex_angle = -atan2(target.x, -target.z);
    angle_t ankle_angle = -ankle - hipflex_angle;
    point_t ankle_l = footposition_left(ankle_angle);
    point_t thigh_l = thighposition_left(s->servo[HIP_L].position, hipflex_angle);
    target = trig_rotatey(target, -hipflex_angle);
    target.x = target.x - ankle_l.x - thigh_l.x;
    target.y = target.y - ankle_l.y - thigh_l.y;
    target.z = target.z - ankle_l.z - thigh_l.z;
    int hyp = hypot(target.y, target.z);
    if (hyp <0> 150) hyp = 150;
    angle_t knee_angle = - A90 + flash_read16(&android_leg_ABC[hyp]) - 33; // 33 == angle offset for weird knee joint alignment
    angle_t thigh_angle = -atan2(target.y, -target.z) - flash_read16(&android_leg_ACB[hyp]) - 33; // As above
    s->servo[KNEE_L].position = knee_angle;
    s->servo[QUAD_L].position = hipflex_angle;
    s->servo[THIGH_L].position = thigh_angle;
    s->servo[ANKLE_L].position = ankle_angle;
    s->servo[HEEL_L].position = thigh_angle - knee_angle + A90 - heel;
}
This is part of the IK for my humanoid. It's incomplete (deliberately) but it should give you an idea of how to use the library.

Code: Select all
void populateleg_left(point_t target, struct dx_stance *s, angle_t heel, angle_t ankle) {
    target = trig_rotatez(target, s->servo[HIP_L].position);
    angle_t hipflex_angle = -atan2(target.x, -target.z);
    angle_t ankle_angle = -ankle - hipflex_angle;
    point_t ankle_l = footposition_left(ankle_angle);
    point_t thigh_l = thighposition_left(s->servo[HIP_L].position, hipflex_angle);
    target = trig_rotatey(target, -hipflex_angle);
    target.x = target.x - ankle_l.x - thigh_l.x;
    target.y = target.y - ankle_l.y - thigh_l.y;
    target.z = target.z - ankle_l.z - thigh_l.z;
    int hyp = hypot(target.y, target.z);
    if (hyp <0> 150) hyp = 150;
    angle_t knee_angle = - A90 + flash_read16(&android_leg_ABC[hyp]) - 33; // 33 == angle offset for weird knee joint alignment
    angle_t thigh_angle = -atan2(target.y, -target.z) - flash_read16(&android_leg_ACB[hyp]) - 33; // As above
    s->servo[KNEE_L].position = knee_angle;
    s->servo[QUAD_L].position = hipflex_angle;
    s->servo[THIGH_L].position = thigh_angle;
    s->servo[ANKLE_L].position = ankle_angle;
    s->servo[HEEL_L].position = thigh_angle - knee_angle + A90 - heel;
}
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by anjocama » Fri Feb 06, 2009 1:10 pm

Post by anjocama
Fri Feb 06, 2009 1:10 pm

Thanks StuartL,

I study the code and will do tests.
Thanks StuartL,

I study the code and will do tests.
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Significent Change

Post by RandomMatt » Sat Feb 14, 2009 12:58 am

Post by RandomMatt
Sat Feb 14, 2009 12:58 am

I've just created revision 1038... basically almost all the dx_get*() and dx_set*() functions are automatically generated from a memory description. This should make it much easier to add support for new devices (like Hamid's vision module), it also means that I should have complete support for the AX-S1 right now! (Although I don't have an AX-S1 to hand to test it with).

But... I've probably (trivially) broken your code. Many of the dx_set and dx_get functions have been renamed. If you want to know what the new names are, just have a look in libbioloid/bioloid/dynamixel_memory.h and it should be clear (make sure you read the comment at the top of that file).

As an aside, for those of you using the dx_read() and dx_write() functions directly you'll probably find a helpful dx_get or dx_set function that'll help your code self document.
I've just created revision 1038... basically almost all the dx_get*() and dx_set*() functions are automatically generated from a memory description. This should make it much easier to add support for new devices (like Hamid's vision module), it also means that I should have complete support for the AX-S1 right now! (Although I don't have an AX-S1 to hand to test it with).

But... I've probably (trivially) broken your code. Many of the dx_set and dx_get functions have been renamed. If you want to know what the new names are, just have a look in libbioloid/bioloid/dynamixel_memory.h and it should be clear (make sure you read the comment at the top of that file).

As an aside, for those of you using the dx_read() and dx_write() functions directly you'll probably find a helpful dx_get or dx_set function that'll help your code self document.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by anjocama » Tue Feb 17, 2009 12:01 am

Post by anjocama
Tue Feb 17, 2009 12:01 am

Great work!
Great work!
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by anjocama » Fri Mar 06, 2009 11:22 am

Post by anjocama
Fri Mar 06, 2009 11:22 am

Hi all,

I see at the library, you have suport for an IMU.

I´m interesting in mounting a IMU. I see the IMU of Huv Robotics (http://www.huvrobotics.com/)

Waht IMU are you installed? What you recomended to install?
Hi all,

I see at the library, you have suport for an IMU.

I´m interesting in mounting a IMU. I see the IMU of Huv Robotics (http://www.huvrobotics.com/)

Waht IMU are you installed? What you recomended to install?
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by RandomMatt » Fri Mar 06, 2009 6:42 pm

Post by RandomMatt
Fri Mar 06, 2009 6:42 pm

I use an AXDL330 attached to an HUV robotics general IO board (running at 3.3v). StuartL uses an HUV robotics IMU with the relevant sparkfun breakout boards.

Both work fine... the general I/O board is quite a lot larger physically - but apart from that they are both good.
I use an AXDL330 attached to an HUV robotics general IO board (running at 3.3v). StuartL uses an HUV robotics IMU with the relevant sparkfun breakout boards.

Both work fine... the general I/O board is quite a lot larger physically - but apart from that they are both good.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by anjocama » Sat Mar 07, 2009 1:38 am

Post by anjocama
Sat Mar 07, 2009 1:38 am

Thanks RandomMatt,

I think buy a AXDL330 and the IO board.
I see in Huv robotics page but can not buy online. I sent a email asking how i can buy de IO board.

I found a shop in my country for buy the AXDL330, the problem is the IO board.

You know other Shop online to buy the Huv IO board?
Thanks RandomMatt,

I think buy a AXDL330 and the IO board.
I see in Huv robotics page but can not buy online. I sent a email asking how i can buy de IO board.

I found a shop in my country for buy the AXDL330, the problem is the IO board.

You know other Shop online to buy the Huv IO board?
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by anjocama » Wed Mar 18, 2009 2:42 pm

Post by anjocama
Wed Mar 18, 2009 2:42 pm

Hi all,

Finally I bought a HUV robotics IMU and a ADXL330 at SparkFun.

I have seen the media in the library to read the IMU but i have problem for read the values return of ADXL330.

You can give me an example code of how to read these values?

Thank you very much!
Hi all,

Finally I bought a HUV robotics IMU and a ADXL330 at SparkFun.

I have seen the media in the library to read the IMU but i have problem for read the values return of ADXL330.

You can give me an example code of how to read these values?

Thank you very much!
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by DanielHK » Fri Mar 20, 2009 12:03 pm

Post by DanielHK
Fri Mar 20, 2009 12:03 pm

Hi Anjocma,

I also interest in buying HUV IMU, where are you bought from?

DanielHK
Hi Anjocma,

I also interest in buying HUV IMU, where are you bought from?

DanielHK
DanielHK
Robot Builder
Robot Builder
Posts: 8
Joined: Tue Sep 02, 2008 6:51 am

Post by anjocama » Sun Mar 22, 2009 10:49 pm

Post by anjocama
Sun Mar 22, 2009 10:49 pm

Hi DanielHK,

I have bought to Jon Hylands. I contacted he through the mail sales@huv.com on this web http://www.huvrobotics.com
Hi DanielHK,

I have bought to Jon Hylands. I contacted he through the mail sales@huv.com on this web http://www.huvrobotics.com
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by DanielHK » Mon Mar 23, 2009 4:27 am

Post by DanielHK
Mon Mar 23, 2009 4:27 am

Hi Anjocama,

Thanks for your reply. Actually I have sent my request order to Jon a few months ago but he has not replied. I also found that he had discontinued all bioloid related products. Did you bought the IMU board recently or a long time?

Thanks

DanielHK
Hi Anjocama,

Thanks for your reply. Actually I have sent my request order to Jon a few months ago but he has not replied. I also found that he had discontinued all bioloid related products. Did you bought the IMU board recently or a long time?

Thanks

DanielHK
DanielHK
Robot Builder
Robot Builder
Posts: 8
Joined: Tue Sep 02, 2008 6:51 am

PreviousNext
289 postsPage 7 of 201 ... 4, 5, 6, 7, 8, 9, 10 ... 20
289 postsPage 7 of 201 ... 4, 5, 6, 7, 8, 9, 10 ... 20