PDA

View Full Version : 3DOF Quadrupedal AX-12A Mech :: Fang



Deimos
11-09-2013, 11:34 PM
Hi!

I'm currently working on my mech for the next competition: "Fang", and I thought it'd be nice to make a WIP thread so I can share what I'm doing. I also figured it'd be good to document my build process, if I later want to add it to the Wiki.

Anyways, last year my goal was to build a mech that worked. I managed to accomplish that more or less, so next competition I want to end up with a mech that works well.

I figured the best place to start would be the legs, and I've drawn up some models for the leg design I'm planning on using. Currently the plan is to use laser cut Plexiglas-G (I think that's what it's called) for as many of the parts as I can.
Side View:
5093
Almost Side View:
5094

I'm deciding between a foot design like shown, a pointed foot, and a freely rotating foot joint w/ a flat foot. However, I'll probably go with something like the above for now, and switch if I find a better solution.


The main chassis is going to be pretty standard, box shape with all the electronics and the battery. I've decided to go with a slewing bearing, slip ring, and MX-28, and a pair of 1:1 large spur gears (laser cut) for my turret pan. The goal there being to make it capable of continuous rotation. In addition to that, I will have a four bar linkage with an AX-12 for tilt.

For my electronics onboard, i'll have a BeagleBone Black w/ USB2AX, Xbee, Pololu motor driver board, the scoring system, and a collection of other components. In the turret, I will only have the camera/transmitter, and the airsoft gun.

I also made a diagram for no good reason:
5095


As soon as I can get all of my electronics working, I'll draw up the chassis parts, and get my first batch of parts cut. I'm planning on waiting to do my turret until they get the 5.8Ghz camera/receivers on the Trossen store (assuming they are still going to do that).

I haven't made much progress yet, but lemme know what you all think of what I have so far! :D

P.S. I'm probably not going to be making a whole lot of progress 'till the end of the quarter, my time management skills are somewhat lacking :p.

byi
11-10-2013, 03:03 AM
Looks good. I am curious to see how the continuous rotation pans out. (pun intended) wondering what parts you plan to use for that.

Xevel
11-10-2013, 03:33 AM
Hey Deimos,

That's a nice start :)
Looking at your diagram I am a little bit concerned at the slip ring usage though. Currently, if I understand it well, you will have at the same time the power from the battery for the camera, the power for the gun after it has been PWM'd by the motor controller and the dynamixel bus for the tilt servo.
Having the gun wires so close to the other two which prefer a calm electromagnetic environment migh require a good dose of noise suppression.

If i were you, I would wire the components up with the slip ring and test even before continuing the mechanical design, since in the worst case scenario, you might have to find another technical solution for the interface (which would impact the mechanical design) and at best you will validate that it actually work.

EDIT: HD2 uses a slip-ring too, but as far as I can tell only the Dynamixel bus passes through it, not a noisy PWMs at >4Amps.

Th232
11-10-2013, 06:56 AM
Looks good. I'd have to echo Xevel's concern about how many wires you're passing through the slip ring.

A design similar to HD2's might be better, another possibility would be to have the batteries on the main chassis then all the electronics on the turret Same end result of the only things being passed through the slip ring being power and the Dynamixel bus, but with a little less load on the pan servo.

ArduTank
11-10-2013, 07:31 AM
Deimos, AX-12's may not be enough if you start getting very much weight on. HS Walker's 5 pounds already and if I'm not careful, his servos overheat. I'm even working with 2 DoF legs, not 3 DoF.

Just be careful with your weight.

Otherwise, nice.

Deimos
11-10-2013, 01:00 PM
Looking at your diagram I am a little bit concerned at the slip ring usage though. Currently, if I understand it well, you will have at the same time the power from the battery for the camera, the power for the gun after it has been PWM'd by the motor controller and the dynamixel bus for the tilt servo.
Having the gun wires so close to the other two which prefer a calm electromagnetic environment migh require a good dose of noise suppression.

If i were you, I would wire the components up with the slip ring and test even before continuing the mechanical design, since in the worst case scenario, you might have to find another technical solution for the interface (which would impact the mechanical design) and at best you will validate that it actually work.
Good point Xevel! I didn't think about that :p. I will definitely make sure to test that out before finalizing my design. If I did run into a problem though, do you think moving the motor driver up into the turret would help? I think I would rather just add noise suppression, and try to fix the issue without moving things around, but that would probably be rather difficult. Especially with my limited electronics abilities ;).



A design similar to HD2's might be better, another possibility would be to have the batteries on the main chassis then all the electronics on the turret Same end result of the only things being passed through the slip ring being power and the Dynamixel bus, but with a little less load on the pan servo.

I'm not sure how that would resolve the issue, as I will still have the gun + camera power in the turret. The only difference being that there is no PWM'd signal, as the camera + gun power would be coming through at the same voltage. I will definitely have to look into HD2's design though, might be some useful information!


