PDA

View Full Version : Now that Pleo 1.0.2 is out, how about the PDK?


alex_r
03-04-2008, 03:31 AM
Is TechTalk dead or do everybody just wait for the PDK to appear (as I do)?

Any news about that? Any possibility of some "incremental" PDK releases (like API documentation/headers first?) or a Beta program? The small PDF document that's recently appeared on Pleoworld's developer page is just a teaser...

PleoPet
03-05-2008, 01:25 PM
> Is TechTalk dead or do everybody just wait for the PDK to appear (as I do)?
Please keep asking. The more people who ask may increase the priorities at UGOBE.

---
BTW:
For people interested in modifying the ARM processors, the binaries are available in the 1.02 update.
'head.img' - is the head/vision CPU. 32KB code max.
'pleo.img' - is the main body CPU. 256KB code max.
The update scripts can be adapted to reflash custom made firmware.

Heavy reverse engineering, disassembly and some dangerous reflashing required.
Don't expect that to change with the 'PDK'.
For the really hard core hackers, you have what you need to get started on your own...

alex_r
03-06-2008, 02:20 PM
>
Heavy reverse engineering, disassembly and some dangerous reflashing required.
For the really hard core hackers, you have what you need to get started on your own...

PleoPet, thank you for the 'head.img' hint. It is the "head" firmware that especially interests me (vision / hearing / IR), although I'm not nearly hardcore enough to try disassembling 32K of ARM code that processes input from devices I'm not familiar with.

I thought maybe you, or Dogsbody or some of the guys from Ugobe reading this could shed some light on the following:

- Is there going to be any API to control the IR tranciever from Pawn? If so, some interesting tricks may be developed, such as triggering skits by a remote control, or making Pleo "recognize" himself in a mirror

- Is that the case that Pleo's hearing is currently limited to just triggering an event on certain noise level? I'm not talking about word recognition, but even recognizing musical tones (i.e. frequency/duration) could be interesting (e.g. for making Pleo repeat a simple tune)

- Is there going to be a way to read torque from Pleo motors? Think of Pleo feeling his way with his tail while moving backward... or responding to your attempts to move its head or legs...

- Is there going to be any way to directly control Pleo's movements via the USB cable, so that this could be eventually integrated into PleoSkit or similar tool, so that skits could be directly tested on the live Pleo rather than on the 3D model?

PleoPet
03-07-2008, 09:10 AM
semi OT: head CPU firmware hacking
>... It is the "head" firmware that especially interests me (vision / hearing / IR)
Me as well. I was thinking of making a re-sourced version of the firmware that lets you disassemble, hack it, reassemble, reencrypt and reflash the device.
Fortunately the head CPU can be reflashed from the main CPU, even if the head CPU has bogus firmware, so the risks of screwing it up permanently are small.

Ideally the UGOBE folks would release the "C" source code to the smaller processor so we don't have to waste all this time re-inventing the wheel, but that's up to them. Most of the current code deals with interfacing with the camera (which requires some trickery)
BTW: 32KB of code is pretty small but that's a double-edged-sword. Not much pre-existing to understand, but also not much room for brand new features.

-------
re: Pawn SDK issue. My replies: (based on pre-release stuff)

> - Is there going to be any API to control the IR tranciever from Pawn?
Not in general. The IR encoding is very specific to the non-extended "NEC" IR protocol
http://www.sbprojects.com/knowledge/ir/nec.htm
It is good enough for communicating between two Pleos, or a PDA or PC (with USB-UIRT) and custom software.
Making Pleo more like a 'universal remote control' requires head firmware hacking.

> ... even recognizing musical tones (i.e. frequency/duration) could be interesting
Agreed.

> Is there going to be a way to read torque from Pleo motors?
I think so, it's in the API, but I haven't confirmed any non-zero values in my experiments.

> Is there going to be any way to directly control Pleo's movements via the USB cable
In fact you can do that today (with text commands through the serial or USB port). Very low level.
For more live testing, you probably want a Pawn program running on PLEO listening to a PC program.

alex_r
03-07-2008, 01:13 PM
In fact you can do that today (with text commands through the serial or USB port). Very low level.


How do you know that? Are there any specs available?


For more live testing, you probably want a Pawn program running on PLEO listening to a PC program.

Yes, that's how I expect it would be done.

alex_r
03-07-2008, 01:43 PM
The IR encoding is very specific to the non-extended "NEC" IR protocol
http://www.sbprojects.com/knowledge/ir/nec.htm


Do you know what IR tranceiver chip they use?

roschler
03-08-2008, 02:48 PM
semi OT: head CPU firmware hacking
>... It is the "head" firmware that especially interests me (vision / hearing / IR)
Me as well. I was thinking of making a re-sourced version of the firmware that lets you disassemble, hack it, reassemble, reencrypt and reflash the device.
Fortunately the head CPU can be reflashed from the main CPU, even if the head CPU has bogus firmware, so the risks of screwing it up permanently are small.

Ideally the UGOBE folks would release the "C" source code to the smaller processor so we don't have to waste all this time re-inventing the wheel, but that's up to them. Most of the current code deals with interfacing with the camera (which requires some trickery)
BTW: 32KB of code is pretty small but that's a double-edged-sword. Not much pre-existing to understand, but also not much room for brand new features.


PleoPet,

