raspberry pi + pomoco

I installed PoMoCo on my raspberry pi (the older 256K model B running Debian Wheezy and X Windows).

I was happy that it worked I’m able to do the moves and control hexy when plugged in by USB (haven’t tried bluetooth yet).

But there I’d like to compare notes if others here have done the same - namely:

a. The PoMoCo screen is wide enough the right hand side won’t fit. I’m using HDMI TV for the monitor - maybe I can up the resolution haven’t tried that yet

b. Hexy does do the moves but I feel they’re slower and jerkier than when I do the same from my Mac. Noticeably so?

I’m more concerned about the slow/jerky moves than the GUI running off the screen.

Do others see the same?

Thanks,

Darren

I meant to say it’s the raspberry pi model b with 256 MB (not KB) - I must have been thinking about arduinos :slight_smile:

If others are interested in using the raspberry pi with hexy I should clarify the “slow/jerky” movements I referred to aren’t awful it’s just I could tell the difference compared to running off my mac…

I was concerned partly because my hope has been to use the pi on the hexy, hopefully with the soon to be released camera (http://www.wired.co.uk/news/archive/2013-03/06/raspberry-pi-camera-released), running OpenCV (doing face recognition?) at the same time controlling hexy… Or maybe voice commands which I’ve seen e.g. http://www.youtube.com/watch?v=_U_v9tRD68k

With the rougher movements I was wondering if doing all that may turn out too much for the pi…

I did try a little to analyze things by running the top command while PoCoMo was also driving hexy.

I couldn’t see that memory was low (my concern partly since I have the 256MB pi not the 512MB).

And PoCoMo itself didnt seem to be using much cpu.

But I did notice X Windows was using between 25-50% of the cpu all by itself.

So one thought I had was that I shouldn’t be running X Windows at all.

To test the theory I thought about hacking PoCoMo to add an option where it wouldn’t even start the TK gui but would instead just let me control it using the keyboard.

That way there’d be less taxing the pi cpu (plus I wouldn’t have to worry about the GUI not fitting on the screen!)

The only other thought I had was to maybe play with the “stepPerS” setting when running PoMoCo on the pi?

From robot.py:

# Modifies how smoothly the servos move.
# Smoother means more processing power, and fills the serial line.
# Lower if movements start to slow down, or get weird.
# Anything higher than 50 is pointless ( faster than the maximum refresh of standard servos ).
stepPerS = 5

If anybody has any thoughts I’d love to hear…

I’ve hacked the PoMoCo software to work from the command line if you’re looking for a copy of the software to test on and my goal was the same. I want to run Hexy from the Pi over SSH or using voice commands, etc.

Sure I’d love to try your version is there an easy way I can get it e.g. is it on github or anything?

Otherwise maybe you could just email me a zip file of it?

FWIW When I wrote what I did I was thinking if there was enough interest maybe Joe would be open to us doing a pull request against his version where we’d actually just make it a command line option to optionally run without the GUI just keyboard only (maybe it could print a little menu of the moves with numbers/letters for invoking each?)

But I’d be happy to see and try yours regardless. I’ve programmed a lot in other languages but I’m pretty new to python btw.

Found dhosterman’s modified PoMoCo here: https://github.com/dhosterman/hexy

Darren,

Hey! Sorry I didn’t get back to you sooner. Yes, that’s one variation on it. I’m currently working on another (that’s almost ready). The new iteration will take parameters. So at your prompt, you could say:

Me: Hexy, please walk forward 3 steps.

or

Me: Turn right 90 degrees, Hexy.

And Hexy would do that.

But I’m haven’t integrated the move files into that yet, so it’s not quite ready.

What you’ve found should be functional in the meanwhile.

Regards,
Daniel

Thanks a lot Daniel and I did try your software yesterday morning it worked great for me.

It did smooth out hexy’s motions for me which was my main goal.

In fact it smoothed them out both if I did or didn’t start X windows on the raspberry pi.

That part surprised me - I guess even just the PoMoCo TK gui takes enough more memory or more cpu than your version that it’s enough to throw PoMoCo’s timing off.

One thing I’d forgotten was the raspberry pi video drivers I have are not hardware accelerated that might be part of the explanation why X is taxing the cpu so much. But it seems like not running X is the right answer anyway on such a constrained device (I also tried to get OpenCV working on the pi yesterday too but I’ve failed to get that going so far).

The “natural language” approach you did is fun btw kudos on that I don’t know that I would have thought to do it that way. When I was young I loved text based adventure games (“go north”, “get key”, etc.) Your stuff reminds me of those.

The only small suggestion I had was that - unless I missed it and I might have - I didn’t see any “exit” or “quit” command?

Both on my Mac and on the pi, control-C wouldn’t even kill the program. Come to think I’m not sure I tried control-D (but I was ssh’ed into the pi I’d be afraid of terminating my session). I’ve wound up doing control-Z, finding the pid and kill -9’ing the process each time I exit.

Which explains why a “quit” or “exit” seems a nice improvement. :slight_smile:

Thanks again,

Darren

Darren,

Thanks! I’m glad you’re enjoying it so far.

Try “goodbye”. :slight_smile: I think that works. If it doesn’t, try running database.py to initialize Hexy’s memory database.

Also, if you know anything about SQL, you should be able to get in and change Hexy’s memory so he’ll respond using any response from a list and take inputs using any response from another list. I believe I was using “goodbye” and “sayonara” for tests.

In addition, Hexy should remember the times and duration of your interactions, which I’m planning on integrating into an emotion simulating module in the future.

Regards,
Daniel