Deimos, AX-12's may not be enough if you start getting very much weight on. HS Walker's 5 pounds already and if I'm not careful, his servos overheat. I'm even working with 2 DoF legs, not 3 DoF.
Weight is always a concern. I'm aiming for about 2kg, although I'll probably overshoot that by a few hundred grams. I can only hope that my servos are going to be able to handle it for as long as they need to :p.

Edit: In case anyone was wondering, my slip ring is 12 wires, each rated for 2A @ 240V. If i don't need to redo my design, I will use 6 for gun power, 4 for Camera power/Servo Power, and 1 for servo data. Maybe I can use the extra to separate the servo data from the other wires, or to control a laser or something.

byi
11-10-2013, 01:30 PM
To fix the weight issue, I bolted a second ax-12 in line with my main second servo (what is that one called again?) on my 3dof legs. Since you are probably working with a similar weight, that might work. Might be cheaper than larger servos.

ArduTank
11-10-2013, 02:18 PM
If I remember right, you're talking about the femur. As in: body--coxa--femur--tibia--foot

Xevel
11-10-2013, 02:58 PM
I am not sure of anything, I haven't tried it all yet, but my gut feeling is that it would be better to have the motor driver as close as possible to the gun. Plus you already have a servo this side of the slip ring, so if your motor driver can be hooked on the dynamixel bus (I think Gertlex uses the guts of a AX-12s to control his guns), that would not be too difficult to set up :)