I didn't see it in the PDK pre-release document that Ugobe sent out to everyone, but I figured I'd ask anyways as you seem to be closer to the source.

Will there be any facility to provide drop-in C libs that provide certain kinds of heavyweight functionality? That is, functionality that is just too CPU intensive to be implemented in the Pawn scripting language? I'm wondering if it would be possible for me to port the Sphinx 3.5 speech reco engine I modiified, that is in my Robodance software, to run on Pleo. It's written in straight C which, from what I read, was the language used to create the Life O/S and supported API layers.

I know that's a tall order because even if Ugobe does have plans to support drop-in C libs, the multi-tasking issues of such a heavyweight process like speech reco could be completely incompatible with Pleo's Life O/S architecture, but one can always hope. Obviously there's always the possibility of PC controlled speech reco, but on-board would of course be much cooler.

Thanks,
Robert

PleoPet
03-09-2008, 10:05 AM
(selective repliies, mostly about advanced programming)

The SDK/PDK has been pre-announced (http://www.pleoworld.com/developer )
When released it will be a pretty good development system for Pawn programming.
But don't expect much for ARM programmers (That's why I am teasing this thread)
-----
>> In fact you can do that today (with text commands through the serial or USB port). Very low level.
> ... Are there any specs available?
You can play with it yourself, but you need a serial port connection or a USB connection. Type 'help' at the command prompt.
If going the serial route, I recommend a wireless approach described here: http://www.aibohack.com/pleo/rf_pleo.htm

The USB approach is easier to hook up (standard cable) but not as convenient to use IMHO. Your Pleo must remain tethered to your PC. Also when the Pleo is turned off the serial-over-USB connection will (usually/always?) disappear, and can be a pain to re-estabilish. Apparently the BlueTooth/BlueSMIRF modules have similar problem. I've had good luck with the XBee modules (stays alive).
For the USB approach I'd wait for UGOBE to release an official version (ie. don't ask me). I expect they will release something with the PDK.
IMHO for serious debugging, the serial approach (with external hardware) is vastly superior to the built-in USB approach.
In either case, be careful. This is low level and very powerful (similar to 'automon.txt' scripts). It is easy to screw up your PLEO if you experiment with the more dangerous commands.
------
> Do you know what IR tranceiver chip they use?
AFAIK No special chip.
Looks like the Head ARM CPU (LPC2103F) is doing the bit banging itself (Most of the hardware glues into the 32 GPIO bits). I need to look at the disassembly more to confirm but I suspect it can be changed for other modulation schemes with similar carrier frequency
================
> Will there be any facility to provide drop-in C libs that provide certain kinds of heavyweight functionality?
From UGOBE - don't expect it. I've asked them. Please post a separate request here and/or the "Suggestions for UGOBE" forum. The more requests the better.
It is very low level, tricky and requires reflashing one or both of the ARM CPUs. There is very little RAM. Regardless their priority is getting the Pawn SDK out there, which is an important first step.

From me - yes assembly language addins for sure. Ideally "C" as well. Starting with the head CPU and maybe the body CPU later.
-----
> I'm wondering if it would be possible for me to port the Sphinx 3.5 speech reco engine...
That raises other issues. The microphones are in the head. I don't know what audio capturing capabilities are possible (I need to disassemble and experiment some more)
Memory for program code is at a premium. Only 32KB Flash ROM total in the head CPU.
The main body CPU is much larger (256KB Flash ROM), but the communication between the head CPU and body CPU is slow. Also you have to fit all this in the smalll amount of left-over space unless you want to remove existing functionality (eg: remove the camera features to free up space for more advanced audio features).
------
> Obviously there's always the possibility of PC controlled speech reco, but on-board would of course be much cooler.
Agreed, and it would be available to the masses (without the need for a USB-UIRT or similar device)

roschler
03-09-2008, 03:00 PM
Thanks for your detailed response PleoPet.

alex_r
03-09-2008, 03:05 PM
You can play with it yourself, but you need a serial port connection or a USB connection. Type 'help' at the command prompt.

Wow!!! :D PleoPet, thank you for the hint. It took me some time to figure out how to setup this serial-over-USB thing, so I think I'd better describe it step-by-step. Hope our PleoHosts don't mind. The instructions below are for Windows (supposedly Linux people don't need help in things like that). Of course, YOU'D BE DOING THIS AT YOUR OWN RISK, etc, etc

- Download the 1.0.2 Updater for Windows from Pleoworld.com. You need the one which works through USB cable (the .MSI install), not the archive for the SD-based upgrade.

- Proceed through the installation of the driver: install the .MSI, *then* connect Pleo via USB cable, then let Windows install the driver. You do NOT need to install the update per se, the important part is the driver. However, if you don't have the update yet, it is as good time as any to install it.

- In Control Panel, get to the Device Manager. Open the section for COM/LPT ports. If your Pleo is connected and alive, you should see it as a serial port ("COMxx: Ugobe pleo"). Remember the port number and connection parameters (9600,8,1,etc).

- Open whatever terminal program you prefer (Windows' HyperTerm if you don't have anything better) and make a new connection using this port

- When you press "Enter" in the terminal window, Pleo should respond with ">" prompt. Type:

sound play ta_daa

- After that, use 'help' command to explore. There is a lot of interesting stufff there!