Society of Robots - Robot Forum

General Misc => Misc => Topic started by: parallax on February 22, 2010, 08:53:00 AM

Title: Introducing my Hex: Ally
Post by: parallax on February 22, 2010, 08:53:00 AM
Hi All!

I have decided to track my progress on my latest project here. I am building a pheonix/micromagic inspired hexapod that will primarily be a testbed for different computer vision and AI programs I am working on.My goal is to make him as autonomous and intelligent as possible.  My senior project was a camera on a lynxmotion pan-tilt rig controlled by a phidget advanced servocontroller which tracked peoples faces using OpenCV and uploaded data to a webserver about what it saw. So my first step with Ally is to get that project mobile! My parts list as of now:

6 HS 225MG
8 HS 485HB (will eventually be replaced)
6 HS 645MG
9 Multipurpose Brackets (Servo Erector Set)
1 "C" Bracket
1 1.2G Wireless Surveillance Camera
SSC-32 Servocontroller
BlueSmirf Bluetooth Modem
2.4 GHz Duck Antenna
6.0 Volt 1600mA NiMH Battery
2 9 Volt Recharge-ables
Battery Harness
Lots of 1/8" (3.175mm) Lexan

I'm concerned about the flexibility of the Lexan. I've seen a YouTube video of someone who built a hex out of plexiglass and it was a wobbler. Makes me a little scared for my Ally. I can't have that for my bot! ;) Although Lexan is less flexible that plexiglass, it's not THAT much less flexible. My current plan is to shore his legs in places with thin strips of metal. The alternative materials I was thinking about were HDPE (too heavy) and aluminum, which is not very feasible for me. Any input would be appreciated. My criteria are it must be relatively easy to work with (do to lack of machining equipment), and light.   

I have to run, but I will post some CAD drawings tonight.

Later,

parallax
Title: Re: Introducing my Hex: Ally
Post by: dunk on February 22, 2010, 12:05:44 PM
hi Parallax,
if you use Lexan make sure you finish cut edges well.
i've used 4mm polycarbonate sheeting quite a bit and while it's very tough it will crack surprisingly easily along stress razors.

what this means to you is when working with it all you need to do is score it then snap it over a sharp edge. (like the edge of your work bench.)

if you don't score it first it won't snap. in fact it will be really tough as long as you don't scratch it.

so make sure you don't end up with *any* accidental scores on pieces that you need to be high in strength.
also make sure you file any nicks out of cut edges.
when making holes in it use a slow drill speed so you cut rather than melt through. (it's easier to be accurate with position that way.)

the other good thing about polycarbonate is it will hot form in a home oven at about 180 - 190C.
making a jig to clamp it in it's final shape is the hardest part.

as for aluminum,
it's actually surprisingly easy to work with hand tools.
an electric drill is required but for all cutting and shaping work a hacksaw and set of files is perfectly adequate.

i've made surprisingly complicated structures out of polycarbonate sheet and aluminum.
http://mrdunk.googlepages.com/chassis (http://mrdunk.googlepages.com/chassis)


anyway,
that's my thoughts on materials.

dunk.
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 22, 2010, 07:15:43 PM
Hi Dunk,

Thanks for the great info and the link! That is really a great bot you have there- I love the chassis construction and suspension system! :) I see that you have, in places, shored up the poly with aluminum. It is very similar to what I had in mind. I've got a couple of questions:

*What thickness aluminum are you using?
*Do you notice much flex in the chassis?