Other things to test in case of problems and if you don't have the proper tools/knowledge to identify the problem: wire the power for the gun directly to the battery [it will help lowering the voltage drop for the other components], and to filter the sh*t out of that power line as close as possible to the controller.
Put small ceramic filtering caps on the gun [helps with the noise created by the motor's brushes], big caps (as big as possible, rated for maybe 3 times your power voltage) next to the controller and put a big toroïd core with a few turns on the wire between the controller and the gun [to "dull the edge" of the current teeth created by the PWM].
Also, wiring the gun power as far away as possible from the rest of the wires, and having it cross other cables perpendicularly can help with the coupling noise.
Shielded cables for sensitive signals can help too, as well as shielding the motor.

I will have to solve the same problems soon (without the slip ring though) and will test the actual benefit of each of these, visualizing the difference each one makes. Usually it's more interesting to do things, find the problems, fix them, instead of that "cargo cult" version of things that consists in piling up all the recommendations found all around (without proper understanding of the cause and the solution, nor being sure that it is applied in the right way) which might even have adverse effects. Maybe if I find the time to learn enough about it to be sure of what I'm talking about I'll try to make a thread about it...

Deimos
11-10-2013, 03:46 PM
To fix the weight issue, I bolted a second ax-12 in line with my main second servo (what is that one called again?) on my 3dof legs. Since you are probably working with a similar weight, that might work. Might be cheaper than larger servos.
I think I'll be able to optimize the gait so that the torque is more evenly distributed between the Tibia & Femur servos, but doubling up the femur is a good option as well.

If i do some quick maths,
lets say the mech is 2kg, at any given time (while walking) it will be supported by 2 legs. So, 2kg(1/2)(9.81m/s^2) = 9.81N per leg. Inventor says the horizontal distance between the Femur joint & foot is 88.3mm, so 0.0883m.

τ = FdCos(θ) where Cos(θ) = 1
τ = 9.81 [N] * 0.0883 [m] = 0.866 [N*m] = 8.833 [kgf*cm]
Which is about 1/2 of the stall torque for an AX-12. Did I do that right?

Edit: Do you have any ideas as to how i can go about actually testing the slip ring? Should I just plug everything in, shoot the gun while trying to control the servo and see if it works? I don't have an oscilloscope :(.

ArduTank
11-10-2013, 04:15 PM
From what I can tell, yes.

byi
11-10-2013, 04:28 PM
The problem isnt necessarily stall torque. Operating continually well below stall torque can easily cause the servoes to go into thermal shutdown.

Deimos
11-10-2013, 04:34 PM
The problem isnt necessarily stall torque. Operating continually well below stall torque can easily cause the servoes to go into thermal shutdown.
Yes, I just noted that because I remember someone estimated the holding torque relative to stall torque, don't remember what it was though :p

Xevel
11-10-2013, 05:15 PM
For testing, well yeah I don't really see any other way if you don't have the tools :/

You can probably set up an experiment to try to catch problems as soon as possible.
Send write commands (with the return level to 2 to get status packets, which is the default) to a servo through the slip ring. Do that as fast as possible to flood the bus. Then print out the errors (bad packets, or status packets returning an error) while you fire the gun, turn the ring and look at the video feed at the same time.
That would be a good start I think: video interference or lost packets would indicate that something is not working well enough and has to be fixed. Having a look at the battery voltage could be informative too, if it goes way down when you fire then you might need a bigger or second battery [bigger would have less voltage drop when loaded, second would completely isolate the gun from the rest of the bot, solving a lot of potential problems at once] :/
I would also recommend to try to get a better idea of the peak current (a "max" function on a digital multimeter? just looking at it is not enough, the peak will be too short to be displayed by the multimeter) and average current for your gun. The peak current should be decreased by the toroid and caps if they are big enough, as they smooth things out, spreading the power usage over a longer time period.
I would hope that it's enough.

Deimos
11-10-2013, 05:31 PM
bigger or second battery [bigger would have less voltage drop when loaded, second would completely isolate the gun from the rest of the bot, solving a lot of potential problems at once] :/
I really like the second battery idea :D. I could just stick a 9 volt in the turret (the gun ran off of 4 AA's before I added hacksaw). That way, my gun would be far away from my scoring system, and wouldn't have to go through the slip ring at all. I would probably then move the motor driver up into the turret.

So i'd need:
Logic high - 1 wire
Logic ground - 1 wire
PWM signal - 1 wire
Current Sense/Optical Feedback - 1 wire
Dynamixel/Camera Power - 6 wires
Dynamixel Data - 1 wire
Other - 1 wire

Btw: Thanks for the help everyone! Much appreciated! :)

Edit: Just checked, 9v Alkaline weighs in at about 45g, not too bad!

jwatte
11-10-2013, 05:48 PM
A 9V battery (the small rectangular kind) will not be strong enough to drive a gun motor -- the internal resistance (source impedance) is very high, so it's only good for a hundred milli-amps or so.
A small, light, 7.4V LiPo might be good, though. There are really tiny ones in the 300-500 mAh range that weigh very little, and have good amp capacity.

Deimos
11-10-2013, 05:50 PM
A 9v can drive the gun motor, don't know how that works, but it does!

Edit: I'll see how reliable it is with my motor driver, but I'd rather avoid having more than one LiPo on my mech (those things are a lot of work).

Edit: The battery's datasheet says it has an impedance of 1,700 m-ohms (at 1 kHz), so I=V/1.7 where nominal V = 9. So I = 5.3A?

Th232
11-10-2013, 05:58 PM
I'm not sure how that would resolve the issue, as I will still have the gun + camera power in the turret. The only difference being that there is no PWM'd signal, as the camera + gun power would be coming through at the same voltage. I will definitely have to look into HD2's design though, might be some useful information!

My thinking was that your block diagram would look like this (I think I've rearranged it right):
5096

That way you only need three wires through the slip ring, although in practice I guess you'd split power/ground between all the spares.

Deimos
11-10-2013, 06:03 PM
That would simplify the connection through the slip ring, however you would still have the large current from the gun being drawn through the slip ring right next to the dynamixel data bus. Then again, I really don't know all that much about electronics so you lot probably know better than I do. :p

Th232
11-10-2013, 06:19 PM
Ahh, I get you now. Seems that a second battery would be the way to go then to solve that issue.

Deimos
11-10-2013, 06:26 PM
I actually have a 1300mah 7.4 lipo (was planning on using it last year), so if I have any issues at all with using a 9V I will just switch to that. It's only about 10g heavier so the only thing i'm losing is convenience :) (putting in a new 9v when it stops working is a lot easier than carefully monitoring & charging a lipo).

Edit: Revised Diagram:
5097

Edit 2: While poking around on McMaster Carr, I found some really tiny roller chain: http://www.mcmaster.com/#roller-chain/=pbrvkq
Now, I haven't really explained my part choices for the continuous rotation turret, so here goes:

MX-28: Will be used for turret pan in wheel mode, I will have a separate AVR microcontroller on the dynamixel data bus that will (in theory) allow me to set goal positions for the MX-28 (by polling the current servo position and adjusting the motor speed). I need an MX-28 for the 360 degree high resolution absolute encoder, and I need the AVR to control the direction (CCW vs CW) to its goal position.

Slewing bearing: I need something for the slip ring to go through, and a slewing bearing seemed like a nice addition to the turret.

Spur gears: I need a way to translate the MX-28 rotation to the turret with a 1:1 ratio, so the encoder will still be easy to use.

Anyways, then I found this chain and I thought, what if instead of two spur gears, I had a couple of sprockets and a chain. One of the problems with the spur gears is that they need to be large enough to span the distance between the center of a 120mm slewing ring and the MX-28, with a chain & sprockets this wouldn't be an issue!

And lastly, my robot would probably be at least 10x more bad a** if it has a chain on it :p

Xevel
11-10-2013, 10:30 PM
9v might be convenient but appart from the internal resistance that jwatte mentioned (->heat, voltage drop when pulling high current), there are the two small matters of capacity (hint: it's quite low as you can imagine based on the small size for a relatively high voltage) and price. Cheap batteries have aweful characteristics so you would end up buying many of them...
Try it, see how many rounds you can fire with a battery (with the same fireing pattern as you plan on using, not in full auto), then estimate how many hours of testing / usage you will want to get for the mech, deduce the price, and see for yourself if this is worth the convenience of not recharging lipo batteries. Or do it in reverse: estimate budget, see how many round you can fire. Sometimes it might be better for the whole project if you throw away some money to save time/frustration, but it's not practical/possible for everyone.
Actually, thinking about it, it might be a great motivation to learn to pilot and aim better, make every round count xD

Deimos
11-10-2013, 10:39 PM
Between you and Jwatte advising that I stay away from 9v batteries, I think i'll just use the lipo. After all, they aren't that much work to use :p.

Xevel
11-10-2013, 10:47 PM
And about your battery computations: it's not exactly that.

The ESR at 1kHz is the impedance that a 1kHz sine wave would see, and you don't really have a load that is analog to that. Higher frequencies will see a stronger resistance, and lower frequencies a lower one. You would need an impedance curve to see what frequency sees what resistance.

Anyway, let's assume you are drawing power at 1kHz. Your computation is mathematically plausible (i haven't checked the value) but what it means it that to get a voltage drop of 9v through the internal resistance, you would have to draw 5.something amps.
Said otherwise: if you could draw 5.something amps, the internal resistance would eat up 9v, leaving... 0v for your gun (which does not make a lot of movement :p).

I think the facts that you are not drawing power at 1kHz and that the gun can go on with a pretty low voltage once it is running (i don't remember exactly but I made it run with just a few volts i think, once it has started) are what is saving you when you manage to run the gun from that battery.

Edit: don't just take our word for it, try and report your findings! We offera advice peppered with marks of our uncertainty, there's a reason for that: we are not 100% certain. Go figure it out for real, prove us wrong if we are :)

Deimos
11-10-2013, 10:54 PM
I told you my electronics abilities were lacking :D! Hence the question mark:

So I = 5.3A?
That makes a lot more sense that what I had figured. Thanks for explaining it!

Deimos
11-11-2013, 06:46 PM
I've made a little progress on designing the main chassis. I thought I'd share the designs for the turret pan.

Here is the underside of the plate which connects the coxa servos. Obviously it is missing some parts, but for the purposes of explaining the turret, I think it's fine.
5098
The holes for the machine screws that connect the bearing to the laser cut parts are not there, because I do not actually know the exact dimensions for the hole placement in the bearing I plan on using.

The black circle on the main plate represents a cut between parts, with the inner circle attached to the corresponding circle on the slewing ring.

The two adjacent circles are stand-ins for spur gears.

The MX-28 will be attached with a few separate pieces & standoffs.

Top view:
5099

The slip ring will be mounted to the set of three holes, probably with washers so i don't have to countersink the screws holding the spur gear on.


That's all i've got for now. Lemme know what y'all think! :)

ArduTank
11-11-2013, 08:11 PM
Nice. I had a slewing ring on HS Walker, but the 3 DoF upgrade allowed me to get rid of it's weight because I have a metal one. Try to find one made out of plastic or something lighter than metal.

jwatte
11-11-2013, 08:14 PM
Why are you driving the center with 1:1 gearing from the MX-28, instead of driving the center directly?

Th232
11-11-2013, 08:36 PM
I presume the slip ring has to be along the turret's axis of rotation, and mounting the servo directly above/below it would be a bit of a pain?

Deimos
11-11-2013, 08:45 PM
What Th232 said :)
5100
The wires go through the hole in the middle.

