Robosapien Choreography Program – Some Thoughts

Now that my laptop can send commands to Robosapien, it's time to cobble together some sort of a control program. The first iteration will probably be a "player piano roll" type that will eventually get expanded to include a rich function set - hopefully including sensors and some type of video feedback.

The initial pass could be something as simple as an interpreted text file. Using the existing command names, the text file would look something like this-

<larmallup> ' left arm all up
<larmout> ' left arm out
<leanr> ' lean right

Of course, the interpreter will need to handle the parsing, ignore the comments, and keep track of the elapsed time. My concern is that since there is no direct feedback from Robosapien to indicate the completion of each command, it may be very easy to get out of sync and have the commands sent faster than Robosapien can receive, decode, and act upon them.

Once I have that up and debugged, then the next step will be to add some additional functionality. It would be useful to have a programmed pause or wait state. For example, if I wanted Robosapien to do an ocean 'wave' move, it would look similar to this-

<larmallup> ' left arm all up
<larmout> ' left arm out
<leanr> ' lean right
<rarmalldown> ' right arm all down
<rarmin> ' right arm in
<wait time=5> ' pause
<rarmallup> ' right arm all up
<rarmout> ' right arm out
<leanl> ' lean left
<leanl> ' lean left
<larmalldown> ' left arm all down
<larmin> ' left arm in
<end> ' end of sequence

The <wait time=5> command simply suspends the transmission of new commands to Robosapien for a given period. It will take a little experimentation and testing to determine the best intervals to use. Perhaps tenths or hundreds of a second.

Most music and dance includes lots of repetition - a musical phrase or set of dance moves may be repeated over and over again during a single performance. If the repetition is simple - say just repeating a single command, then we can add a 'repeat=n' command for the interpretor to process. If the repetition is more complex involving a sequence of commands, then it could be implemented using the gosub/return model.

<gosub dosedo>
<gosub dosedo>
<whistle> '
<gosub dosedo>
<fart repeat=3> '
<sub dosedo>
<wait time=5>
<wait time=5> '
<return> '

I'm going to give it some more thought, but will probably start putting together some initial code over the next week or so.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>