I went ahead and ordered a sample of some bronze-tinted poly from McMaster-Carr, and am waiting for my other parts to arrive. In the meantime I am still getting my sketches converted into CAD drawings. Here are two of the body. More coming tonight.
(http://www.christopherconley.net/images/front.PNG)

(http://www.christopherconley.net/images/top.PNG)

(http://www.christopherconley.net/images/iso%20body%202.PNG)

More later,


parallax
Title: Re: Introducing my Hex: Ally
Post by: dunk on February 23, 2010, 05:03:50 AM
Thanks for the great info and the link! That is really a great bot you have there- I love the chassis construction and suspension system! :) I see that you have, in places, shored up the poly with aluminum. It is very similar to what I had in mind. I've got a couple of questions:

*What thickness aluminum are you using?
*Do you notice much flex in the chassis?
hey Parallax,
this pic shows the mix of materials:
http://mrdunk.googlepages.com/suspension_close_up.jpg/suspension_close_up-full;init:.jpg (http://mrdunk.googlepages.com/suspension_close_up.jpg/suspension_close_up-full;init:.jpg)
the polycarbonate wrapped round the front face of the motor is hot formed in my kitchen oven.
it's a fiddly job but can be done if you can't find a piece of material the correct shape ready made.
i said before i was using 4mm polycarbonate. that was in fact not true. (i just measured it.)
it is 2mm. small pieces don't have much flex at 2mm but large pieces do.
for example, the body of your CAD hexapod might be a bit floppy at 2mm thick polycarbonate.
i'd recommend going up to at least 3mm for this component. 4mm might be better.

i'm using various thicknesses of aluminum in different places but my choices are as much based on what i had available rather than by design.
most of the structural parts (including the main chassis and the suspension struts in the picture linked above) are 3mm.
at 3mm aluminum is easily stiff enough for anything on a bot your size. (unless those are *huge* servos in your CAD messing with my sense of scale...)
aluminum is easy to source in "L" "U" and "H" shaped extrusions which means it's good for making parts you need to have a lot of lateral stiffness.
although i used 3mm for the suspension struts 1.5mm would have been enough.

my chassis is just one sheet of 3mm aluminum and has no noticeable flex.
i could flex it a little over my knee before i built the bot but it's plenty stiff enough for the weight of the bot.
weight was not a huge issue on my bot though.

for the main chassis i'm thinking you are going to be juggling weight vs stiffness. too heavy and you'll need stronger servos. too thin and flex will be an issue.
my hunch would me aluminum around 2mm or
polycarbonate around 3mm but you definitely want samples of these materials if you can get them to judge for your self.

also looking at the shape in your CAD, cutting all those nice curves will be hard work.
i generally got for utility over aesthetics and make everything in straight lines and right angles.

have you considered making the middle pair of legs slightly wider than those at either end to keep the step size similar for all legs when turning on the spot?


one more thing i will say about designing a chassis,
it's better to start designing it round the components you know you will have in your bot rather than building the chassis first then try to fit the components in.
for example, with mine i wanted 12 hours uptime on standby, i knew the CPU i wanted and i knew it had to fit a webcam.
with these requirements in mind the first component i designed was the battery tray and the rest of the bot was designed to fit that.

with that many servos i'm thinking battery life will be an issue for you as well. getting the battery pack in the right place will keep the load similar on all servos.


dunk.
Title: a/d card interfaced to pc
Post by: mickey2203 on February 23, 2010, 08:46:28 AM
a/d card interfaced to pc

it will  use internal ADC chip of an Atmega8L
micro-controller. A PC would be interfaced via USB for controlling the ADC
card (At-mega + ADC chip) as well as collecting the data. i need a c code for controlling parameters of ADC chip

if anybody could help, plz

thanks in advance
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 23, 2010, 10:48:25 AM
@mickey2203: Welcome to SoR! You might have better luck getting help if you post you question under the "Software" category. There should be plenty of people perusing it that can help you with your issue.  ;)

@Dunk: I really appreciate your help and insight, Dunk. My sketches were mostly of leg design and trying to get the most bang for my buck out of my servos. The chassis itself was a bit of an afterthought. You are spot on about its design, and have inspired me to redesign its shape almost entirely. I guess I got a little carried away with the curves and such!

The two primary focuses for Ally as far as it's construction are its mobility, and camera system. All of the processing is to be done via PC over the bluetooth link. This will allow me more flexibility in programming its autonomous behavior. After it is built, it will be a testbed for some ideas I have about AI and computer vision.

As far as components on the chassis of the hex are concerned I will have to focus the design around the SSC-32, Bluesmirf, and camera. Other hex's I have seen have two "decks" in the chassis: a top plate where all of the hip servos are mounted and a bottom plate housing the electronics and battery. Although the bottom deck adds more space, I see it as unnecessary as long as I can comfortable mount everything on one. 

I'm still waiting on some of the parts to arrive. They should be here by the end of the week. I also have an "In" for some scrap aluminum, and will be checking out what is available this afternoon. In the meantime I will post the redesigned chassis either tonight or tomorrow morning.   
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 24, 2010, 01:24:06 AM
So I have redesigned the body shape. I wasn't able to get away from the curves without severely reducing the travel distance in each leg but I did reduce the severity of the curves I needed. Also, the chassis is much smaller that before (although it will be a tight fit in the end). Here are the updated CAD drawings of the body:

Top:
(http://www.christopherconley.net/images/new%20top.PNG)

Side:
(http://www.christopherconley.net/images/new%20side.PNG)

Isometric:
(http://www.christopherconley.net/images/new%20iso%20body%202.PNG)

An improvement, yes?  :) I'll be getting my leg designs up here shortly as well. I'm definitely open to any constructive criticism...

On other fronts, most of what I need will be here by the 26th. Can't wait to get down to some actual building!
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 26, 2010, 08:25:27 PM
My parts have arrived in their entirety! Nerd-gasm! :D

A sampling of the awesomeness:
(http://www.christopherconley.net/images/Desktop.jpg)

More on project Ally soon...
Title: Re: Introducing my Hex: Ally
Post by: SmAsH on February 26, 2010, 08:40:33 PM
So... Many servos...
Are you cutting the body or getting someone else to do it?
Title: Re: Introducing my Hex: Ally
Post by: dellagd on February 26, 2010, 09:07:34 PM
Woah, thats a lot of servos *gazes onto the servos and starts drooling*
did you get them somewhere for cheap?
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 26, 2010, 09:51:50 PM
Woah, thats a lot of servos *gazes onto the servos and starts drooling*
did you get them somewhere for cheap?

Unfortunately they didn't come cheap.  :( Been working on saving for all of this for awhile now. Six of the HS-485HB's came from a different project. The HS 225MG's came from Servocity, the rest from  Lynxmotion. Buying the HS-645MG's really hurt the wallet, but at least Lynxmotion throws in metal servo horns for free...

So... Many servos...
Are you cutting the body or getting someone else to do it?

I'm gonna give it a go by hand. From what I understand using powertools like high-speed drills and saws can melt the material. So I'll use Dunk's "score and break" method he was talking about earlier in this thread to get the basic shape of the main body done. After that it'll be files, coping saws, rotary tools (set on low speed), and patience. Luckily it isn't super complex. The legs on the other hand are going to be a huge pain in the rear end though!
 
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 28, 2010, 02:29:01 PM
So I have the chassis cut, and am working on the legs. I also have the coxa joint assemblies just about put together. Thinking about mounting the pan-tilt mechanism for the camera on the front of the chassis. However if I do that I loose the higher POV (which could be important). Mounting it on the front would give it a more organic feel, but would also shift its COG pretty drastically, and may unduly tax the front legs servos. I could just give it a pan head, which would minimize this by eliminating a servo and a bracket. I guess I have to weigh the pros/cons of each more carefully and take care not to loose my focus on why I am building this in the first place. So I have held off on cutting the mount for it until I get a little further along.

If anyone is thinking about using polycarbonate or it's derivatives (Lexan, Plexiglass, etc.) you should check out these links below:

http://www.modders-inc.com/modules.php?name=Mod_101&op=Story2&mdid=4 (http://www.modders-inc.com/modules.php?name=Mod_101&op=Story2&mdid=4)
http://www.controlbooth.com/forums/scenery/12031-how-cut-polycarbonate.html (http://www.controlbooth.com/forums/scenery/12031-how-cut-polycarbonate.html)

They have some good basic information on tools and techniques, especially for finishing cut pieces and how to work through curves. Bless the case-modding community  :)

I'll get some pictures up soon.   
Title: Re: Introducing my Hex: Ally
Post by: Ro-Bot-X on February 28, 2010, 02:37:10 PM
You should be OK with just a pan servo for the camera. And perhaps you can mount it at an angle, since the camera sees a cone and you don't really need to see too close to it's front. If you need to see closer, just lower the front of the robot (using the legs) and lift the back of the robot or vice-versa if you need to see higher. A Sharp IR ranger should be mounted parallel with the floor, but a sonar sensor at a slight angle, or it will pick up the carpet edge as an object at a certain distance.
Title: Re: Introducing my Hex: Ally
Post by: parallax on February 28, 2010, 03:31:39 PM
You should be OK with just a pan servo for the camera. And perhaps you can mount it at an angle, since the camera sees a cone and you don't really need to see too close to it's front. If you need to see closer, just lower the front of the robot (using the legs) and lift the back of the robot or vice-versa if you need to see higher. A Sharp IR ranger should be mounted parallel with the floor, but a sonar sensor at a slight angle, or it will pick up the carpet edge as an object at a certain distance.

This is true! I will have quite a range of motion just from being able move the body. I did some quick and dirty figuring... If I went with the pan-tilt system where I have it in my diagrams and fiddle with the way the tilt bracket is mounted I should be able to get Ally to see behind itself! So I definitely have some wiggle room.

As far as mounting a sharp IR or sonar, my initial plans for the bot don't involve a microcontroller. Just a SSC-32 and a BlueSMiRF modem. All of the processing will be done on a PC. I plan to do some major number crunching and want to allow plenty of overhead. Not only will it use OpenCV to perceive its surroundings, but it will eventually be running some complex AI algorithms to interact with its environment. The way I see it right now, having a microcontroller on board is simply an extra item to power, more weight to manage, and superfluous if I plan on hooking up to a PC anyway. This may change eventually, especially if I want to integrate some other sensors. Unless there is a way to do this wirelessly and not incorporate a microcontroller that I'm not aware of...

   
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 05, 2010, 12:06:09 PM
Okay guys its been awhile since I updated here. Progress is coming along smoothly (albeit slowly) on the construction. I'm still wrapping up my college apps for transfer and it's eating a lot of my time. So I managed to "sneak" into the Marine Biology workshop here on campus and use the tools.  No sneaking about it actually... I'm the programmer for the schools MATE team again this year. So instead of building the ROV, I was working on my hexapod.  ;D

So I mounted a grinding stone on the drill press running at 2500RPM and used it to rough out the femurs. It worked surprisingly well on the poly. I didn't have any melting issues, and once I figured out the gist of it I started cruising along nicely. The nice thing about using the tinted polycarbonate is you can see right through it. I had a scale drawing I could hold the piece I was working on to and check out how I was doing.

I'll be back in the workshop tonight and will have more pics up later.  
(http://www.christopherconley.net/images/drillpress.jpg)(http://www.christopherconley.net/images/me_at_drillpress.jpg)(http://www.christopherconley.net/images/roughed_out.jpg)
  

Title: Re: Introducing my Hex: Ally
Post by: Dont_Taz_Me_Bro on March 05, 2010, 03:50:26 PM
Shame you didn't have a lasercamm at your disposal

I take it back.....I guess you're not supposed to use a lasercamm to cut lexan

Title: Re: Introducing my Hex: Ally
Post by: parallax on March 06, 2010, 12:18:02 PM
Perhaps a CnC machine! What I wouldn't do for a nice fully equipped workshop. I guess I should just be happy having a place to work on this. A little dreaming never hurts, though ;)
 
So I learned a few new things about working with polycarbonate, and I have a few more shop pictures to post. What I learned (the hard way) was that a little heat might be a good thing but too much heat is really bad when grinding it. Normally what I have been doing it grinding a section at a time, give the stone a chance to cool just a bit, and then grinding a different section. When the stone is just a bit warm it seems to grind better. However, when I was  working out the curves on the body I ended up letting the stone get a bit too hot... The picture speaks for itself ;) Luckily it was an easy fix (both the stone and the body).

So the lesson learned:
*When using powertools with polycarbonate, have more patience than what is normally required! 

Anyway, it turned out fine and you can see the before and after shots below. Now that I'm this far along I will try to get some pictures of the body with some of the hardware mounted in the next couple days.

I also need to start working on converting Phidget AdvancedServoController code into something an SSC-32 can understand. Why reinvent the wheel, when I already have my pan-tilt mechanism coded to track faces with OpenCV, right? I'm hoping that won't be too much of a problem. Programming is my strongpoint. I also have a framework for the IK but I need to actually begin implementing it into code. Now that I'm this far along in the construction, I can work on it more and have some meaningful progress because I will have a platform to test it on (yay!).

Never built a bot entirely on my own before... It has always been as part of a team, and never anything like this. You know what?

....This is ridiculously fun. :)

(http://www.christopherconley.net/images/tablesaw.jpg)(http://www.christopherconley.net/images/meltedpoly.jpg)

(http://www.christopherconley.net/images/beforecut.jpg)(http://www.christopherconley.net/images/aftercut.jpg)

Title: Re: Introducing my Hex: Ally
Post by: dellagd on March 07, 2010, 05:09:21 PM
lol man is that melted polycarbonate on the grinding stone :P
It always makes this stuff more fun if you have the correct tools\materials, so you can just power through the construction. It gives you a since of pride when you finish.

just a side note, I wish I had a table saw and what seems to be a drill press. Would make life easier. :D
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 08, 2010, 08:22:19 PM
lol man is that melted polycarbonate on the grinding stone :P

Why yes it is! Lol! Sorry for the bad quality pic..
It always makes this stuff more fun if you have the correct tools\materials, so you can just power through the construction. It gives you a since of pride when you finish.

just a side note, I wish I had a table saw and what seems to be a drill press. Would make life easier. :D

Whatever works, right?  ;)  I've been busy the past few days and I managed to find a few more interesting ways to use a drill/drillpress, as you will see.

I also managed to cover myself in toothpaste  Let me explain...

I had all of the femurs and main chassis roughed out, and the edges were, well, rough. So I used a 60 grit sandpaper drum mounted on a handheld to clean them up. After that, a 120 grit. Now this is where the toothpaste comes in. I had read on a case-modding site that toothpaste acts as a great finisher/polisher because it contains mild abrasives. I think to myself, "Why not?" and grab a tube of Crest, a buffing head for the handheld, and go outside. Well, I was a little too liberal in applying it, and managed to cover a 4 x 4 meter area in toothpaste spray, with little 'ol me getting the worst of it. Hence, no pictures of that escapade, as I was way to sticky to touch a camera. The funny thing is that it worked beautifully! The edges are nice and smooth (smoother than when the poly came from the factory, in fact). For anyone thinking about doing this, all you need is VERY little toothpaste

I used a drill to punch a hole in the chassis for the pan-tilt assembly, and then used sandpaper to smooth the edges. Again, it worked supprisingly well, if only a little labor-intensive. I was concerned I would crack the poly working close to the edge like that, but I have found that by taking my time and applying minor amounts of pressure that the poly seems to undergo very little stress.

Now I have the coxa assemblies and the pan-tilt mounted. I still need to get around to making the cutaways for the tibia sections, and drilling holes in the femurs to mount them on the servos. How's it looking so far, guys?

(http://www.christopherconley.net/images/before.jpg) (http://www.christopherconley.net/images/during.jpg)(http://www.christopherconley.net/images/after.jpg)

(http://www.christopherconley.net/images/overlayiso.jpg)(http://www.christopherconley.net/images/overlaytop.jpg)(http://www.christopherconley.net/images/overlayfront.jpg)
Title: Re: Introducing my Hex: Ally
Post by: Canabots on March 10, 2010, 06:37:25 AM
That's looking pretty darn incredible! It looks way nicer than my quadruped at the moment!  :D

Keep up the good work! And don't forget to keep posting updates!
Title: Re: Introducing my Hex: Ally
Post by: dellagd on March 10, 2010, 02:58:59 PM
ugg.. if only my robots looked so... professional...
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 18, 2010, 06:46:18 PM
Thanks for the compliments guys! It really means a lot  ;D

Alas the poor college student dilemma strikes again and I was taken away from my poor Ally for awhile and unable to update. However I'm on spring break now...  ;)

I shot a quick video update to share with you all.

Enjoy!

[YOUTUBE]Kfftr01kcFs[/YOUTUBE]

Also check back soon form some more build pics
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 18, 2010, 06:54:30 PM
What I just realized from posting this video on YouTube is that the word Ally (as in the singular form of Allies) is spelled the same as the name Ally (as in Ally McBeal). That was totally unintentional...Guess I just figured whether Ally is a boy or girl!
Title: Re: Introducing my Hex: Ally
Post by: Razor Concepts on March 18, 2010, 06:59:00 PM
Looks awesome :D
Title: Re: Introducing my Hex: Ally
Post by: Xyver on March 20, 2010, 11:58:43 PM
Well... I dont know what you are going to do autonomous wise, but if you make it a recharging station and the smarts to recharge it self, then to figure it out if its a girl or a boy you just have to decide if you want the plug on the bot or the base.... ;)  

Awesome work though, that's a badass looking robot.  Can't wait to see it walk. Ive always wanted to build a hexapod.... Damn my lack of cash and smarts...
Title: Re: Introducing my Hex: Ally
Post by: dellagd on March 21, 2010, 05:32:18 AM
yes, hexapods can be quite pricey.
look at all of those servos!
Title: Re: Introducing my Hex: Ally
Post by: TrickyNekro on March 21, 2010, 05:40:18 AM
Just shock n' awe...
Incredibly nice man!!! Well done!!!
Title: Re: Introducing my Hex: Ally
Post by: Soeren on March 21, 2010, 01:41:40 PM
Hi,

yes, hexapods can be quite pricey.
look at all of those servos!
yes, but with 4-bar links, 2 servos or motors should do (one for each side).
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 21, 2010, 05:55:15 PM
Thank you all so much for your kind words! You guys are all amazing and I wouldn't be doing this if it wasn't for SoR. Hearing these things from you guys... I really appreciate it  ;D

Hi,

yes, hexapods can be quite pricey.
look at all of those servos!
yes, but with 4-bar links, 2 servos or motors should do (one for each side).

Being able to cut out 6 or more servos will go a long way towards making a hexapod easier on the wallet, and easier to program. Using a four-bar linkage mechanism for each leg was something I seriously considered doing when I was playing around with ideas for mine. What ultimately made me go for the three servos per leg was the extra DOF (and hence, more agility). I wanted to give Ally the ability to be very fluid and dynamic in her movements. But if you aren't worried about being able to do some of the more complex body movements I wholeheartedly agree that linkage mechanisms are the way to go. Much easier on the wallet, and much easier in the programming.   

On other fronts, I am seriously considering a bottom "plate" to take some of the strain off the servos and to provide more deck room for mounting things. Any thoughts or suggestions guys?

I have the Bluetooth up and running now. Mystery solved! I couldn't for the life of me figure out what I was doing wrong. It would make a connection, but the SSC wasn't receiving any of the commands I was sending over the terminal. After taking a break and coming back to work on it, I realized I was accidentally was plugging the TX on the SSC going into the TX on the modem, and vice versa with the RX... Oops!  ::) I guess that's what happens when you work on something for too many hours straight without a break.


Also, here are some build pics I never got around to posting. One is of my makeshift stand (yes, that is a candle) and the other is how mounted the legs.

(http://www.christopherconley.net/images/candlemount.jpg)(http://www.christopherconley.net/images/mountingleg.jpg)

 
Title: Re: Introducing my Hex: Ally
Post by: parallax on March 28, 2010, 06:33:37 PM
Hi Guys!

I have been terribly busy which is why I haven't posted an update lately. I have also been trying to wrap my head around the kinematics involved in a dynamic gait engine for a hexapod. Let me tell you: instant headache, but I love it. I have worked out a program that (as near as I can tell) calculates target coordinates on an XY plane for each leg given a particular distance through which each leg should travel. Right now it only works for a straight line and has no safety built (in terms of mechanical limitations of each joint, and in terms of each leg to the others). I'm finishing up adding that functionality, as well as coordinate plotting for a curved walk. As soon as I finish this I will post the source code and executable if anyone is interested. Or, I could also post a tutorial... What do you guys think? Would you like to see a tutorial about that? Or my source code?

I am a little confused about one thing in terms of the IK's execution- what I know is that typically dynamic IK solutions are updated so many times a second, and move through a period of cycles. What I have been realizing is that it seems like there is an obscene amount of number crunching to be done. There needs to be a way of optimizing/simplifying the equations so that they are manageable on the fly. I have just started looking a Xan's Pheonix code as well as WGhost9's Axon code... maybe I can figure it out by looking at their amazing work. All the same, if anyone has any insight they want to share I would appreciate it.

I have a block of time tomorrow where I can really hammer out some more on this, and could potentially post something tomorrow night. Let me know what you think.

  
Title: Re: Introducing my Hex: Ally
Post by: parallax on April 14, 2010, 09:35:23 AM
Ally Teaser Video:

[youtube]MbEUJaVoX8k[/youtube]

Note: I just uploaded this, so YouTube might still be processing it. If it doesn't work, try back in a few minutes

I'll post some technical details tonight  ;D
Title: Re: Introducing my Hex: Ally
Post by: dellagd on April 14, 2010, 02:49:29 PM
your robot cant stop looking at you
he knows his master
Title: Re: Introducing my Hex: Ally
Post by: parallax on April 15, 2010, 10:10:23 AM
@dellagd: Indeed she does!  :D

The Update:

What you are seeing in the video is Ally's facial tracking ability. Mathematically it is rather simple, if a bit of a pain to get calibrated just right. What's happening, you might ask?

*Ally snags a frame from the camera's video stream, and converts it to a black and white image for the Haar Classifier.

*Ally finds the face in the image, and draws a bounding rectangle around it. In terms of optimal settings for OpenCV's cvHaarDetectObjects() funtion, I have found that a scale of 1.1, 25 minimum neighbors, and the flag CV_HAAR_FIND_BIGGEST_OBJECT tends to minimize false detections. If you want clarification about what I'm talking about, just ask.

*Ally then calculates the center coordinates of that rectangle, and uses the width of it to estimate her distance away from the face. This works because most faces are roughly the same size.

*Based on the location of the center coordinate of the rectangle from the center of the camera's view (a.k.a. the error), Ally adjusts the pan/tilt mechanism that the camera is on to keep the face centered. Also, based on the width of the bounding rectangle (a.k.a. the distance), Ally adjusts the coxa servo's position to lean forward or backward to try and keep the distance the same.

That is what you are seeing in the video. My next step is to get Ally to walk when either the distance gets to short or to large, or when the face is about to leave her point of view from the right or the left.

The Challenges I'm Facing

The challenges I am running into with this are both mechanical and logical:

Mechanically I am finding that my design of the femur allows too much twisting. This is evident when Ally is up on three legs; the third leg of the tripod tends to bend. My solution is to reinforce the femurs with a "splint" of polycarbonate. This is effectively doubling it's torsion resistance (although don't quote me on that- I'm not a materials expert... I got that information second hand) while adding a minimal amount of weight. Other than that, I am finding the the servos are more than powerful enough, and the poly isn't flexing anywhere else; even under a full payload. It is all so effective that I had Ally doing one legged pushups the other day :)

Logical challenges are with the implementation of the IK for walking. I *think* I have the math put together on this one. Up until this point, I have abandoned two attempts at coding it so far and am about to try my third. My problem is with the implementation of the mathematical formulas into code. Before I try my third attempt, I am posting two word documents (one with my equations, one with a graph labeling all of the angles) to show you all what I am working with. Right now it is purely a geometric and trigonometric approach. In terms of my math background, I have a semester of Calculus under my belt but I am quick to pick up new things. If someone with hexapod IK experience could weigh in on them and tell me what I am doing wrong or what I could be doing better I would greatly appreciate it!

So that is where Ally is at! I hope you like it, and I would really appreciate the community's help with the IK :D

Here is the link to those files:
http://forums.trossenrobotics.com/attachment.php?attachmentid=1868&d=1271347738 (http://forums.trossenrobotics.com/attachment.php?attachmentid=1868&d=1271347738)

I have them hosted under my Trossen Robotics profile.

@Admin: Have you looked into the possibility of allowing the attachment of files to posts at SoR?
Title: Re: Introducing my Hex: Ally
Post by: parallax on April 15, 2010, 03:19:25 PM
It has come to my attention that the files I posted above are giving some people issues because they are in .docx format. Here are two alternatives:

In PDF format:
http://forums.trossenrobotics.com/attachment.php?attachmentid=1872&d=1271366362 (http://forums.trossenrobotics.com/attachment.php?attachmentid=1872&d=1271366362)

In DOC format:
http://forums.trossenrobotics.com/attachment.php?attachmentid=1871&d=1271366362 (http://forums.trossenrobotics.com/attachment.php?attachmentid=1871&d=1271366362)

Thanks!
Title: Re: Introducing my Hex: Ally
Post by: parallax on April 16, 2010, 11:56:26 PM
Good news! I got some help with my kinematics issues. Big thanks go out to Inxfergy for his help!  ;D  I would like to share his advice here for anyone else that may be trying to derive the kinematics for a hex and are looking at my equations for a reference. This is what he had to say:

----------------------------------------------------------------------------------------------

Most of your equations are more forward kinematics style. To get this turned into a program, you'll have to remember that the angles are the unknowns, and proceed from there.

So, first thing is going to be turn this from a 3D problem into a 2D one, by solving for theta. I would recommend thinking about theta in terms of the tangent function, Xb and Yb. There is a common function called atan2 which is typically used to find theta, given Xb and Yb. So, a single function gets you theta (sweet!).

Now that you have theta, you have two links and two joints left to place (and they are in the same plane), which are your red leg lines:

1. You would typically then find OB using OB^2 = (L1^2 + L2^2)^(1/2). OB, L1, and L2 form a plane, which all our calculations are now on.
2. Now, we notice that the same atan2 function could be used to find alpha (based on Zb and the length of the horizontal projection of OB).
3. You can then solve for (alpha + delta), because you have all three sides of your triangle -- and then subtract the alpha value you just determined to find delta.
4. And now, you have a function to describe phi in your sheet (as acos of a really nasty set of numbers).

At that point, you have your values for your servos!

----------------------------------------------------------------------------------------------------

Given this perspective I was able to narrow down that big mess I had into a few lines of code for my walking engine. I'll post the results soon  :D
Title: Re: Introducing my Hex: Ally
Post by: parallax on July 15, 2010, 09:06:47 PM
Hey all! So It's been a *long* time since I updated this thread... Been wicked busy finishing up school, participating in the MATE competition and so on and so forth. I got rejected as a transfer to Carnegie Mellon University (my dream school...*sigh*), but was accepted as at Worcester Polytechnic Institute(yes! :-) ). I'm double majoring in computer science and robotics engineering there.

So I will finally be able to take classes specific to robotics- I don't know if you have any idea how much that excites me!

Anyway, I did manage to get Ally walking about, and I have videos. I'll get those posted later tonight when I have a decent internet connection. However I have quickly realized that there are several design flaws in her chassis and hardware. These are:

-Chassis Flex: The one sheet of poly I used for her main chassis allows for too much flex. I have tried reinforcing the major flex points, which helped alleviate the problem to a certain extent, but it still is noticeable when she walks; especially in a tripod gate

-Unbalanced Payload: Her weight distributing is "all-kinds-of-funky" (according to my friend). This contributes to the flex problem mentioned above. Also, her battery is a tight fit underneath the chassis- especially when she gets to walking.

-Mechanical Restraints: Her legs are spaced at uneven (though bilaterally symmetrical) points along her chassis. this means that each leg has a radically different range of motion from the others.

-R/F Interference: I discovered this one by accident. I took Ally to one of my school's labs to show her off, and could barely get a signal from her wireless security camera. It took a minute to track down the problem, but we narrowed it down to the vast amount of cell-phones, laptops, and a wireless access node inside the lab all transmitting at once (this is what you get when you pack a room full of geeks I suppose). This might be a one time fluke and there may be no way around it, but I figured it was important enough to list here.

So here is my to-do list:
-Redesign her chassis
-Find a smaller battery pack
-Investigate options for a new wireless camera system

For rebuilding the chassis I haven't given up on polycarbonate entirely just yet. I may try two pieces of poly: an upper "deck" and lower "deck." For the supports/struts between the two decks I have been playing around with the idea of using balsa wood for its strength to weight ratio. I will also explore the option of aluminum, although I am still lacking a decent shop to work it in.

Right now, I am using a 6 volt NiMH 1600 mAH battery pack to supply power to her servos (this one here: http://www.lynxmotion.com/Product.aspx?productID=331&CategoryID=48 (http://"http://www.lynxmotion.com/Product.aspx?productID=331&CategoryID=48")). This is turning out to be far bulkier than I would like. Any suggestions for a better option? :-)

For the wireless camera I am looking into something like a WiFi enabled webcam... the wireless security camera I have right now is nice because of its size. I may not need to replace it, but if there is a comparable option out there that doesn't require the use of a video capture cable I will consider it.

I guess that's it for my update! I'll have those videos up later. I also promised a while back to post source code at some point- I need to clean it up and comment it better before I do that- right now it's such a mess that it's embarrassing! :-P   
Title: Re: Introducing my Hex: Ally
Post by: Ro-Bot-X on July 16, 2010, 05:38:00 AM
Hey Parallax,

I love your robot and I'm glad you'll get to improve it. This inspires me to build my own, but that might take a while because my wife hates spiders and hexapods give her shivers.

I am not sure if you saw Se.Gu.A.Ro. (http://letsmakerobots.com/node/21146) robot on LMR. It has only 2 DOF per leg, but it moves nicely and it's made out of metal. When walking, make that clanking sound like a Replicator, which I find so cool. This may inspire you to perfect your robot.

Take a look at the video here:
[youtube]r-ThvnBF1Mg[/youtube]
Title: Re: Introducing my Hex: Ally
Post by: parallax on July 16, 2010, 06:58:00 PM
@Ro-Bot-X: Thank you very much for your kind words! Hexapods are great and a challenge to build, but they can be creepy ;-) The most common reaction I get from people who Ally tracks with her facial detection is "I keep getting the feeling it's going to jump on me or something!" I get a kick out of it! Also, thanks for sharing that video- what a cool hex!

Here is the long promised and eagerly awaited video of Ally's first steps. I have made some significant improvements since this video was shot, but you can clearly see here the problems I highlighted in my last post. Once I address some of those problems (such as redesigning her chassis) I will shoot an updated video of her refined IK engine as well as put her through some of her paces. She just isn't ready for that yet!

Here is the video:
[youtube]8MQDb7dB4PI[/youtube]