Progress always seems to come in fits and starts. I make some headway, then hit a bump in the road that either slows me down, or totally distracts me. Sometimes it's so severe that I get totally frustrated and have to set a project aside for a while. At other times it seems like everything wants to come together almost effortlessly. Thankfully, I seem to be in one of the latter cycles right now and everything is going pretty smoothly - knock on wood.
I was able to get the USBUIRT working with Girder, and to confirm that I could send commands to my Robosapien. The next step was to explore the USBUIRT API and DLL to see how it could be modified. The API is a 'developer' tool, and isn't provided with the USBUIRT, but if you have purchased a USBUIRT and are trying to develop an application based on it, you can request a copy from Jon via the support email address on his website. Jon was also kind enough to include a sample test program written in Visual Basic - which was great since I have a lot of experience with VB and will probably use it as the platform for a lot of my projects.
The test program was fairly easy to understand - especially since all I really wanted to do at this point was to transmit an IR code to the Robosapien. Getting the IR code format set correctly took a little while, and I was hindered by a bug in my VB installation that caused it to crash unexpectedly. The IR code format concern was sorted out by looking at other people's code on line to see how they had solved the problem. The VB problem was solved by a patch down-loaded from the Microsoft support website. Then, about 10:00 pm on Sunday night, I was finally able to send commands from a VB program running on my laptop to Robosapien!
The next step is to develop a spec for a fully functional control program, and then code it in VB. It looks like it should be very straight forward to develop a remote control program that just emulates the Robosapien remote. However, I think that particular approach might get boring very quickly. Besides, I always have the physical remote in case I need to use it.
At this point I'm leaning towards a choreography type controller. Something that would allow me to build up movement sequences and allow for macro loops, delays, repeats, and the like. It also needs to consider the elapsed time to execute each command into consideration. For example, when Pixar or Disney put together an animated movie they usually do the vocals and music first, then fit the animation timing into the audio tracks. I suspect that the same approach would work well in this case.
Assuming that I take that route, I will need to define a syntax - a command set, and a good place to start is with the commands that have already been setup by other Robosapien experimenters using the Girder application. The Girder GML file is basically a flat text file that includes a lot of parameters that won't be needed in this application. Pulling out just the group names, actions, command names, and the corresponding USBUIRT IR codes should provide a strong base for the choreography application (see the IR control code table below. )
|Robosapien USBUIRT IR Control Codes|
|Arms||R arm up||rarmup||R08008109808520212122212221212122212121808720|
|R arm down||rarmdown||R08008101808321212122212121212180862022212121|
|R arm out||rarmout||R08008109808321212122212121212122218086202121|
|R arm in||rarmin||R2D9980FE80852021212221212123218086202021808720|
|L arm up||larmup||R0800810E80832121212221212180852120212221808520|
|L arm down||larmdown||R080080F780852021212221212180872080862022212121|
|L arm out||larmout||R0800810B80842021212221212180872021218085212121|
|L arm in||larmin||R080080F48086202121222122218086208086202221808620|
|R arm all up||rarmallup||R14D18109808520212122212221212122212121808720|
|R arm all down||rarmalldown||R12D08101808321212122212121212180862022212121|
|R arm all out||rarmallout||R0FD38109808321212122212121212122218086202121|
|R arm all in||rarmallin||R105180FE80852021212221212123218086202021808720|
|L arm all up||larmallup||R1116810E80832121212221212180852120212221808520|
|L arm all down||larmalldown||R128980F780852021212 221212180872080862022212121|
|L arm all out||larmallout||R0FE6810B80862021212221212180872021218085212121|
|L arm all in||larmallin||R0DC680F48085202121222122218086208086202221808620|
|turn step left||turnstepl||R080080FD80852022218086202021808720212121212121|
|turn step right||turnstepr||R08008103808420212180862121212121222122212121|
|Arm Combo||right sweep||sweepr||R0800810380852080852120212221212122212121808720|
|right pick up||rpickup||R080080F680852021218086202221212180862022212121|
|left pick up||lpickup||R080081098085202121808620222180852080862022212121|
|right strike 1||rstrike1||R080080F78085208087202221212121218086202221808620|
|left strike 1||lstrike1||R080080EE808520808520222122218086208086202221808620|
|right strike 2||rstrike2||R080080FE8085208087202121212121212221808620808521|
|left strike 2||lstrike2||R080080F4808620808720222121218087202221808520808720|
|left strike 3||lstrike3||R080080F980852080852021212221808520212122212121|
|right strike 3||rstrike3||R08008103808520808520212122212121222121212121|
|Program Modes||R sensor||rsensor||R159E810080852022212021808620212122218086202121|