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 6 of 201 ... 3, 4, 5, 6, 7, 8, 9 ... 20
289 postsPage 6 of 201 ... 3, 4, 5, 6, 7, 8, 9 ... 20

Post by anjocama » Thu Jan 22, 2009 8:25 pm

Post by anjocama
Thu Jan 22, 2009 8:25 pm

OK StuartL,

I have the code of The guys at Plymouth. I go to play the tests with this.
OK StuartL,

I have the code of The guys at Plymouth. I go to play the tests with this.
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by StuartL » Thu Jan 22, 2009 10:12 pm

Post by StuartL
Thu Jan 22, 2009 10:12 pm

BillB wrote:StuartL wrote:

remove the large charging diode in the charging circuit to prevent the CM-5 attempting to charge it.



Good tip. Could you please point out whch is the safety diode? Is it the one labelled D1 (the black one next to the large resistor)?


It's the only diode which you can see without an electron scanning microscope, it's next to the large resistor and soldered to a track leading to the battery connector.

:D

Oh, and take a photo before you do it. Then you come to sell your CM-5 board to replace it with our 60MHz 32 bit replacement you can put it back.
BillB wrote:StuartL wrote:

remove the large charging diode in the charging circuit to prevent the CM-5 attempting to charge it.



Good tip. Could you please point out whch is the safety diode? Is it the one labelled D1 (the black one next to the large resistor)?


It's the only diode which you can see without an electron scanning microscope, it's next to the large resistor and soldered to a track leading to the battery connector.

:D

Oh, and take a photo before you do it. Then you come to sell your CM-5 board to replace it with our 60MHz 32 bit replacement you can put it back.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by anjocama » Thu Jan 22, 2009 10:28 pm

Post by anjocama
Thu Jan 22, 2009 10:28 pm

Are you working on a new board to replace the CM-5?

Can you give us more details? sounds very interesting :o
Are you working on a new board to replace the CM-5?

Can you give us more details? sounds very interesting :o
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by StuartL » Fri Jan 23, 2009 12:02 am

Post by StuartL
Fri Jan 23, 2009 12:02 am

anjocama wrote:Are you working on a new board to replace the CM-5?

Can you give us more details? sounds very interesting :o


It's nothing more than vapourware at the moment, Matt and I are talking on a weekly basis about what it needs to do and how (from a hardware and software perspective) we can resolve that.

We've also a major decision (that affects everything) as to whether it would support a Well Known Operating System (e.g. Linux as compiled for the AVR32) or be C-only. For us, where we're unlikely to want the extra overhead of a preemptive multitasking operating system, we don't need the extra hardware required to support a 'heavyweight' kernel.

All input is welcome, things we've been thinking about include:

- LiPo charging - probably won't happen for safety reasons.
- 50-150MHz 32bit MCU.
- At least two 1Mbit busses, maybe four.
- Wireless expansion. This is a subject of debate right now as there are many wireless standards and many connection options.
- PCB drop in replacement for CM-5. There may be a requirement for minor CM-5 case dremeling for new connectors.

This is probably a subject for another thread. I'll happily contribute if someone wants to start one :D
anjocama wrote:Are you working on a new board to replace the CM-5?

Can you give us more details? sounds very interesting :o


It's nothing more than vapourware at the moment, Matt and I are talking on a weekly basis about what it needs to do and how (from a hardware and software perspective) we can resolve that.

We've also a major decision (that affects everything) as to whether it would support a Well Known Operating System (e.g. Linux as compiled for the AVR32) or be C-only. For us, where we're unlikely to want the extra overhead of a preemptive multitasking operating system, we don't need the extra hardware required to support a 'heavyweight' kernel.

All input is welcome, things we've been thinking about include:

- LiPo charging - probably won't happen for safety reasons.
- 50-150MHz 32bit MCU.
- At least two 1Mbit busses, maybe four.
- Wireless expansion. This is a subject of debate right now as there are many wireless standards and many connection options.
- PCB drop in replacement for CM-5. There may be a requirement for minor CM-5 case dremeling for new connectors.

This is probably a subject for another thread. I'll happily contribute if someone wants to start one :D
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by anjocama » Fri Jan 23, 2009 11:44 am

Post by anjocama
Fri Jan 23, 2009 11:44 am

Is´s sound fantastic!

I think a good implementation are a SD card to save for example mapped motion or images for compare in image recognition...

I see this week in the robotis web he are developing a new controler board called CM-510.

limk: http://www.robotis.com/zbxe/25283#1
Is´s sound fantastic!

I think a good implementation are a SD card to save for example mapped motion or images for compare in image recognition...