Edit: The slip ring mounting holes look really crooked. I'm going to have to double check those :/

jwatte
11-12-2013, 10:37 AM
mounting the servo directly above/below it would be a bit of a pain?

Perhaps.

Given that you have to do something (the gear is also not "free" to mount) I would probably build a simple coupler that has spacing for the slip ring mount on one end, and spacing for the MX-28 horn on the other. But I hate gears; they never go the way I want for me :-)

Deimos
11-12-2013, 11:57 AM
I honestly can't think of a way to make that work :/

If you can draw a diagram or something to explain, I'd be more than happy to use something simpler than gears!

jwatte
11-12-2013, 06:22 PM
I'm assuming the slip ring connections come out on the outside, above the mounting plate, and the rotating part comes out the inside, up into the turret.
The connection would then look something like:

5103

Rotating parts are red.

Deimos
11-12-2013, 06:36 PM
The slip ring looks like this (http://www.adafruit.com/index.php?main_page=popup_image_additional&pID=1196&pic=2&products_image_large_additional=images/large/1196_LRG.jpg).

I probably would have picked up a toroid slip ring (http://www.adafruit.com/index.php?main_page=popup_image_additional&pID=776&pic=0&products_image_large_additional=images/large/ID776end_LRG.jpg), but adafruit stopped selling them and they are really hard to find :/

cire
11-12-2013, 08:30 PM
The gear is a good idea, I would actually recommend doing a gear reduction rather then having them 1:1, those servo's move fast - which is good for looking around, but when it comes to aiming more precise control is always better. I have a design with a 3:1 ratio reduction using a timing belt on the turret, although 2:1 would be good as well. Having a bigger driven gear should also reduce your backlash.

Deimos
11-12-2013, 08:50 PM
That's a great idea! With the resolution on the MX-28 and a 2:1, i'll have a resolution of 0.044 degrees (almost 8 times what an ax-12 has). 3:1 would result in .029 degree resolution. Do you think i would notice the difference while aiming?

May I ask why you decided to go with a timing belt over gearing? Also, did you purchase your belt pulleys pre made, or design them yourself (if the latter, how did you get them fabricated?)

Edit: I had that backwards didn't I :/

Edit 2: Values fixed. Also, any ideas on how the tell the difference between opposite directions? With a 2:1 90 degrees east of north would show up the same as 90 degrees west of north on the MX-28's encoder.

ArduTank
11-13-2013, 05:57 AM
Deimos, you could have the code on the ArbotiX be able to correct it. Just let the servo think what it wants to. Th ArbotiX could handle the conversion.

Xevel
11-13-2013, 09:24 AM
Deimos, you could have the code on the ArbotiX be able to correct it. Just let the servo think what it wants to. Th ArbotiX could handle the conversion.

Nope that's not going to be that easy. The biggest flaw of the MX-28 for me is that there is no support for multi-turn in servo mode. so when you increment the position and get to 359°, it you want to go to 361° (which is the same physical position of the horn as 1°), you have no direct way to cross the 360°/0° line easily, in servo mode. If you tell it to go to 1° it will do a full turn.

Two ways to do it however, as dumb as they are:
- change to wheel mode when you need to go over the line, and go back to servo mode after crossing. This will be annoying and will introduce a lot of side effects, jitter, etc around this position. I would not recommend if you want something nice and smooth.
- be always in wheel mode and do the position control yourself... or no position control at all! If you map your joystick to the speed of rotation, then you have a nice an potentially very precise control method ^^ [and I realize now that it might have been what Ardutank was trying to say]. Since you have a slip ring, you don't have to care about the number of turns anyway, and can still have "align to..." commands by doing the position control yourself until you are close enough to the target that you know you are not going to cross the line.

Deimos
11-13-2013, 09:33 AM
- be always in wheel mode and do the position control yourself... or no position control at all! If you map your joystick to the speed of rotation, then you have a nice an potentially very precise control method ^^ [and I realize now that it might have been what Ardutank was trying to say]. Since you have a slip ring, you don't have to care about the number of turns anyway, and can still have "align to..." commands by doing the position control yourself until you are close enough to the target that you know you are not going to cross the line.
This is the plan. I will have a separate AVR that gets the goal angle relative to the current angle from the BBB, and controls the MX-28 (polls the position register and changes speed/direction based on the goal position).

That's one of the reasons I wanted to do 1:1 (every angle would show up as a unique value on the MX-28's encoder), but I suppose I can just have my AVR toggle the semicircle the turret is in when the position jumps from the max to 0 or vise versa.

ArduTank
11-13-2013, 10:10 AM
Xevel, that is what I was trying to say

jwatte
11-13-2013, 10:38 AM
I see. If they had just routed the outside wires up, instead of down, you'd have been golden :-)

Looking around, it seems Moog is pretty much the only maker, and they don't have a lot of distribution. Hawk Electronics, the one US distributor I could find, went bankrupt earlier this year. Bah!
(Also, the nice ones are hundreds of dollars)

Deimos
11-13-2013, 10:14 PM
I've been working on getting my gears drawn up, and I've encountered a small problem.

Here is a gear, shown with the gear outline, and the offset outline for laser cutting:
5105
If we zoom in on the red square, we see this:
5106
The circle represents one point on the path of the laser. However, because the laser is a circle, it cannot completely remove the material from the corner without cutting into the gear somewhere else.

So, do you think this is something I have to worry about? I don't mind having my first few gears be non-functional, but I'd like for these to at least have a reasonable chance at working on the first run.

Gertlex
11-13-2013, 11:12 PM
Looking at the profile of the gear in your image, the gears shown won't mesh that deeply anyways.

And a fillet is always a good idea because a right angle is just a stress concentration point... Thus if in fact you are going to mesh the gears that fully, then make the cut-out go deeper.

Caveat: I'm applying basic statics to this; gear design isn't something I've done, and is something I perceive as a bit of an art.

Deimos
11-14-2013, 12:32 AM
Seems like sound reasoning to me :)

