PDA

View Full Version : C.A.M.



Hephaistos
08-21-2008, 08:03 AM
C.A.M. (Cognitive Autonomous Mobot)

I've been lurking around here for awhile and would like to thank the people at Trossen Robotics for hosting such a great forum (and for having a great store as well). I thought I'd go ahead and post some information on the robot I've been working on.

Here are the computational specs:

* 2 Pico-Itx systems (each with 1GHz CPU, 1GB RAM, 40GB Sata 7,200 RPM drive)
* 1 Mini-Itx Core Duo system (2GHz CPU, 2GB RAM, 120GB Sata 7,200 RPM drive, Mini-PCI wireless network card, water-cooled and over-clocked)
* 4 Phidget 8/8/8 kits
* 2 Phidget high current motor controllers
* 4 Victor 883 speed controllers
* 1 SSC-32 servo controller
* 1 4-port network hub (w/wireless) for connecting the 3 PC's
* 1 8" touch screen VGA panel
* Bluetooth (mainly for the speech recognition mic)
* 4 Atmega 168's working connected in parallel and connected to the PC via USB
* Carnetix 2140 power supply with USB

Here are the sensors:

* 6 Maxbotix EZ-1's (detects objects from 0" - 254", parallel with floor)
* 6 Sharp GP2D12's (4" - 30" pointed up at 45 degrees from base)
* 6 Sharp GP2D120's (1.5" - 12" pointed down at 45 degrees from base)
* GPS
* Stereo vision in head
* Vision system on arm
* Working on vision system for front/back on base (and now will be trying to add a laser level to these)

Here are the mechanicals and support systems:

* 2 NPC T64 wheelchair motors for the main drive system (each motor is capable of drawing 110 amps and generating 9,900 oz/in's at stall, though this is at 24 V and I run them at 12 V)
* 1 NPC 41250 wheelchair motor for the torso twist
* 1 Linak LA-30 linear actuator (1,350 lbs of thrust, though again this is at 24 V) for the torso tilt
* The head has 13 DOF's using various servos (6 of the servos are for the eyelids, 3 per eye)
* The arms have 6 DOF's each (4 larger motors in each arm, plus 2 5990 servos in each wrist)
* Each hand has 8 DOF's (2 servos for each finger (3 fingers) plus 2 additional servos for swinging 2 of the fingers around the palm)
* It should be noted that only one arm has been attached so far--I am currently still building the second arm, but should be done soon
* 2 Hawker Odyssey PC925L 12V 26A batteries (computers, main drive motors)
* 2 Powersonic PC6360 6V 36A batteries (servos)

Software:

* Windows XP Professional on all three systems
* SQL Server 2005 for data storage
* OpenCV is used for vision processing
* Custom service-oriented architecture (SOA) written in C# using .NET 3.5 and based largely on principles learned from Erlang, Smalltalk, and Javascript (event-based, message oriented, self-extending, etc)
* SAPI for speech output
* Due to the SOA nature of the software, I can do cool things like have one service read images from the webcam while multiple other services perform other various operations simultaneously on the same image (line detection, feature extraction, face detection, etc). The services can be staged in a pipeline fashion so that one service can use the output of another service (e.g. the face recognizer service is tied to the face tracker service, which is tied to the face detection service).

Okay, enough rambling on. Here are some pictures:

This is a picture from a couple of months back before the eyelids were put on and before the 1st arm was attached. It also show the 8" monitor, which I removed in subsequent pictures as I was doing work on the system torso control (and the monitor was getting in the way). This picture also shows the base (there is a third (gray) pneumatic wheel on a caster that you can barely see behind the batteries).

http://www.cognitiveaxiom.com/images/cam/robot_cam1070.jpg

This picture shows the head with the eyelids and the left arm attached. You can also see the linear actuator and the two Pico-Itx's. The arm is down and the hand is in the home position.

http://www.cognitiveaxiom.com/images/cam/cam_arm_down.jpg

Here is one with the arm outstretched and the hand open.

http://www.cognitiveaxiom.com/images/cam/cam_hand_down.jpg

Same position but with the elbow and wrist both bent up.

http://www.cognitiveaxiom.com/images/cam/cam_hand_up1.jpg

Just to show the ability for the elbow to twist:

http://www.cognitiveaxiom.com/images/cam/cam_hand_up2.jpg

Here are some close-up pictures of the hand and forearm (these are better pictures because my wife took them and she's a professional photographer. I made a deal, I wouldn't let the beastie chase her around the house if she would take a few pictures : )

These were all manually positioned for the photoshoot, which is why all the wires are just hanging there. Also, to give credit where credit is due, the idea for the two fingers to swing around the palm was borrowed from the Barrett Hand (http://www.barrett.com/robot/products-hand.htm), which is very impressive.

http://www.cognitiveaxiom.com/images/cam/hand1.jpg

http://www.cognitiveaxiom.com/images/cam/hand2.jpg

http://www.cognitiveaxiom.com/images/cam/hand3.jpg

http://www.cognitiveaxiom.com/images/cam/hand4.jpg

http://www.cognitiveaxiom.com/images/cam/hand5.jpg

http://www.cognitiveaxiom.com/images/cam/hand6.jpg

Regarding sensors for the hand, I hacked the servos in the fingers and hooked their internal pots up to the Atmega168's. This allows be to compare the actual position of the servo to the programmed position for rudimentary force sensing. I've also been experimenting with the Interlink FSR's Trossen sells in their store. These are very cool little devices and I plan to put 6 on each finger (hence the need for a lot of ADC lines). I also have a larger FSR that I am going to put on the palm. I have some gel material acquired from shoe inserts made by Dr. Scholl that I am going to try and put over the fingers.

My main interest in building this creature is in the software. I want to experiment with various theories of mind and Human Robot Interaction. Cynthia Breazeal's work on social robots has been an inspiration. Hopefully the acronym will come to stand for Conscious Autonomous Robot over time. Anyway, enough for now, let me know if you have any questions.

Edit: I should have mentioned, he's on a table, which is why his head is almost to the ceiling in the pictures above. He's about 5' tall.

ooops
08-21-2008, 08:26 AM
Holy cow that is sweet! There is nothing sexier than a big bot!!!
Very impressive on so many levels; size, "brain power", complexity, the hand, vision systems, ... I could go on and on.
Please get some video up, I am anxious to see CAM in action!
Thank you for sharing!

darkback2
08-21-2008, 09:02 AM
This thing is fantastic. I thought one computer was a lot...three? The arm/hand flexibility is really cool. Nice robot.

DB

JonHylands
08-21-2008, 09:06 AM
Very cool stuff. Couple questions - what motors are you using in the arms, and how are you controlling them?

You mention Smalltalk as one of your "inspirations" for the coding you did - are you a Smalltalk programmer? I've been doing Smalltalk for 21 years now...

- Jon

Hephaistos
08-21-2008, 11:19 AM
Very cool stuff. Couple questions - what motors are you using in the arms, and how are you controlling them?

Thanks. The motors are surplus SOHO gear motors. I haven't been able to find much info on them, but in my testing they draw about 10 amps under load (not stalled) and are easily able to lift a 25 lb weight at 2" from center. I'm currently using Phidget Motor Control HC boards (2 per arm) to control the motors. I've mounted U.S. Digital MAE3 absolute encoders on the brackets and hook them into Phidget 8/8/8 boards. Then I have a C# component that runs PID for servo control.

That's the current setup. Depending on how my PCB fabrication skills develop using the Skillet Reflow techniques at Spark Fun, I may use Atmega168's with ST VNH2SP30 motor controllers for the second arm. I have a ST breakout board from Pololu to play around with, so we'll see how that goes.


You mention Smalltalk as one of your "inspirations" for the coding you did - are you a Smalltalk programmer? I've been doing Smalltalk for 21 years now...

That's very cool! I am more of an arm chair admirer of Smalltalk than an actual programmer of it. I first got interested in it last year after watching this (http://channel9.msdn.com/posts/Charles/Dan-Ingalls-and-Allen-Wirfs-Brock-On-Smalltalk-Lively-Kernel-Javascript-and-Programming-the-Inter/) interview with Dan Ingalls and Allen Wirfs-Brock. I really like the dynamic meta-based approach of the language. It's very similair to the type of dynamic systems I work on in my professional life. Unfortunately, the Smalltalk image environment is the only real problem I have with it. That said, I have drawn a lot of inspiration from the theory underpinning the language. I've read the Smalltalk-80 book by Goldberg and Robson and have managed to incorporate many of the concepts in both my professional and personal use of programming constructs.

Hephaistos
08-21-2008, 11:22 AM
This thing is fantastic. I thought one computer was a lot...three? The arm/hand flexibility is really cool. Nice robot.

DB

Thanks a lot. The vision and cognitive (e.g. grammar parsers, common-sense reasoning, etc) subsystems really eat up a lot of processing power. Then you throw in heavy systems like .NET and SQL Server and the processing power goes quick!

Hephaistos
08-21-2008, 11:25 AM
Holy cow that is sweet! There is nothing sexier than a big bot!!!
Very impressive on so many levels; size, "brain power", complexity, the hand, vision systems, ... I could go on and on.
Please get some video up, I am anxious to see CAM in action!
Thank you for sharing!

Thanks for the feedback! I'll see what I can do regarding video. I'd like to play around this weekend with the Adrenalynn's awesome laser level ideas. Maybe I can get some video of that...

Adrenalynn
08-21-2008, 11:31 AM
Honestly I won't have time to document much by this weekend, I have two critical projects to get out before I go back to it...

Hephaistos
08-21-2008, 11:36 AM
Honestly I won't have time to document much by this weekend, I have two critical projects to get out before I go back to it...

No, that's okay. I didn't mean to put any pressure on you. I just meant that I was going to see what I could work out (if I end up having time) based on the ideas you've already presented (and thank you for them!).

metaform3d
08-21-2008, 02:56 PM
Wow. I'm in awe. As DB said: three computers?

I've very interested in your SOA architecture. Can you say more about how you apply this to a real-time robotic context?

Hephaistos
08-21-2008, 04:14 PM
Wow. I'm in awe. As DB said: three computers?

I've very interested in your SOA architecture. Can you say more about how you apply this to a real-time robotic context?

Thanks! Sure, I can talk some more about the SOA architecture as it applies to my robot.

In my system, which is not unlike the Microsoft Robotics Studio approach, I have "services" that perform various functions and emit various events. I create a new service anytime I have some sort of discrete chunk of functionality that I think might be used by more than one software process. For instance, the sonar service is used by the motor director service to brake if something is discovered within a certain distance of the bot. However, the mapping service is also interested in the sonar readings, but for an entirely different reason. Whenever the sonar service takes a measurement, it sends out a message to other services that have subscribed to it. In this way, whenever a new reading is available, whatever other service is interested in the reading can get immediate access to it. When subscriptions are made, I can setup various criteria that must be met before the message is sent to the subscriber. For instance, maybe the motor director service isn't interested in readings unless they are within a certain distance (it doesn't need to know about an object 12' away if its only moving .5" per second). But the mapping service wants to always know about new readings. Meanwhile a debugger service may want on-demand access to the sonar service's readings.

I can chain my services together, making services dependent on other services. For instance, I have a webcam service that publishes images. I have a face detector service that subscribes to the webcam service and looks for faces. Concurrently, I have an edge detection service that is looking for edges and a corner detector service looking for corners using the edges. The very cool thing about all these services is that they can all operate on their own thread. This means that the software is highly scaleable. I can do more faster by adding more processors to the mix. And this can be done across the network as well. So while one Pico-Itx can be doing lower level vision processing on these images, the faster Mini-Itx can be doing heavier duty number crunching on the same images being captured by the Pico (performing face recognition for instance).

This sort of scaleability is only going to become more important as we see the proliferation of multi and many core systems. Writing thread-safe code by hand is extremely difficult to get right. And even after you think you've got it right, when the planets align a certain way 6 months later, and someone happens to be walking past the system tapping their left foot at a rate that happens to create a harmonic resonance with the system oscillator, something fails and then it takes _forever_ to try and figure out what went wrong with such a program. Well written service based systems don't suffer from this issue. Each service is capable of being hosted on one or more threads and thus automagically gets to take advantage of multiple cores. It's also much easier to think of a complex system such as a robot as a compilation of various services (much as it is easier to think of a large program in terms of a group of functions).

What I've spoken to so far has just been a lot of the lower level system functions. Higher level "cognitive" functions are also implemented as services. These are similar to what Marvin Minsky called agents in his classic AI text, The Society of the Mind. I have services for parsing grammar from sentences recognized by the speech recognition service. I have services that are looking for semantic information from the syntactically parsed sentences and anaphoric parsing services that operate on the results of both syntactic and semantic services. Basically all functionality becomes a service (like a tool in my toolbox) and then I can arrange these services in whatever way I want in order to build new functionality.

If you are writing on the Windows platform, you can take a look at Microsoft's Robotics Studio, which is service-based. You can also take a look at Windows Communications Foundation (WCF) which is Microsoft's approach for creating services for mainstream applications.

Let me know if you have any more questions. I love this stuff and could go on and on and on : )

metaform3d
08-22-2008, 01:26 AM
That's great -- thanks for the level of detail. Do you use WCF as the basis of your protocol or have you rolled your own?

Please feel free to go on and on; I find it fascinating.

4mem8
08-22-2008, 04:24 AM
This project is so awesome Hephastos, You are very talented in this area, I will be keeping an eye on you progress.

Hephaistos
08-22-2008, 10:41 AM
Do you use WCF as the basis of your protocol or have you rolled your own?

I've created my own SOA plumbing. One of the reasons was that I wanted queue based message passing without the overhead of MSMQ, which is what WCF uses. I like WCF and think its actually easier to get into service-based programming for robotics using WCF than it is with Microsoft's Robotics Studio (MSRS).

MSRS is interesting, but very difficult to get your head around. One advantage to going the MSRS route is the modeling tools it makes available. You could leverage the physics engine in MSRS to have the robot internally model movements and actions before performing them to check the potential outcome. I suppose you could make use of this technique regardless as to whether you implemented your code in MSRS to begin with...I'll have to give this some more thought.

Hephaistos
08-22-2008, 10:42 AM
This project is so awesome Hephastos, You are very talented in this area, I will be keeping an eye on you progress.

Thanks a lot 4mem8. I've really enjoyed your projects as well.

LinuxGuy
08-22-2008, 12:55 PM
Wow. I'm in awe. As DB said: three computers?
It's really just a distributed architecture like I am using for W.A.L.T.E.R., albeit with Embedded Linux (Gentoo) and Hammer plus auxiliary processors as needed. This is the sort of thing that makes me want to tinker with x86 and Linux for robotics. :happy: This is a very awesome project, even with Windows. :happy:

8-Dale

Adrenalynn
08-22-2008, 01:26 PM
It's really just a distributed architecture like I am using for W.A.L.T.E.R., albeit with Embedded Linux (Gentoo) and Hammer plus auxiliary processors as needed. This is the sort of thing that makes me want to tinker with x86 and Linux for robotics. :happy: This is a very awesome project, even with Windows. :happy:

8-Dale

[cough/]

551

Hephaistos
08-22-2008, 01:40 PM
It's really just a distributed architecture like I am using for W.A.L.T.E.R., albeit with Embedded Linux (Gentoo) and Hammer plus auxiliary processors as needed. This is the sort of thing that makes me want to tinker with x86 and Linux for robotics. :happy: This is a very awesome project, even with Windows. :happy:

8-Dale

Exactly! You've gotta love distributed processing, no matter what the platform. Those Hammer's are very cool. I've been thinking about maybe using a Gumstix Verdex for some low-level video processing. OpenCV runs under Linux and you can now get 600 MHz Verdex's for $169. Of course, that's usually about the time I start falling back towards the PC side of things. I mean do I really want to spend $169 for a 600 MHz Verdex when I can spend another $92 and get a Pico-ITX that already has USB, VGA, Ethernet, etc, etc. Sure I could run the Gumstix longer off a battery than a Pico, but I have big batteries, so it doesn't make _that_ much of a difference...

Yes, this is the eternal internal debate inside my head. I wish I served cookies with that blather.

JonHylands
08-22-2008, 01:44 PM
Stick with the pico-itx. I use the gumstix (including the 600 MHz XL6P), and I'm about ready to toss them in the garbage. The proprietary hardware and non-standard connections are bad enough, but then you have the additional PITA of dealing with Linux, which drives me up the wall... We have three XL6P verdex's for the BrainBot project - one of them works, one of them is a brick (won't power up at all), and the third one won't reimage properly.

Hephaistos
08-22-2008, 01:55 PM
Stick with the pico-itx. I use the gumstix (including the 600 MHz XL6P), and I'm about ready to toss them in the garbage. The proprietary hardware and non-standard connections are bad enough, but then you have the additional PITA of dealing with Linux, which drives me up the wall... We have three XL6P verdex's for the BrainBot project - one of them works, one of them is a brick (won't power up at all), and the third one won't reimage properly.

Thanks, that's good to know. It's just hard to get the fantasy image I have of making a Gumstix blade array that fits in an Altoid tin out of my head...

Adrenalynn
08-22-2008, 02:04 PM
Actually, there's a new ITX form-factor coming.

http://gizmodo.com/gadgets/smurf-computing/tiny-wee-via-mobile-itx-motherboard-to-power-x86-smartphones-266737.php

Smaller than a cell phone, 1Ghz of x86 lovin', 512MB onboard. First quarter of 2k9, I believe.

sthmck
08-22-2008, 02:18 PM
That is a lovely looking little thing.

Electricity
08-22-2008, 02:23 PM
[cough/]

551
haha lol.



Man, Hephaistos, CAM is a VERY impressive piece of work there! How long have you been working on her(him? it?)?

Hephaistos
08-22-2008, 02:43 PM
Man, Hephaistos, CAM is a VERY impressive piece of work there! How long have you been working on her(him? it?)?

Thanks! Here's CAM's first baby pic. Taken late August 2005:

http://www.cognitiveaxiom.com/images/cam/firstcampic.jpg

So I guess I've been working on the hardware for about 3 years, though that would be off and on. I would go for several months at times where I wouldn't work on hardware, but would be more interested in working on the software. I suppose you could say he's pretty much the culmination of my life's work.

For carbon dating purposes, I'd have to say my first robot was built when I was in the 9th grade for a science fair project and was one of these:

http://www.theoldrobots.com/images6/armatron9.JPG

That I modified by adding solenoids and fishing wire to pull the joysticks around and built (yes, another wire wrap job) a reed relay interface card for one of these:

http://www.volkanrivera.com/esp/wp-content/uploads/2007/06/320px-TRS-80_Color_Computer_1.jpg

Yes, that's a TRS-80 Color Computer. The first one we had contained a whopping 4KB of RAM! Whoo hoo! I think by the time I built the card, my dad had expanded it to 16 KB.

Hephaistos
08-22-2008, 02:53 PM
Actually, there's a new ITX form-factor coming.

http://gizmodo.com/gadgets/smurf-computing/tiny-wee-via-mobile-itx-motherboard-to-power-x86-smartphones-266737.php

Smaller than a cell phone, 1Ghz of x86 lovin', 512MB onboard. First quarter of 2k9, I believe.

That is very cool. If I were to build a little blade array out of them, I'd probably have to run Linux as the one problem with Windows is the, um, license fee! I'm not sure about running Mono on these as that many layers of code might not be all that fast. But I don't know because I haven't looked close at the performance numbers...but if Logic Supply ever starts to carry these little guys at a reasonable price, i might have to check it out!

Adrenalynn
08-22-2008, 03:41 PM
Don't get me started on Mono. I'm not a big fan of it at the moment, working on a port project. . .

I have every model of CoCo, still running. If you miss 'em, I'll unpack and take photos. ;)

Hephaistos
08-22-2008, 03:59 PM
I have every model of CoCo, still running. If you miss 'em, I'll unpack and take photos. ;)

When I get all nostalgic I break out the CoCo emulator and play Dino-Wars or Seawolf. Of course an emulator is not the real thing...It looks like I could pick one up from ebay for $4.99...

sam
08-22-2008, 04:10 PM
I have to say that your project is fantastic! So many sensors. It would be nice to program. I guess pretty fun.

Congratulation on your build! I hope you keep giving us information on your 'bot.

4mem8
08-22-2008, 04:14 PM
Nice little M/B there Adrenalynn, Do you think it would have uses for bipeds in the future?.

metaform3d
08-23-2008, 04:55 AM
I've created my own SOA plumbing. One of the reasons was that I wanted queue based message passing without the overhead of MSMQ, which is what WCF uses. I like WCF and think its actually easier to get into service-based programming for robotics using WCF than it is with Microsoft's Robotics Studio (MSRS).That sounds fantastic. Any chance you would be willing to share some code? Not everything -- just your SOA layer and a sample service or two. I can understand if you don't, but I for one would be very appreciative. I've been contemplating building something like this myself but my total lack of networking experience is a giant hurdle.

Connor
08-23-2008, 10:44 PM
What servos did you use for the fingers, and, how are they attached.. Looks like one segment is simply using the servo mounts.. Can't really tell from the pictures.

Hephaistos
08-24-2008, 09:30 AM
That sounds fantastic. Any chance you would be willing to share some code? Not everything -- just your SOA layer and a sample service or two. I can understand if you don't, but I for one would be very appreciative. I've been contemplating building something like this myself but my total lack of networking experience is a giant hurdle.

As it turns out, having to coordinate the concurrent inputs from lots of sensors in a robot is not unlike what goes on in production code for a wide variety of server operations. Being a software developer by trade, I ended up using a lot of the code developed on the robot at work. So unfortunately, I cannot share the code for the SOA infrastructure.

However, WCF is a decent SOA architecture that (I think) is more comprehensible than the Robotics Studio architecture, and since its more mainstream, aspiring programmers would be learning a tool that would be useful for making money. It also conveniently handles all the network infrastructure for you, letting you focus on the problem instead of the plumbing.

So if you're interested and can give me a little more background as to what you're trying to do, I could probably come up with an example or how-to that I could post that uses WCF.

Hephaistos
08-24-2008, 09:42 AM
What servos did you use for the fingers, and, how are they attached.. Looks like one segment is simply using the servo mounts.. Can't really tell from the pictures.

I used HS-77BB low profile servos for the fingers. I started out trying to use a Hextronix servos from China that were similar to Hitec's HS-55's (but a little smaller). Unfortunately, the Hextronix servos were not strong enough (they've since been re-used in the eyebrows).

Each finger has two joints and each joint is connected to the next using Lynxmotion brackets. The end of the finger is cut from 3/4" aluminum square tubing from Lowes. This is held to the Lynxmotion bracket using smaller 1/2" x 3/4" aluminum angle, epoxy, and two 2-56 machine screws. The finger is connected to the palm using 1/8" thick by 3/4" wide aluminum flat stock. The palm was cut from 1/8" thick aluminum plate.

I was initially worried the fingers would be too large for the robot, but the hand turned out to scale quite nicely with the rest of the arm and body.

metaform3d
08-24-2008, 01:31 PM
As it turns out, having to coordinate the concurrent inputs from lots of sensors in a robot is not unlike what goes on in production code for a wide variety of server operations. Being a software developer by trade, I ended up using a lot of the code developed on the robot at work. So unfortunately, I cannot share the code for the SOA infrastructure.Yes, I completely understand. I have much the same problem trying to share my code.


So if you're interested and can give me a little more background as to what you're trying to do, I could probably come up with an example or how-to that I could post that uses WCF.I've looked at some of the docs and how-tos for WCF, and honestly I find it pretty impenetrable. It's so complex that all the tutorials rely heavily on wizards, which I think is a terrible way to program. I was sort of hoping to find something more bare-bones that might be more accessible. Thanks anyway.

Hephaistos
08-24-2008, 03:22 PM
I've looked at some of the docs and how-tos for WCF, and honestly I find it pretty impenetrable. It's so complex that all the tutorials rely heavily on wizards, which I think is a terrible way to program. I was sort of hoping to find something more bare-bones that might be more accessible. Thanks anyway.

Do you work in C# or VB.NET? I completely agree with you regarding the wizards. Let me see what I can put together for some sort of bare-bones example using WCF. I should be able to start a new thread at some point tomorrow and we can take it from there.

metaform3d
08-24-2008, 05:35 PM
Do you work in C# or VB.NET? I completely agree with you regarding the wizards. Let me see what I can put together for some sort of bare-bones example using WCF. I should be able to start a new thread at some point tomorrow and we can take it from there.For work I use C/C++, but I've written a little C#, specifically for control of my drink-mixing automata. You can find that code here (http://forums.trossenrobotics.com/downloads.php?do=file&id=70). Some introductory tutorials would be great; looking forward to it!

Hephaistos
08-25-2008, 11:26 AM
Some introductory tutorials would be great; looking forward to it!

As promised, here (http://forums.trossenrobotics.com/showthread.php?p=18993#post18993) is the tutorial.