I see this week in the robotis web he are developing a new controler board called CM-510.

limk: http://www.robotis.com/zbxe/25283#1
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by anjocama » Mon Jan 26, 2009 2:12 am

Post by anjocama
Mon Jan 26, 2009 2:12 am

Hi everybody,

2 questions:

1) How can i saw when a servo in movement has ended?

2) How can i set the sped movement of a servo with P_PRESENT_SPEED_L and P_PRESENT_SPEED_H

Thanks for the helps :D
Hi everybody,

2 questions:

1) How can i saw when a servo in movement has ended?

2) How can i set the sped movement of a servo with P_PRESENT_SPEED_L and P_PRESENT_SPEED_H

Thanks for the helps :D
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by BillB » Mon Jan 26, 2009 8:26 am

Post by BillB
Mon Jan 26, 2009 8:26 am

2 questions:

1) How can i saw when a servo in movement has ended?

2) How can i set the sped movement of a servo with P_PRESENT_SPEED_L and P_PRESENT_SPEED_H


Answers:
1) Check whether the P_PRESENT_POSITION_L and P_PRESENT_POSITION_H equals your goal position. You will may need to allow for a bit of tollarance if the servo is under some load.

2) The servo speed is set using the P_GOAL_SPEED_L and P_GOAL_SPEED_H.
2 questions:

1) How can i saw when a servo in movement has ended?

2) How can i set the sped movement of a servo with P_PRESENT_SPEED_L and P_PRESENT_SPEED_H


Answers:
1) Check whether the P_PRESENT_POSITION_L and P_PRESENT_POSITION_H equals your goal position. You will may need to allow for a bit of tollarance if the servo is under some load.

2) The servo speed is set using the P_GOAL_SPEED_L and P_GOAL_SPEED_H.
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by anjocama » Mon Jan 26, 2009 11:32 am

Post by anjocama
Mon Jan 26, 2009 11:32 am

What is the difference P_PRESENT_POSITION_L and P_PRESENT_POSITION_H?
What is the difference P_PRESENT_POSITION_L and P_PRESENT_POSITION_H?
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by BillB » Mon Jan 26, 2009 3:27 pm

Post by BillB
Mon Jan 26, 2009 3:27 pm

The position of the of the AX12 servos range from 0 to 1023. That is 1024 different positions. The AX12 registers are only byte sizes each with a range of 0 to 255. In order to be able to cover the range of positions in the AX12, 2 bytes are used, namely P_PRESENT_POSITION_H and P_PRESENT_POSITION_L.

P_PRESENT_POSITION_H is the most significat byte and the P_PRESENT_POSITION_L is the least significant byte. Together they will provide the actual position of the AX12 servo.

Best look at page 12 of the AX12 manual for more info since there are plenty of other items in the AX12 control table that are setup in this way (including setting the position).
The position of the of the AX12 servos range from 0 to 1023. That is 1024 different positions. The AX12 registers are only byte sizes each with a range of 0 to 255. In order to be able to cover the range of positions in the AX12, 2 bytes are used, namely P_PRESENT_POSITION_H and P_PRESENT_POSITION_L.

P_PRESENT_POSITION_H is the most significat byte and the P_PRESENT_POSITION_L is the least significant byte. Together they will provide the actual position of the AX12 servo.

Best look at page 12 of the AX12 manual for more info since there are plenty of other items in the AX12 control table that are setup in this way (including setting the position).
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by StuartL » Mon Jan 26, 2009 3:36 pm

Post by StuartL
Mon Jan 26, 2009 3:36 pm

The *_L byte is the 'low' byte of a 16-bit word. The *_H byte is the 'high' byte of the same 16-bit word.

Say, for example, you wanted to set your servo speed to 392. In hex (which is easier to work with for byte juggling) this is 0x0188 (padding to four digits, i.e. 16-bits).

The 'high' byte (also called the the most significant byte) is the 0x01, because it's 256 times more significant than the other byte. The 'low' byte (also called the least significant byte) is 0x88.

Therefore to read your servo speed (assuming it gives you 392) you would send a two-byte read command reading two bytes starting at P_PRESENT_SPEED_L. The first byte you got back would be 0x88 (136 in decimal), the second would be 0x01 (1 decimal).

To reverse this into the 'real' value you take the H value, multiply it by 256 and add the L value.
The *_L byte is the 'low' byte of a 16-bit word. The *_H byte is the 'high' byte of the same 16-bit word.

Say, for example, you wanted to set your servo speed to 392. In hex (which is easier to work with for byte juggling) this is 0x0188 (padding to four digits, i.e. 16-bits).

