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

Biotoken about to be released; add your comments and wishes

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

Biotoken about to be released; add your comments and wishes

Post by inaki » Fri Jun 09, 2006 5:00 pm

Post by inaki
Fri Jun 09, 2006 5:00 pm

My tokenizer, that I call Biotoken, is about to be released, but I would like to hear about any features you would like to include before release.

The tokenizer supports every sentence included in the original BCP:

START
END
LOAD
CALL
RETURN
JUMP
IF
ELSE
ELSE_IF
CONT_IF
COMPUTE

plus the following:

- Comments
- Constants
- The ability to include libraries
- FOR/NEXT Sentence
- REPEAT/UNTIL Sentence
- WHILE/WEND Sentence

You can write the source code with any editor. The tokenizer is a console mode program. You pass the file to compile as an argument and then the tokenizer generates the code, connects to your robot and transmits the file (an average program takes a few seconds to compile and transmit). An option allows to see the strings generated with the Print sentence.

I am able to write programs for Biotoken about 10 times faster than using BCP. Programs are easier to read and easier to maintain and fix. The only iconvenient is that it is easier to have an error because you edit freely your code text.

The tokenizer is case 'insensitive'. You may write LOAD, load, Load or wathever and it is all the same. The same applies to constants, labels and variables.

All registers covered by BCP have names under Biotoken that you can use to refer to almost any register in CM5, AX or AX-S1 devices. You can define your own constants or use the numerical values instead.

Here is an example of how Biotoken code looks:

//This is an example program for listening the FX sounds in AX-S1
START

//Main Loop
FOR MUSIC = 0 TO 27
LOAD AX.100.BUZZER_VAL, 255
LOAD AX.100.BUZZER_INDEX, MUSIC
CALL DELAY
NEXT MUSIC
JUMP Exit

//Generic Delay
DELAY:
LOAD CM5.TIMER, 20
DELAY1:
IF CM5.TIMER > 0 THEN JUMP DELAY1
RETURN

Exit:
END


Please add your comments and the features you would like to see, before I release the first version.
My tokenizer, that I call Biotoken, is about to be released, but I would like to hear about any features you would like to include before release.

The tokenizer supports every sentence included in the original BCP:

START
END
LOAD
CALL
RETURN
JUMP
IF
ELSE
ELSE_IF
CONT_IF
COMPUTE

plus the following:

- Comments
- Constants
- The ability to include libraries
- FOR/NEXT Sentence
- REPEAT/UNTIL Sentence
- WHILE/WEND Sentence

You can write the source code with any editor. The tokenizer is a console mode program. You pass the file to compile as an argument and then the tokenizer generates the code, connects to your robot and transmits the file (an average program takes a few seconds to compile and transmit). An option allows to see the strings generated with the Print sentence.

I am able to write programs for Biotoken about 10 times faster than using BCP. Programs are easier to read and easier to maintain and fix. The only iconvenient is that it is easier to have an error because you edit freely your code text.

The tokenizer is case 'insensitive'. You may write LOAD, load, Load or wathever and it is all the same. The same applies to constants, labels and variables.

All registers covered by BCP have names under Biotoken that you can use to refer to almost any register in CM5, AX or AX-S1 devices. You can define your own constants or use the numerical values instead.

Here is an example of how Biotoken code looks:

//This is an example program for listening the FX sounds in AX-S1
START

//Main Loop
FOR MUSIC = 0 TO 27
LOAD AX.100.BUZZER_VAL, 255
LOAD AX.100.BUZZER_INDEX, MUSIC
CALL DELAY
NEXT MUSIC
JUMP Exit

//Generic Delay
DELAY:
LOAD CM5.TIMER, 20
DELAY1:
IF CM5.TIMER > 0 THEN JUMP DELAY1
RETURN

Exit:
END


Please add your comments and the features you would like to see, before I release the first version.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by stevo3d » Fri Jun 09, 2006 7:31 pm

Post by stevo3d
Fri Jun 09, 2006 7:31 pm

Inaki, that is incredibly great. Way to go! Words cannot express my gratitude. You are my hero. :)

Feature requests:

CASE statements.

