Page 1 of 7

Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Sat Aug 01, 2015 9:02 pm
by alanmcdonley
Bill requested that I blog about my bot upgrade project in the forum. (It will be Pi Droid Alpha based.)

Bot Name: Rug Warrior Pi or PiGo
Bot Size: 7 inches round, roughly 7" tall
Bot Environment: Home - Indoors
Bot Surface Range: Wood and tile floors, plush carpet (no shag)
Project Type: Upgrade processing and sensor capabilities of 15 year old Rug Warrior Pro (RWP) robot

Background: "Pogo" is my current Rug Warrior Pro robot, and needs a total craniotomy. There is only so much I could program in 32k bytes of interpreted C over a small assembly language boot-loaded library, running on a 2 MHz clocked 8bit HC6811 uController. This is Pogo:
Image
(If image doesn't show: https://flic.kr/p/wdXoau )

I'll add to this thread along the way.

Rug Warrior Pi: Inputs-Outputs Plan

PostPosted: Sat Aug 01, 2015 9:13 pm
by alanmcdonley
Corrected 22Aug2015: Motor Dirs are DIO bank A4-7 on the board and schematic.
Swapped A and B assignments, and switched bumpers/encoders interrupt to use IntB pin 19

RWPi PinMap.jpg
RWPi PinMap.jpg (219.61 KiB) Viewed 14710 times

Re: Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Mon Aug 03, 2015 4:49 pm
by mikronauts
Looks good so far!

I should be shipping your kit sometime tomorrow.

Thanks,

Bill

Rug Warrior Pi: Playing with apache and pigpio

PostPosted: Mon Aug 03, 2015 9:17 pm
by alanmcdonley
My bot may not be mobile yet, but it now has:
  • WiFi (secured) with reserved dhcp address on my router
  • USB Mic input - good quality
  • Audio defaults configured so "aplay hello.wav" and "arecord8 hello.wav" (alias arecord8 = 'arecord -f s16_LE -r 8000' to get rid of static of the default "arecord" )
  • espeak Text-To-Speech
  • USB powered 2.5W speakers
  • Apache web server (didn't install php - don't expect to need PHP as I'm planning to use Python scripts and libraries)
  • "RugWarriorPi Robot" landing page setup
  • pigpio daemon - as the interface layer between the GPIO/SPI/I2C. It has interrupt support also.
  • GPIO testing web page (http://<my_Pi_IP>/cgi-bin/pigpio_cgi.py) that shows each RPi GPIO pin state, and allows setting modes and values.

I am really enjoying the Raspberry Pi / Rasbpian-Wheezy (Linux) as a processor and OS. It is pretty easy to find information, and installs generally succeed.
I ran a no load life test last night which I stopped at 12 hours. (WiFi)
Tonight I'm testing with (all the USB stuff listed above plugged in):
    python loop playing a wav file through the speakers (boy is that getting old),
    fibonacci.py computing and writing to the ssh session across the WiFi
    logfLife.py - looping over a sleep(60), writing a log file entry (some card access), plus printing to the ssh session (some WiFi)
    The Apache server running
    pigpiod and pigpio_cgi (web commanding some GPIO pins)
    and an ssh session to download pkgs, make and try things out.

Right now the test is at 6h with one blue led left on the powerbank, which means greater than 25%, less than 50% power left.
The first led (75%) went off sometime around 2h30, and the second (50%) went off around 5h.

Bedtime - so time to shut it all down.

Alan

Re: Rug Warrior Pi: Playing with apache and pigpio

PostPosted: Sun Aug 09, 2015 6:34 am
by alanmcdonley
alanmcdonley wrote:My bot may not be mobile yet, but it now has:
  • WiFi (secured) with reserved dhcp address on my router
  • USB Mic input - good quality
  • Audio defaults configured so "aplay hello.wav" and "arecord8 hello.wav" (alias arecord8 = 'arecord -f s16_LE -r 8000' to get rid of static of the default "arecord" )
  • espeak Text-To-Speech
  • USB powered 2.5W speakers
  • Apache web server (didn't install php - don't expect to need PHP as I'm planning to use Python scripts and libraries)
  • "RugWarriorPi Robot" landing page setup
  • pigpio daemon - as the interface layer between the GPIO/SPI/I2C. It has interrupt support also.
  • GPIO testing web page (http://<my_Pi_IP>/cgi-bin/pigpio_cgi.py) that shows each RPi GPIO pin state, and allows setting modes and values.


looking at top seems to say that pigpiod is a real processor hog. it is taking 11%. I shut it down while doing continuous speech recognition (so Sphinx could use 98% !!!)

Re: Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Sat Aug 15, 2015 7:08 pm
by mikronauts
You should consider using a Raspberry Pi 2 if you need more processor power, it's roughly 6x faster than the single core Pi's :)

Re: Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Sun Aug 16, 2015 8:25 pm
by alanmcdonley
mikronauts wrote:You should consider using a Raspberry Pi 2 if you need more processor power


That's just it - at this point I have a Raspberry Pi B+. I bought it a few months before the Pi 2 was announced, so I don't regret buying it, and I haven't run out of processing power yet.

I expect to need more processing power when I learn how to use the camera and when I get serious about using speech reco for interacting with humans. I know a lot about speech reco (15 years in that biz), but I know nothing about image processing. Response time is critical in human computer interactions and the B+ is running far from real time reco in language model mode. I haven't tried limited grammars yet. Natural Language Understanding and "language" models are great for humans, but when the bot can only understand "shut up", "go sit in the corner", or "record a message for princess lea" (and then go find her and play it back), a limited grammar is all the bot needs.

When we close our eyes, we can't walk very straight, can't turn accurately, and jam our toes on the legs of the bed. My robot has a full skirt six-direction bumper for protecting itself, and I'm thinking there is so much I can do with the pointable IR range finder and the camera. The key is that my robot has all the time in the world to think.

I take pictures of birds. Many water birds stand motionless for long periods observing and thinking, then move from here to there five feet or so, and repeat. I know 512MB and 700MHz will not do everything at once, but coming from 30kB and 2MHz the Pi feels like I am adding a supercomputer to my bot.

One of the "simple life" concepts I want to try out: rather than use 9 axis, high demand processing while moving, I want to see if I can recognize the wall/ceiling joints with the camera and use the (approximately) known tilt/pan angles to determine what is the shape of the room, the bot's approximate position and orientation in the room. (This will take me a year to program and if it takes the bot ten minutes to run the program while sitting idle, the bot will be keeping "busy" and conserving energy by not running around much. I really don't want the commotion of a bot running around. I decided not to add a bot to an iRobot vac for that reason.

If I end up killing my B+ accidentally, I'll replace it with a Pi 2, but the B+ is going in the bot for the foreseeable future.

Robot went for a "Fitting"

PostPosted: Wed Aug 19, 2015 8:56 am
by alanmcdonley
My Rug Warrior Pro robot went for a "fitting" to try on a new Raspberry Pi B+ brain + Pi Droid Alpha stack.

(I don't think images are showing up, so I've also included the links tagged as URLs.)

Photos have more info in the comments:

The Raspberry Pi B+ to PiDA adapter plate:
Image
https://flic.kr/p/xvzAAG


Checking the new stack for connector clearance - not really enough:
Image
https://flic.kr/p/xx5zqY

I probably should buy another board and 26pin stacking connector with spacers, and just clip the excess after soldering.

Checking the fit with the bumper skirt:

Image
https://flic.kr/p/xxU7Hr

Re: Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Thu Aug 20, 2015 6:31 pm
by mikronauts
Looks good! Except for the clearance...

The 26 pin stacking header should be assembled to PiDroidAlpha as shown on p.15 of the assembly manual

Re: Rug Warrior Pi: Build Blog (a PiDA bot)

PostPosted: Fri Aug 21, 2015 6:48 am
by alanmcdonley
mikronauts wrote:The 26 pin stacking header should be assembled to PiDroidAlpha as shown on p.15 of the assembly manual


Good catch - thanks.

I cannot tell from the manual pic or words - how many 26 pin spacers under the board?

Alan