The 'high' byte (also called the the most significant byte) is the 0x01, because it's 256 times more significant than the other byte. The 'low' byte (also called the least significant byte) is 0x88.

Therefore to read your servo speed (assuming it gives you 392) you would send a two-byte read command reading two bytes starting at P_PRESENT_SPEED_L. The first byte you got back would be 0x88 (136 in decimal), the second would be 0x01 (1 decimal).

To reverse this into the 'real' value you take the H value, multiply it by 256 and add the L value.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by anjocama » Mon Jan 26, 2009 4:04 pm

Post by anjocama
Mon Jan 26, 2009 4:04 pm

OK. Understood.
Thank you StuartL/BillB very much again!
OK. Understood.
Thank you StuartL/BillB very much again!
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by anjocama » Tue Jan 27, 2009 3:01 pm

Post by anjocama
Tue Jan 27, 2009 3:01 pm

I have a problem...

I put the servo position whit:
s.servo[1].position=512;

But after when i read de pressent position when the servo ended de move whith:
uint8_t *posi = dx_read(1, P_PRESENT_POSITION_L, 2);
int presetP=(posi[1]*256)+posi[0];
The value of the presetP is 511 or 513 or 510...
The recovered value does not match whitch s.servo[1].position=512;

Am I doing something wrong?
I have a problem...

I put the servo position whit:
s.servo[1].position=512;

But after when i read de pressent position when the servo ended de move whith:
uint8_t *posi = dx_read(1, P_PRESENT_POSITION_L, 2);
int presetP=(posi[1]*256)+posi[0];
The value of the presetP is 511 or 513 or 510...
The recovered value does not match whitch s.servo[1].position=512;

Am I doing something wrong?
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by StuartL » Wed Jan 28, 2009 10:02 am

Post by StuartL
Wed Jan 28, 2009 10:02 am

Not at all!

The servo tries very hard to get to the exact position you specify but it may not reach it. If you want to check for move completion you could use a threshold (i.e. how close you've got to the target position), the servo speed (zero would indicate that it's stopped moving) and/or the servo torque (zero would indicate the servo doesn't want to move any more).

If using any of the above remember:

1) A threshold may need to be set per-joint as some will struggle to hit the right position and others will hit it first time every time.

2) The speed will zero while the servo is accelerating and if the servo hits something en route.

3) The torque output jumps around a bit while the standard servo firmware tries to hit the right position. You'll need to smooth this to use it.
Not at all!

The servo tries very hard to get to the exact position you specify but it may not reach it. If you want to check for move completion you could use a threshold (i.e. how close you've got to the target position), the servo speed (zero would indicate that it's stopped moving) and/or the servo torque (zero would indicate the servo doesn't want to move any more).

If using any of the above remember:

1) A threshold may need to be set per-joint as some will struggle to hit the right position and others will hit it first time every time.

2) The speed will zero while the servo is accelerating and if the servo hits something en route.

3) The torque output jumps around a bit while the standard servo firmware tries to hit the right position. You'll need to smooth this to use it.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by anjocama » Wed Jan 28, 2009 3:19 pm

Post by anjocama
Wed Jan 28, 2009 3:19 pm

OK.
I´m programing comparing the goal position and the pressent position whit a range of 1 to 9 positions of error. This work fine but i will incorporate the servo speed parameter to this formula (a great idea thanks)

I´m working on a fucntion based on the guys at Plymouth for access and play the pages and poses of the motion editor saved at the CM5 but change the servo position saved of any pose depending of extern factors.
OK.
I´m programing comparing the goal position and the pressent position whit a range of 1 to 9 positions of error. This work fine but i will incorporate the servo speed parameter to this formula (a great idea thanks)

I´m working on a fucntion based on the guys at Plymouth for access and play the pages and poses of the motion editor saved at the CM5 but change the servo position saved of any pose depending of extern factors.
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

Post by anjocama » Tue Feb 03, 2009 4:25 pm

Post by anjocama
Tue Feb 03, 2009 4:25 pm

Hi all,

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

I had test whith reading the motion editor secuences in C (based in the work of the Plaumount guys) but i have not good results. :(

I apreciate any help example code for solve bioloid walking in C.
Hi all,

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

I had test whith reading the motion editor secuences in C (based in the work of the Plaumount guys) but i have not good results. :(

I apreciate any help example code for solve bioloid walking in C.
anjocama
Savvy Roboteer
Savvy Roboteer
Posts: 36
Joined: Wed Jan 14, 2009 10:53 am

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