Complex IF statements, like
IF (CM5.TIMER > 0) OR ((AX.100.BUZZER_VAL > 0) AND (VAR1 = 2)) THEN ...
IF (VAR1 > ((VAR2 * 2) + 5) THEN ...

Complex COMPUTE statements, like
COMPUTE VAR1 = (VAR1 * 2) + 30
COMPUTE VAR3 = (AX.18.CURRENT_POS + CM5.TIMER) * (VAR1 - VAR2)

Syntax checking (if you don't have it already).

Ability to pour beer without spilling.
Inaki, that is incredibly great. Way to go! Words cannot express my gratitude. You are my hero. :)

Feature requests:

CASE statements.

Complex IF statements, like
IF (CM5.TIMER > 0) OR ((AX.100.BUZZER_VAL > 0) AND (VAR1 = 2)) THEN ...
IF (VAR1 > ((VAR2 * 2) + 5) THEN ...

Complex COMPUTE statements, like
COMPUTE VAR1 = (VAR1 * 2) + 30
COMPUTE VAR3 = (AX.18.CURRENT_POS + CM5.TIMER) * (VAR1 - VAR2)

Syntax checking (if you don't have it already).

Ability to pour beer without spilling.
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 Pev » Fri Jun 09, 2006 9:05 pm

Post by Pev
Fri Jun 09, 2006 9:05 pm

Awesome inaki, I think you've covered everything I can think of but can't wait to try it. Like Stevo3d you are now officailly my hero, thanks

Pev
Awesome inaki, I think you've covered everything I can think of but can't wait to try it. Like Stevo3d you are now officailly my hero, thanks

Pev
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 stevo3d » Sun Jun 11, 2006 9:19 am

Post by stevo3d
Sun Jun 11, 2006 9:19 am

Inaki, I thought of another feature that would be good to have. Random numbers and modulo. I guess that's two features. :)

Apologies if, through my ignorance, my suggestions are too difficult or impossible to implement in the context of the tokenizer.
Inaki, I thought of another feature that would be good to have. Random numbers and modulo. I guess that's two features. :)

Apologies if, through my ignorance, my suggestions are too difficult or impossible to implement in the context of the tokenizer.
Last edited by stevo3d on Tue Jun 13, 2006 12:33 am, edited 2 times in total.
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 barbar » Sun Jun 11, 2006 2:47 pm

Post by barbar
Sun Jun 11, 2006 2:47 pm

... back home again :D

Inaki,

I am heavily impressed of your progress and the developments ... also can't wait to use Biotoken. In all respects I share the same opinion as stevo3d and Pev (except the beer pouring requirement ... in this point I appeal to the responsibility of the programmer/user 8) ).

Cheers!
barbar
... back home again :D

Inaki,

I am heavily impressed of your progress and the developments ... also can't wait to use Biotoken. In all respects I share the same opinion as stevo3d and Pev (except the beer pouring requirement ... in this point I appeal to the responsibility of the programmer/user 8) ).

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

Post by VanHelsing » Sun Jun 11, 2006 6:20 pm

Post by VanHelsing
Sun Jun 11, 2006 6:20 pm

Inaki, this is absolutely wonderful when it all works out the way you want it :!: . Really sorry that I can’t contribute much to your question cause I didn’t explore much of the Behavior Control Programmer yet. But, I’m curious as hell to work with your Biotoken.
Inaki, this is absolutely wonderful when it all works out the way you want it :!: . Really sorry that I can’t contribute much to your question cause I didn’t explore much of the Behavior Control Programmer yet. But, I’m curious as hell to work with your Biotoken.
VanHelsing
Robot Builder
Robot Builder
User avatar
Posts: 22
Joined: Tue May 30, 2006 1:00 am
Location: Netherlands

Post by inaki » Mon Jun 12, 2006 1:57 pm

Post by inaki
Mon Jun 12, 2006 1:57 pm

Thanks for your comments.

CASE statement can be integrated, no problem.
Free complex logic operations and computations could also be integrated but for now I will leave it out. Actually I thought in first place about a free form syntax but eventually decided to keep the look of the original BCP.

Random numbers cannot be accomodated in the tokenizer because for that to work you would need a random generator in the CM5 side. Note that you cannot do anything not supported already by the tokens set provided.

The tokenizer performs some syntax checking although it is really permissive meaning that you can write wrong sentences in some cases.
Other than syntax I do not perform logic validity tests to prevent incorrect statements like for example writing on a read only register. Under Biotoken you can use any register as source or destination. Note that BCP prevents this.
Thanks for your comments.

CASE statement can be integrated, no problem.
Free complex logic operations and computations could also be integrated but for now I will leave it out. Actually I thought in first place about a free form syntax but eventually decided to keep the look of the original BCP.

Random numbers cannot be accomodated in the tokenizer because for that to work you would need a random generator in the CM5 side. Note that you cannot do anything not supported already by the tokens set provided.

The tokenizer performs some syntax checking although it is really permissive meaning that you can write wrong sentences in some cases.
Other than syntax I do not perform logic validity tests to prevent incorrect statements like for example writing on a read only register. Under Biotoken you can use any register as source or destination. Note that BCP prevents this.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Re: Biotoken about to be released; add your comments and wis

Post by barbar » Fri Jun 23, 2006 10:29 pm

Post by barbar
Fri Jun 23, 2006 10:29 pm

inaki wrote: ... Biotoken, is about to be released ...


Inaki, may I volunteer as a pre-alpha tester? :D

Cheers!
barbar
inaki wrote: ... Biotoken, is about to be released ...


Inaki, may I volunteer as a pre-alpha tester? :D

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

Post by VanHelsing » Sat Jul 08, 2006 11:59 am

Post by VanHelsing
Sat Jul 08, 2006 11:59 am

Inaki,

Is your Biotoken project going okay?

Looking forward to it :D
Inaki,

Is your Biotoken project going okay?

Looking forward to it :D
VanHelsing
Robot Builder
Robot Builder
User avatar
Posts: 22
Joined: Tue May 30, 2006 1:00 am
Location: Netherlands

Post by Pev » Fri Jul 28, 2006 9:50 am

Post by Pev
Fri Jul 28, 2006 9:50 am

Hi Inaki,

Finally made it back from my business trip and was wondering how the Tokenizer project was progressing? Am available if you need alpha/beta testers.

Cheers

Pev
Hi Inaki,

Finally made it back from my business trip and was wondering how the Tokenizer project was progressing? Am available if you need alpha/beta testers.

Cheers

Pev
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 inaki » Sat Aug 19, 2006 11:29 am

Post by inaki
Sat Aug 19, 2006 11:29 am

The first version of Biotoken tokenizer is finished. However I have found a problem when transferring the program to CM5. I have tried to hack the way BCP sends the program but there is still a problem: the CM5 stays in programming mode after I send the program instead of returning to PLAY mode as it happens when using BCP. I don't know why this happens.:-(
Any help would be welcome !:-) If you are curious you can see the BCP protocol using a serial monitor program; I use HSD.

I can post here the protocol as I have seen it, if anyone is interested in working to find out the problem.
The first version of Biotoken tokenizer is finished. However I have found a problem when transferring the program to CM5. I have tried to hack the way BCP sends the program but there is still a problem: the CM5 stays in programming mode after I send the program instead of returning to PLAY mode as it happens when using BCP. I don't know why this happens.:-(
Any help would be welcome !:-) If you are curious you can see the BCP protocol using a serial monitor program; I use HSD.

I can post here the protocol as I have seen it, if anyone is interested in working to find out the problem.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by pepperm » Mon Aug 21, 2006 1:31 pm

Post by pepperm
Mon Aug 21, 2006 1:31 pm

Inaki

Can't wait to give Bitoken a go. Have you made any progress with the problem?

Mark
Inaki

Can't wait to give Bitoken a go. Have you made any progress with the problem?

Mark
pepperm
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 190
Joined: Sat Jul 01, 2006 1:00 am

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

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

Any updates on this, Inaki?!!? Any working releases?

This would be a very handy tool...... I'm finding the GUI BCP very tedious.

Cheers,

jaho434
Any updates on this, Inaki?!!? Any working releases?

This would be a very handy tool...... I'm finding the GUI BCP very tedious.

Cheers,

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

Post by smoothchat » Tue Oct 10, 2006 1:46 pm

Post by smoothchat
Tue Oct 10, 2006 1:46 pm

inaki,


Have you thought of having your program save out a file that can be read back into the Behaviour Programmer. You'd then use the behaviour programmer to transfer to the Bioloid. Could be handy for final syntax 'sanity' checking too.
inaki,


Have you thought of having your program save out a file that can be read back into the Behaviour Programmer. You'd then use the behaviour programmer to transfer to the Bioloid. Could be handy for final syntax 'sanity' checking too.
smoothchat
Robot Builder
Robot Builder
User avatar
Posts: 13
Joined: Tue Oct 10, 2006 1:00 am
Location: Australia

Post by Boxey » Fri May 18, 2007 3:52 am

Post by Boxey
Fri May 18, 2007 3:52 am

Hi Inaki,

How is this coming along? If you are stuck, perhaps you can share with us what you have done? Or the result of your reverse engineered .bpg files?

The Behavior Control Programmer is really a pain to use.
Hi Inaki,

How is this coming along? If you are stuck, perhaps you can share with us what you have done? Or the result of your reverse engineered .bpg files?

The Behavior Control Programmer is really a pain to use.
Boxey
Newbie
Newbie
Posts: 1
Joined: Fri May 18, 2007 3:49 am


15 postsPage 1 of 1
15 postsPage 1 of 1