I guestimate they will be here in about a week. I will also be getting a single set of pieces for one leg, to verify range of motion.

ArduTank
11-14-2013, 05:40 AM
Deimos, on the gear, fillets are ALWAYS better. I've even had to take into account the endmill for parts I've wanted milled.

jwatte
11-14-2013, 11:26 AM
If it's helpful, here is a program I wrote to generate involute gear profiles to SVG files and G code, with various parameters:

https://github.com/jwatte/gears


(https://github.com/jwatte/gears)

Deimos
11-17-2013, 03:41 PM
If it's helpful, here is a program I wrote to generate involute gear profiles to SVG files and G code, with various parameters:

https://github.com/jwatte/gears
(https://github.com/jwatte/gears)
That could come in handy :). Thanks!

I've been working out the software side of things, and I've decided to use Qt (c++) for the application running on my laptop. So far its been really easy to use, they even have nice serial port & camera classes :).

Deimos
11-29-2013, 06:33 PM
The laser cut parts came out quite nicely, the gears mesh well, and the Tibia section fits snugly. However, my camera is currently hiding somewhere, so no pics for now :(.

I made some more progress on the chassis design. Fitting a BBB & an 11.1 V 2200mAh lipo into that small a space is proving to be a lot more difficult than I though it would be :p.

Anyways, here is what I have so far:
5145
As you can see, the battery is uncomfortably close to those gears. I'm going to have to countersink the screws holding the gear on and make a spacer/barrier to go between them :/.

If you take a close look at the rectangular holes:
5146
You can see that they are for the female headers on the BBB. I decided that I wanted a separate panel underneath the ones that connect to the AX-12s partly because I didn't wan't the MX-28T sticking out the bottom, and partly because I wanted more room for electronics.

Make some things disappear, and it's a little clearer what's going on with the BBB:
5147

So far, that's the best I could come up with. If anyone has any ideas on how to make this design a little simpler, let me know :)!

While the plastic is fairly light, I've been worried about weight with multiple panels, so here is the plan B leg design (if I run into overheating issues):
5148
In essence, all I've done is switched out the femur servo with an MX-28T. It seems it's actually possible to screw the RX series brackets directly to AX series brackets, so switching out the AX-12 looks like it will be pretty simple.

ArduTank
11-29-2013, 11:26 PM
With the leg, be aware that you may need to upgrade the tibia also if you get too much weight.

On the body, you can increase the diameter of the body without affecting leg performance greatly. The only performance drop in increasing the size of the body is the extra material. Better to go too big than too small.

Deimos
12-03-2013, 07:28 PM
I ended up just increasing the height of the lower section and swapping the battery & the BBB around. I'm about 90% sure I can fit everything else in there, (going to have to double check some of the PCB heights) so I'm almost ready to get these cut. I also trimmed down the size of the lower compartment a bit.

5170


With the leg, be aware that you may need to upgrade the tibia also if you get too much weight.
The average moment arm on the Tibia is something around 1/5th that of the Femur, so i doubt it would be too much for the Tibia to handle :D.

ArduTank
12-04-2013, 05:45 AM
Still AX-12's are kinda weak. I'd just be wary of it.

Deimos
12-15-2013, 04:42 PM
I'm probably missing something incredibly obvious, but I've looking through the bioloid library for the Arbotix to check how it does interpolation, and I'm thouroughly confused.

It looks like the interpolation engine divides up the distance between two positions into a certain amount of frames based on the time it is interpolating over, and then calculates the distance the servo should move in one frame. Then it moves the servo that distance each frame.

The part I'm confused by is why you would divide it up into frames? Why not just calculate the speed and write it to the moving speed register before writing the goal position? It seems like that would free up some resources to do other things.

Again, probably missing something really obvious here, but I don't see any reason to do interpolation this way.

tician
12-15-2013, 05:00 PM
I seem to remember there being claims that the dynamixels had a tendency to overheat when trying to use the speed register instead of interpolation. Even the Robotis firmware and DARwIn-OP framework use interpolation instead of the speed register, and it works really well without requiring that much effort.

Deimos
12-15-2013, 05:09 PM
I guess that makes sense. Interpolation it is then! I'll have plenty of extra processing power to throw around with my BBB so I doubt I'd have been saving a noticeable amount a resources anyways.

ArduTank
12-15-2013, 06:10 PM
Diemos, are you controlling the Dynamixels direct from the BBB, or are you using an ArbotiX or the like as a pass-through??

KurtEck
12-15-2013, 06:17 PM
For awhile I played with the speed registers on the AX-12 servos and did not get the smooth predictable movements I wnated and went back to using the bioloidController library interpolation on the my PhantomX (both Hex and Quad). I know that KevinO has had some better luck on his hexapod. Also not sure if you getter results with their higher end servos.

Recently I played with the USB2AX and RPI and added the code to do the interpolation to the USB2AX device, which I tested on the RPI. The same code should work the same with the BBBk. (But this is a different thread)

Kurt

Deimos
12-15-2013, 07:28 PM
Diemos, are you controlling the Dynamixels direct from the BBB, or are you using an ArbotiX or the like as a pass-through??
I'm controlling the servos using a USB2AX plugged into the BBB.


Recently I played with the USB2AX and RPI and added the code to do the interpolation to the USB2AX device, which I tested on the RPI. The same code should work the same with the BBBk. (But this is a different thread)
I was looking through that thread, and it looks like a very nice solution. I'll probably hold off on trying it out until I get my quad working with interpolation done on the BBB though (and then switch it over to the USB2AX).

ArduTank
12-16-2013, 06:08 AM
You could run a very complex IK solution then.

Xevel
12-16-2013, 07:20 AM
You could run a very complex IK solution then.

It's 3DOF, there isn't much to compute since there is only one solution and it can be found analytically... you can do that on a 8bit MCU, as many already have...

ArduTank
12-16-2013, 12:03 PM
Okay, clarification time. When I said complex, I was meaning how granular the control and walking is.

Deimos
12-16-2013, 12:54 PM
Anyone think it would be feasible to do IK at ~30Hz? I could just skip interpolation and calculate every step :p.

tician
12-16-2013, 12:58 PM
Is that not what NUKE already does for quad and hex bots?


The DARwIn-OP framework easily does biped IK at 125Hz, and I am hoping to re-implement that walking engine on the CM-904 at >30Hz.

Deimos
12-16-2013, 01:00 PM
I could be wrong, but I believe NUKE generates a few poses and interpolates between them at 30Hz.

ArduTank
12-16-2013, 03:18 PM
Deimos, what I'm saying is that you should be able to interpolate at a higher rate. (>30Hz, maybe 70, or more?)

KurtEck
12-16-2013, 04:25 PM
Not sure of the maximum you could do, but right now I have the USB2AX code default to 50hz with my version of the firmware. I have not done, tested the limits of it, but could go higher. I put in a settable register that you can set the frame time in ms...

ArduTank
12-16-2013, 05:25 PM
Hmm, speaking of interpolation, is it possible to get the ArbotiX to interpolate at a higher Hz speed than normal with PyPose sequences???

KurtEck
12-16-2013, 05:40 PM
Look at BioloidControll.h

at:
/* pose engine runs at 30Hz (33ms between frames)
recommended values for interpolateSetup are of the form X*BIOLOID_FRAME_LENGTH - 1 */
#define BIOLOID_FRAME_LENGTH 33

Change this to a different number of ms like 20 and it will run at 50hz

ArduTank
12-16-2013, 06:06 PM
Thanks. That will help with my biped.

jwatte
12-17-2013, 10:56 AM
With Linux-computer-plus-Atmega-controller, I did 60 Hz IK. The main problem was instability with the USB connection at higher speeds.

With the OpenCM9.04, the full IK solution and control loop (on-board, no second Linux computer) runs in 1.5 milliseconds so I could do 60 Hz, but I do limit it to 100 Hz right now (still tweaking this.) Bandwidth on the TTL bus starts becoming a bottleneck, even at 2 Mbit/s. Also, at that speed, I'm starting to see some servos sometimes not receiving the status read request I also send them (in a round-robin fashion.) I think the interrupt disable time on those servos may actuallly be greater than the needed 5 microseconds to get the proper command detection at 2 Mbit, and I perhaps it doesn't use DMA.

Deimos
03-22-2014, 04:51 PM
Progress:

5450

Everything went together fairly smoothly so far! Just one thing i'm having trouble with: I can't figure out how to get the horn onto my MX-28 :p, it's really, really difficult to put on. I've only been able to get the horn about half way onto the spline, and I don't want to push any harder for fear of breaking it. Anybody have this problem before?

Other than that, I just need to get everything wired together and I can start doing some payload tests. I'll post a walking video soon!

Xevel
03-22-2014, 05:10 PM
Looking good!



Everything went together fairly smoothly so far! Just one thing i'm having trouble with: I can't figure out how to get the horn onto my MX-28 :p, it's really, really difficult to put on. I've only been able to get the horn about half way onto the spline, and I don't want to push any harder for fear of breaking it. Anybody have this problem before?


Yeah on the beta MX-28, 2 years ago, it was like that. I haven't searched for a fix so far but I'll be interested in one very soon, if you do find one.

DresnerRobotics
03-22-2014, 05:10 PM
Attach the horn by screwing the 2.5mm bolt into it slowly. Just make sure its aligned first, they don't come off easy. You won't break it, they're intentionally very tight.

tician
03-22-2014, 06:00 PM
Yeah, the only way to fully seat them is with the retaining screw, but do not over tighten the screw as it will make rotation a bit more difficult. Basically, just tighten it until the washer is forced flat between the horn and servo housing while occasionally checking how easily it rotates.

Removal of the horn is best accomplished with a piece of metal (or a spare horn). If using a spare horn, just attach it to the mounted horn with two or more well-spaced, long M2 screws and use the retention screw in the center of the horn to pull it off. The screw will back out of the hole in the spline and press against the spare horn to pull the mounted horn off. Learn from my mistake: be very sure the retention screw is actually the longer bolt/screw meant for the horn or you will damage the internal threads of the spline before it can completely remove the horn.
If using a chunk of metal, make sure it has at least two holes to line up with the mounting holes of the horn and a hole in the center to pass a hex tool through without letting the retention screw pass. The process is the same as using a spare horn.

Deimos
03-22-2014, 09:59 PM
The retaining screw did the trick, thanks!

Deimos
12-27-2014, 05:45 AM
Well, took a little longer than expected, but with some help from my brother it's walking. Using an Arbotix-M for now. Beaglebone Black was looking like it was more work than I wanted to do at the moment, I will probably switch back when we try to make the robot partially autonomous.

Current gait generator/IK engine loop is running at ~111 Hz last I checked, so not to shabby.
The gait generator and IK were written from scratch, currently capable of omni-directional locomotion. We still need to add rotation capabilities to the gait engine.

Pretty rough right now:


http://youtu.be/R_RUoay-EOY

(Boston dynamics aren't the only people who can make robots walk on treadmills! :p). Those dangling cables look like they could have gone very badly :robotsurprised:.

If the treadmill is to be believed that's somewhere north of 300mm/s. I'm pretty skeptical though, actually accurate speed measurements will be taken in the near future.

Plenty of work left to do stabilizing and I think we can squeeze a little more speed out of the gait generator. I'm considering redesigning the feet, I think the wide feet are negatively impacting stability at high (relatively) speeds. Updates tomorrow!

kamondelious
12-27-2014, 10:17 AM
Looking good!

Zenta
12-27-2014, 11:08 AM
Great work! The gait look very smooth. Best way to use a treadmill!

darkback2
12-28-2014, 03:12 PM
Would you mind posting your code? I would love to look at your IK engine...

Deimos
12-29-2014, 07:45 PM
Would you mind posting your code? I would love to look at your IK engine...

Sure! Github (https://github.com/Jared-B/Fang/blob/master/main.cpp). Good luck understanding that :p. It is the result of two incredibly lazy programmers at 2:00 in the morning. It's going to be reorganized, cleaned up and commented soonish (probably).

Basically

boolean doIK(Leg * a) {
a->coxa = atan(a->x/a->y);
Coxa angle is arctangent of x/y coordinate.


float d = sqrt(pow(a->x,2)+pow(a->y,2)) - C_Length;
Find horizontal distance between femur joint and end of foot.


a->tibia = acos((float)(pow((float)d,2)+pow((float)a->z,2)-pow((float)F_Length,2)-pow((float)T_Length,2))/(-2*F_Length*T_Length));
a->femur = asin(T_Length*sin(a->tibia)/(sqrt(pow((float)d,2)+pow((float)a->z,2))))-atan((float)-1*a->z/d);
a->tibia = 1.37636665-a->tibia;//a->tibia = a->tibia;//-PI/2+a->femur;
Do some trig


a->femur += 0.196175008;
Offsets because legs aren't straight.


a->tibia = 512-a->tFlip*a->tibia*(float)1024/5.23598776;
a->coxa = 512-a->cFlip*(a->coxa - PI/4)*(float)1024/5.23598776;
a->femur = 512-a->fFlip*a->femur*(float)1024/5.23598776;
return true;
}
Convert to DXL ouputs.

Picture:
5763

I will reattempt to explain after I have cleaned up the code a bit.

KevinO
12-29-2014, 08:10 PM
Love your checkBounds error message. :)

KevinO
12-29-2014, 08:12 PM
It is a sin/cos gait engine. I use the same thing. Super smooth isn't it?

Deimos
12-29-2014, 08:47 PM
Love your checkBounds error message. :)

Oops I meant to take that out :). Definitely my brother's fault. Yeah, pretty smooth :).

