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

Behavior Control. Internals.

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

Behavior Control. Internals.

Post by inaki » Tue May 23, 2006 6:06 pm

Post by inaki
Tue May 23, 2006 6:06 pm

I have been looking at how Behavior Control works. It works by sending codes in boot mode to CM5. Once in boot mode it sends codes to address A000 in CM5. The codes are tokens that represent commands (for example, token 4 is Start, 5 is End, etc). Once the command is sent to CM5 it returns a result code.

This makes possible to write a script or a program that may be interpreted to send a sequence of commands or even write a program that sends commands on demand.

The Behavior Control interface results too heavy to write programs when one has some experience with the program. Once experience is acquired it would be much more easier to write directly commands within a script or something.

A script interpreter would be nice to have.
I have been looking at how Behavior Control works. It works by sending codes in boot mode to CM5. Once in boot mode it sends codes to address A000 in CM5. The codes are tokens that represent commands (for example, token 4 is Start, 5 is End, etc). Once the command is sent to CM5 it returns a result code.

This makes possible to write a script or a program that may be interpreted to send a sequence of commands or even write a program that sends commands on demand.

The Behavior Control interface results too heavy to write programs when one has some experience with the program. Once experience is acquired it would be much more easier to write directly commands within a script or something.

A script interpreter would be nice to have.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Re: Behavior Control. Internals.

Post by barbar » Tue May 23, 2006 6:33 pm

Post by barbar
Tue May 23, 2006 6:33 pm

Inaki, we are thinking about the same goal: scripting. But our way and the means to get there may be different, if I haven't misunderstood .. :? .. are you really talking about the boot mode? Please explain it as if I was a 12 year old ...

I was thinking about using the "easy" MANAGEMENT MODE (with all its already existing commands and return codes) and a "script host" (i.e. Pocket PC) connected by RS232.

Unfortunately I am a bad programmer ..

Lets keep these thoughts alive, they are very interesting.

byebye
barbar

edited a few minutes later/barbar
Inaki, we are thinking about the same goal: scripting. But our way and the means to get there may be different, if I haven't misunderstood .. :? .. are you really talking about the boot mode? Please explain it as if I was a 12 year old ...

I was thinking about using the "easy" MANAGEMENT MODE (with all its already existing commands and return codes) and a "script host" (i.e. Pocket PC) connected by RS232.

Unfortunately I am a bad programmer ..

Lets keep these thoughts alive, they are very interesting.

byebye
barbar

edited a few minutes later/barbar
barbar
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 87
Joined: Tue Apr 04, 2006 1:00 am
Location: Germany

Post by inaki » Tue May 23, 2006 7:20 pm

Post by inaki
Tue May 23, 2006 7:20 pm