Xevel
12-30-2014, 02:20 PM
Looks nice :)
Any plan to add body IK?

I would recommend you try replacing pow(x,2) by x*x. Faster in most programming languages, plus you might reap some more speedup from compiler optimization (you call pow((float)d,2) multiple times, and there is a huge chance it is actually called multiple times instead of once and using the result everywhere).
Also, atan2 could be better for you than atan, as it manages some shitty cases like if a->y = 0.

Have fun :)

darkback2
01-02-2015, 12:36 PM
Thanks for posting the code bits. :-)

Deimos
05-22-2015, 04:28 PM
Experimenting with aluminum brackets:

5952

This was my first attempt, I used some leftover 0.050" T6. Bends were done with a break I made out of angle iron. The main issue looks like it's going to be making precise bends. Accounting for bend radius was mainly guesswork and the piece was a little too short to effectively use a square to make sure that the bends were all 90°s.

I'm planning on switching all structural pieces to aluminum, I think it's actually a little bit lighter because the pieces can be more of a 'skeleton'. Rivets and tapped holes should also help with the excessive number of screws on my bot, it's getting a little ridiculous :robotsurprised:

Edit: It's been a while since I've updated this! Continuous rotation works spectacularly with the MX-28's (new-ish) multi-turn mode. 5.8Ghz Camera is working great. Gun is also working, (using Jwatte's setup). Mainly been working on the control software recently. Switching to pointed feet as well (Body IK will be added then) for simpler modeling and optimization. Plenty of updates to come in the next couple months (after this quarter is over though)!