Yes, I am talking about boot mode. Behavior Control(BC) loads a block of bytes directly to CM5 memory with the command LOAD. To achieve this BC enters boot mode (the same boot mode you enter when presing the # key under Robot Terminal; it actually does the same!). The bytes loaded at the address specificed are the commands you write in BC but tokenized, i.e., converted to codes. Each command is represented by a code plus its parameters.

So for example to send the sequence
START
LOAD DX17,30,1
END
is converted to (simplified a bit):

*** ; Starts a command
########## ;Enters Boot Mode
LD A000 ; select address for loading
0D
04 ; START
06; LOAD
17; Servo ID
30; Register
1; value for this register
05 ;END
*** ;end command

So you might use any utility to upload programs to CM5 writen in any way you want, be it an script, a VB program or a C program. Of course you would need to convert the commands to tokens before sending them.

I am talking here about writing programs the way BC does but without using BC.

I am afraid I don't get your idea of scripting here. :-( May you ellaborate about your scripting idea ?
Yes, I am talking about boot mode. Behavior Control(BC) loads a block of bytes directly to CM5 memory with the command LOAD. To achieve this BC enters boot mode (the same boot mode you enter when presing the # key under Robot Terminal; it actually does the same!). The bytes loaded at the address specificed are the commands you write in BC but tokenized, i.e., converted to codes. Each command is represented by a code plus its parameters.

So for example to send the sequence
START
LOAD DX17,30,1
END
is converted to (simplified a bit):

*** ; Starts a command
########## ;Enters Boot Mode
LD A000 ; select address for loading
0D
04 ; START
06; LOAD
17; Servo ID
30; Register
1; value for this register
05 ;END
*** ;end command

So you might use any utility to upload programs to CM5 writen in any way you want, be it an script, a VB program or a C program. Of course you would need to convert the commands to tokens before sending them.

I am talking here about writing programs the way BC does but without using BC.

I am afraid I don't get your idea of scripting here. :-( May you ellaborate about your scripting idea ?
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by barbar » Tue May 23, 2006 8:13 pm

Post by barbar
Tue May 23, 2006 8:13 pm

Inaki,

Got you, thanks! (How the hell did you get there that fast?)

I was only thinking about using the management mode by means of sending the specific commands (i.e. CID, READ, WRITE, GO ...) "through" the robot terminal program as an existing command interpreter (correct word?) to the CM-5. But even if it would work, the vocabulary and the functions would be rather poor.

How will you proceed?

byebye
barbar
Inaki,

Got you, thanks! (How the hell did you get there that fast?)

I was only thinking about using the management mode by means of sending the specific commands (i.e. CID, READ, WRITE, GO ...) "through" the robot terminal program as an existing command interpreter (correct word?) to the CM-5. But even if it would work, the vocabulary and the functions would be rather poor.

How will you proceed?

byebye
barbar
barbar
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 87
Joined: Tue Apr 04, 2006 1:00 am
Location: Germany

Post by barbar » Wed May 24, 2006 4:29 pm

Post by barbar
Wed May 24, 2006 4:29 pm

I wrote: ... "through" the robot terminal program ...

This "sort of scripting" works (i.e. using a keyboard macro editor) but of course its rubbish (cannot work with the return values). Sorry for this misleading idea :oops:
I wrote: ... "through" the robot terminal program ...

This "sort of scripting" works (i.e. using a keyboard macro editor) but of course its rubbish (cannot work with the return values). Sorry for this misleading idea :oops:
barbar
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 87
Joined: Tue Apr 04, 2006 1:00 am
Location: Germany

Re: Behavior Control. Internals.

Post by barbar » Thu May 25, 2006 1:32 am

Post by barbar
Thu May 25, 2006 1:32 am

inaki wrote:... it would be much more easier to write directly commands within a script or something.

A script interpreter would be nice to have.


Two beers later :idea:

How about asking Robosavvy's limor modestly to write a very polite Email to Robotis kindly asking for the source code of the Robot Terminal Program or maybe even better an early non-GUI version of the Behaviour Control Program (Afaic limor could lay the entire blame on a few difficult customers) :lol: :lol:
inaki wrote:... it would be much more easier to write directly commands within a script or something.

A script interpreter would be nice to have.


Two beers later :idea:

How about asking Robosavvy's limor modestly to write a very polite Email to Robotis kindly asking for the source code of the Robot Terminal Program or maybe even better an early non-GUI version of the Behaviour Control Program (Afaic limor could lay the entire blame on a few difficult customers) :lol: :lol:
barbar
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 87
Joined: Tue Apr 04, 2006 1:00 am
Location: Germany

Post by inaki » Thu May 25, 2006 9:05 am

Post by inaki
Thu May 25, 2006 9:05 am

The Robot Terminal is nothing more than a simple terminal Program. You can do the same with any terminal program. Try with Hyperterminal for example. The only thing it does is sending and receiving strings.
So emulating the Robot Terminal commands should be easy with any program. The only concern here is speed. For example, if you want to test a parameter you need to read it then compare with some value and then write the result. All using strings. It would be probably slow but it migh worth the truble to write a small program and test it because it is easy to do.

Behavior Control is another matter. I think it is good enough for what it is intended. But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.

Of course, the BC source code would help a lot !
The Robot Terminal is nothing more than a simple terminal Program. You can do the same with any terminal program. Try with Hyperterminal for example. The only thing it does is sending and receiving strings.
So emulating the Robot Terminal commands should be easy with any program. The only concern here is speed. For example, if you want to test a parameter you need to read it then compare with some value and then write the result. All using strings. It would be probably slow but it migh worth the truble to write a small program and test it because it is easy to do.

Behavior Control is another matter. I think it is good enough for what it is intended. But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.

Of course, the BC source code would help a lot !
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by Pev » Thu May 25, 2006 9:30 am

Post by Pev
Thu May 25, 2006 9:30 am

inaki wrote:Behavior Control is another matter. I think it is good enough for what it is intended. But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.


I agree that a method to write behaviour control programs without hte GUI would be a huge improvement. And as inaki says once we have the token list the process of developing an interface is realatively easy, especially with the Visual Sudio 2005 serialport class. For me this would be the biggest improvement........
inaki wrote:Behavior Control is another matter. I think it is good enough for what it is intended. But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.


I agree that a method to write behaviour control programs without hte GUI would be a huge improvement. And as inaki says once we have the token list the process of developing an interface is realatively easy, especially with the Visual Sudio 2005 serialport class. For me this would be the biggest improvement........
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by barbar » Thu May 25, 2006 1:17 pm

Post by barbar
Thu May 25, 2006 1:17 pm

inaki wrote:The Robot Terminal is nothing more than a simple terminal Program. You can do the same with any terminal program. Try with Hyperterminal for example.


Thank you very much for helping an unexperienced user! I've got so much to learn ... :oops:

Of course I didn't hesitate to try and use Hyperterminal (1999 edition). It would be a slight advantage if it works - mainly because of copy/paste and recording functions. O.k., it works somehow but I couldn't achieve real stable conditions. I tried the bunch of parameters and had the best results with VT100 emulation (leaving the rest in standard conditions), but the window stays to small and the output/input fields of the CM-5 operating progam are shifted to wrong positions.

Nevertheless, thanks for your explanation. Maybe I'll have a try with some other terminal program.
inaki wrote:The Robot Terminal is nothing more than a simple terminal Program. You can do the same with any terminal program. Try with Hyperterminal for example.


Thank you very much for helping an unexperienced user! I've got so much to learn ... :oops:

Of course I didn't hesitate to try and use Hyperterminal (1999 edition). It would be a slight advantage if it works - mainly because of copy/paste and recording functions. O.k., it works somehow but I couldn't achieve real stable conditions. I tried the bunch of parameters and had the best results with VT100 emulation (leaving the rest in standard conditions), but the window stays to small and the output/input fields of the CM-5 operating progam are shifted to wrong positions.

Nevertheless, thanks for your explanation. Maybe I'll have a try with some other terminal program.
barbar
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 87
Joined: Tue Apr 04, 2006 1:00 am
Location: Germany

Post by stevo3d » Thu May 25, 2006 7:41 pm

Post by stevo3d
Thu May 25, 2006 7:41 pm

inaki wrote:But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.


YES PLEASE continue working on this! :) The GUI is so slooow for those of us who can type. The GUI also makes it difficult to manage programs longer than a couple of screens full, especially if there are a bunch of subroutines involved.

Steve
inaki wrote:But I would like to write programs without the BC interface. I am working now hacking the list of tokens. I will post my findings here when I get the whole list.


YES PLEASE continue working on this! :) The GUI is so slooow for those of us who can type. The GUI also makes it difficult to manage programs longer than a couple of screens full, especially if there are a bunch of subroutines involved.

Steve
Steve Munk
stevo3d
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 46
Joined: Fri May 19, 2006 1:00 am
Location: Fairbanks, Alaska, USA

Post by billyzelsnack » Wed Jan 10, 2007 7:22 am

Post by billyzelsnack
Wed Jan 10, 2007 7:22 am

Did you get any further with this? I am thinking of writing a little C api to simplify doing just this. Any reason why I should rethink that plan?

inaki wrote:Yes, I am talking about boot mode. Behavior Control(BC) loads a block of bytes directly to CM5 memory with the command LOAD. To achieve this BC enters boot mode (the same boot mode you enter when presing the # key under Robot Terminal; it actually does the same!). The bytes loaded at the address specificed are the commands you write in BC but tokenized, i.e., converted to codes. Each command is represented by a code plus its parameters.

So for example to send the sequence
START
LOAD DX17,30,1
END
is converted to (simplified a bit):

*** ; Starts a command
########## ;Enters Boot Mode
LD A000 ; select address for loading
0D
04 ; START
06; LOAD
17; Servo ID
30; Register
1; value for this register
05 ;END
*** ;end command

So you might use any utility to upload programs to CM5 writen in any way you want, be it an script, a VB program or a C program. Of course you would need to convert the commands to tokens before sending them.

I am talking here about writing programs the way BC does but without using BC.

I am afraid I don't get your idea of scripting here. :-( May you ellaborate about your scripting idea ?
Did you get any further with this? I am thinking of writing a little C api to simplify doing just this. Any reason why I should rethink that plan?

inaki wrote:Yes, I am talking about boot mode. Behavior Control(BC) loads a block of bytes directly to CM5 memory with the command LOAD. To achieve this BC enters boot mode (the same boot mode you enter when presing the # key under Robot Terminal; it actually does the same!). The bytes loaded at the address specificed are the commands you write in BC but tokenized, i.e., converted to codes. Each command is represented by a code plus its parameters.

So for example to send the sequence
START
LOAD DX17,30,1
END
is converted to (simplified a bit):

*** ; Starts a command
########## ;Enters Boot Mode
LD A000 ; select address for loading
0D
04 ; START
06; LOAD
17; Servo ID
30; Register
1; value for this register
05 ;END
*** ;end command

So you might use any utility to upload programs to CM5 writen in any way you want, be it an script, a VB program or a C program. Of course you would need to convert the commands to tokens before sending them.

I am talking here about writing programs the way BC does but without using BC.

I am afraid I don't get your idea of scripting here. :-( May you ellaborate about your scripting idea ?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by inaki » Wed Jan 10, 2007 8:40 am

Post by inaki
Wed Jan 10, 2007 8:40 am

I got stuck at the very end of the project. I was able to convert a program to tokens and save it to CM5 but was unable to put the CM5 in PLAY mode again, except using the buttons!
Something weird occurs when uploading the programs. This may or may not be your problem. I did not find the root of the problem however.

Lately I have been working with alternative programming languages so I have not paid more atention to the tokenizer.:(
I got stuck at the very end of the project. I was able to convert a program to tokens and save it to CM5 but was unable to put the CM5 in PLAY mode again, except using the buttons!
Something weird occurs when uploading the programs. This may or may not be your problem. I did not find the root of the problem however.

Lately I have been working with alternative programming languages so I have not paid more atention to the tokenizer.:(
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by billyzelsnack » Wed Jan 10, 2007 4:52 pm

Post by billyzelsnack
Wed Jan 10, 2007 4:52 pm

Well. I'll go ahead with the project then and see what I can do with it. My goal is to create a bare minimum C api that lets me control/read the servos. I'll post a demo along with the source to everything once/if I get somewhere with it.
Well. I'll go ahead with the project then and see what I can do with it. My goal is to create a bare minimum C api that lets me control/read the servos. I'll post a demo along with the source to everything once/if I get somewhere with it.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by inaki » Wed Jan 10, 2007 7:35 pm

Post by inaki
Wed Jan 10, 2007 7:35 pm

If you just want to control the Bioloid with C you can use the remote controller API that is ASCII based. You don't need tokens. Actually any program that is able to send ASCII strings can control the Bioloid using these commands.
If you just want to control the Bioloid with C you can use the remote controller API that is ASCII based. You don't need tokens. Actually any program that is able to send ASCII strings can control the Bioloid using these commands.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by billyzelsnack » Wed Jan 10, 2007 7:55 pm

Post by billyzelsnack
Wed Jan 10, 2007 7:55 pm

Where do I find info on the remote controller api?
Where do I find info on the remote controller api?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Next
21 postsPage 1 of 21, 2
21 postsPage 1 of 21, 2