PDA

View Full Version : Numa V2 - Quad Mech



Gertlex
02-23-2017, 02:15 AM
I'm working on a new quad. No random inspirations, so it's simply Numa (http://www.gertlex.net/Numa.html) V2. I've been working on this very sparingly since November 2016. It's a long shot whether I'll finish this in the next 2 months, with work being busy, plus a fine girlfriend to keep me busy on the weekends too. (ahh, the anti-social days past of grad school when I built Numa, Twitch, and TwitchMX...)

The big thing I wanted to do differently is to try out MicroPython. There's a bunch of boards out there. The one that I found first that seemed to have what I wanted (lots of breakout pins, specifically; and lots of UARTs and smaller than the Axon) is the HydraBus (https://github.com/hydrabus/hydrabus). I got it for cheap, too; probably thanks to clearing inventory of the V1.1 board on Amazon.

The other new thing, which I actually started first, back in November, is my adaptation of the R-Team "auto-cannon" auto-BB-loader. I made a janky prototype, with a Pololu Micro metal gearmotor controlled by an Axon Mote PWM'ing a Pololu VN5019 breakout. Bunch of pictures of that attached.

Now for the horrifying part... Code? I'm manually converting Numa's C code to the Python3-like Micropython and its libraries. Fortunately the hard parts of the code that I've always depended on others to do is already done by the Hyland brothers (namely libaries like AX-12 control):
- https://github.com/dhylands/bioloid3
- https://github.com/JonHylands/roz (mainly serves as an example that uses bioloid3 library)

Last night, I finally got rid of all the tracebacks in my code (tedious because I debug by running the code, rather than at least compiling first; I really need to set up the linux version of MicroPython for quicker testing, I think), and had it running the main loop.

Tonight, I hooked up the XBee and Numa's old turret servos, and voila, they move with my Arbotix Commander! (Though somehow I ended up swapping the pan and tilt servos in code :rolleyes:)

https://www.youtube.com/watch?v=uwv00wGlXaQ&feature=youtu.be

The other changes:
- Bigger base, so score panels fit between leg servos
- Probably 3DoF per leg isntead of 4
- Two levels of body; much lighter turret design once I start working on that.
- Going to modify my servos like I'm an R-Team member ;) ... except I bought copper because I forgot that aluminum actually has higher thermal conductivity. Oh well $10 mistake.
- I'll stick to hand-cutting my carbon fiber base plates this time; water jetting took two months last time.

A bunch of pictures... from last year, before I'd decided on the Hydrabus. The prototype hopper uses old spare chassis plates that were made for the original Numa, as well as 3D printed parts of course. Hopefully on the next iteration, I fully resolve any jamming issues :|

Click to embiggen!
6874688068796878687768766875

I recently realized I probably shouldn't pipe the BBs out the center-back of the robot, as then the tube sligthly blocks the score panels.

giantflaw
02-23-2017, 09:31 AM
Nice turret. Smooth action. Your carbon fiber parts look great.

jwatte
02-23-2017, 10:56 AM
Looking good! Let's see which one of us finishes first :-)

Gertlex
02-23-2017, 11:06 AM
I should mention that none of the parts shown are final parts. They're all scraps/old parts. So I have a *lot* of work to do. :robotsurprised:

tician
02-23-2017, 01:31 PM
- Going to modify my servos like I'm an R-Team member ;) ... except I bought copper because I forgot that aluminum actually has higher thermal conductivity. Oh well $10 mistake.

Eh? Depends on the specific blend, but copper (not brass or bronze allows) almost always has both thermal and electrical conductivities higher than aluminum. The big reason copper is used in heat blocks is its high heat capacity, so it is slower to change temperature due to sudden fluctuations in heat input/output while still having thermal conductivity at least as good as aluminum.

jwatte
02-23-2017, 01:49 PM
I think the point is that the difference between copper and aluminum are not that big (aluminum is almost as good a conductor of heat and electricity as copper) but the weight and price differences are bigger than that.

Gertlex
03-26-2017, 06:12 PM
I'm pretty close to building things now. I will have to use the original Numa's legs, rpobably, as I don't foresee having time to make new legs. I am regretting disassembling those legs preemptively :| .
6932

jwatte
03-26-2017, 08:50 PM
The dual layer design seems quite popular! I've tried to avoid it because I want a lower center of gravity, but having narrow hips is very important.

Gertlex
03-28-2017, 02:03 AM
Cut out the top and middle plates Sunday! A few holes were forgotten or needed to be enlarged. Currently, my big mechanical iffy points are the ammo loader and the interface between spiral tubing and BB feed tubes. Doing lots of playing with objects to get a sense of what I want to contrive and print. My prototyping from the end of last year still had some issue with jamming, though did not use the best components, either.


The dual layer design seems quite popular! I've tried to avoid it because I want a lower center of gravity, but having narrow hips is very important.

Given the legs I'm using, I've got plenty of height for a second layer of components below where the coax servos are mounted.

Though your comment did make me consider moving the battery to the bottom front of the robot, but I probably won't do that.

jwatte
03-28-2017, 10:14 AM
Is yaw for the turret driven directly by a servo, or by some kind of linkage?

Gertlex
04-10-2017, 08:19 PM
Fourbar linkage almost identical to original Numa's. That said, I got lazy and didn't model the 3mm rods, and made a set of linkages that would require me drilling a hole in the AEG, whoops. Recutting that linkage tonight (easy design tweak), and then doing wiring.

Chassis before wiring: (as always, click to embiggen)
6950
6949
6948

Gertlex
04-15-2017, 03:40 PM
Well I killed my HydraBus last night. Turns out they are not easy to get extras of (not inclined to pay 120 euros for board + express shipping that would get here Thursday night). So I'll just have to wait until next year (and December?). Definite bummer. I'll be at robogames on Saturday though!

This was my mistake (backside of the 6 connector dynamixel interface board):
69556956

jwatte
04-15-2017, 07:07 PM
The TTL bus doesn't like 12V. I hope you didn't have any servos plugged in. That can get (ahem) very expensive!

Don't you have an OpenCM or something to use instead? It'd be a shame to bring no bot :-(

tician
04-15-2017, 07:18 PM
Which is why I made my own inline 6-port hub with buss cap, reinforced power traces, and separate vias for power input wires. Whenever I need a new batch of them, they will be using an inline 7-port layout (one upstream with comm only) and an adorable XT-30 instead of bare vias.

jwatte
04-16-2017, 12:00 AM
Yeah, the power traces are quite thin in some places on that Robotis hub!
There is a version of it (from Robotis) with an electrolytic cap and a 5.5 millimeter barrel connector, too.
Then again, barrel connectors are not particularly firm.
I make my own, like Tician, although I have a preference for screw connectors.
Actually, I hate screw terminals, but I have everything else even more!

Anyway, this is about Gertlex, and the manly guts he shows to post a warning image for everyone to learn from out of his failure!
Thanks, man, you're making the world a better place!

artans
04-16-2017, 12:03 AM
Well I killed my HydraBus last night. Turns out they are not easy to get extras of (not inclined to pay 120 euros for board + express shipping that would get here Thursday night). So I'll just have to wait until next year (and December?). Definite bummer. I'll be at robogames on Saturday though!

This was my mistake (backside of the 6 connector dynamixel interface board):
69556956


If you have a solder station you might be able to replace the microcontroller. We've been working on one of our club mechs and destroyed a OpenCM board in the same way. Someone in the club replaced the micro on the OpenCM board and reloaded the boot loader.

Gertlex
04-16-2017, 12:23 AM
I definitely plan to try the replacement of the microcontroller at some point with the hot air reflow at work, but that's not happening this week.

My code is micropython, and there really aren't too many boards that support micropython out there. While I did port from C to Python, I'm not too interested in killing myself getting it working on another board that will fit in my mech and has sufficient UARTs. :)

And yeah, may have fried 4-5 servos, but haven't tested those yet. (Well, I tested one, and the red led turns on and off as expected)

I should enhance the power rails on that board for future use, too, aye.

jwatte
04-16-2017, 12:59 AM
[qutoe]Someone in the club replaced the micro on the OpenCM board and reloaded the boot loader.
[/quote]

That's pretty hardcore :-)


I should enhance the power rails on that board for future use, too, aye.


When it comes to the hubs, OSHPark plus a few SPOX connectors from Digi-Key is a much better option.
Then you can get as many or few connectors as you want, and some other way of injecting power (screw terminals!) and pin headers for scoping the TTL bus and so forth.

Brooks
04-16-2017, 02:03 AM
Connectors are how Murphy emerges from his evil lair. Consider cutting the connector off the servo wire and soldering all three wires to the board...

tician
04-16-2017, 11:35 AM
Lack of strain relief will spell eventual failure no matter the connection type. Those particularly susceptible to a very early failure without strain relief are any connection using cheap wire and any soldered wire connection (solder wicks into insulated wire and makes even the best continuous flex wire fragile at the solder connection). So, yeah, properly crimped contact beats non-crimped board-mount screw terminal any time.

As for user errors, I recently discovered that I populated a 1k pull-down resistor on a neopixel comm line with a 0.1uF capacitor. Thought it was a software issue, so took a while to fix because I still have not bothered to set up one of my Teensy-3.6 as a logic analyzer. Really should make a thread about that project since I finally have a working 'eye'.

jwatte
04-16-2017, 05:31 PM
Well, that capacitor will work great as a pull-down for a short while :-)

I recommend the Saleae kit. Even their cheapest one is better than running blind. Rolling your own is fun and all, but the Saleae software is very nice. Not super feature-ful, but highly polished.

Gertlex
04-16-2017, 09:32 PM
Connectors are how Murphy emerges from his evil lair. Consider cutting the connector off the servo wire and soldering all three wires to the board...

The wires going to the board are all non-moving. The runtime of the robot is measured in tens of hours at most, and so I won't be worrying about these wires. The ones between the servos on the leg on the other hand will at least be fully replaced with new ones.

Gertlex
07-16-2017, 06:43 PM
Still working on this! Slowly. Satisfying things I've accomplished sporadically:

- Desoldered the ARM chip off my Hydrabus and procured replacement (from china, hopefully not fake); haven't soldered new on on yet.
- Got fancy hot air reflow tip for hitting the pins of the chip exactly.
- Generally finished porting all the logic... Now I need an actual robot.
- Got plotting script working so I can plot the positions that my IK is generating for servos (a few things need fixing)
- Used the mnfy python3 module to make a script to minify the modules that I upload to the HydraBus board. I think I was over the storage size available thanks in part to copious comments.

jwatte
07-16-2017, 08:54 PM
Celebrating progress is what it's all about -- nothing's ever "finished" anyway :-)


thanks in part to copious comments

Can you upload compiled pyc/pyo files? If so, python -O will strip the comments.

Gertlex
07-17-2017, 10:54 PM
That is a good point, heh. Not 100% sure I'll use the minification always, either, as you can live-debug with the python interpreter running on the board. I may need that for debugging frequently :|

Gertlex
08-20-2017, 01:32 AM
Switched to a pyboard instead of the hydrabus. It's only disadvantage is fewer mounting holes. And maybe that I like blue more than green :P

Correspondingly made a perf-board shield for the pyboard with 5V regulator, pololu power switch, dynamixel connectors, and a few headers for laser and for camera power. Nothing too fancy.

In addition to a earlier plotting script that I got working, I got a test script to do a bunch of time-step calculations for the walking. It looks like the IK currently uses about 18% of CPU cycles running at 50 Hz. So I won't be doing any speed-based optimization...

Ironed out a few bugs along the way there, too. I think these mostly related to not realizing that array objects in micropython don't implement __mul__(), and then realizing I'm just doing 2D vector products and working with lists is good enough.

Next, up, get the full code running and making sure the shoulder servos move as expected!

Gertlex
10-16-2017, 12:20 AM
More slow progress, mostly yesterday. Got the pyboard properly communicating with the motor drivers. It was a series of mistakes that I had to find along the way to getting that working. It seems the micropython docs are inconsistent, with some old and new ways of doing things (like PWM) and only minimal examples (so I didn't realize I also needed to enable the associated timer, for example).

I also managed to drain my LiPo battery at some point, at least I have spares sitting around.

It seems the dynamixel wizard no longer works properly on my Windows desktop, even after a reinstall. But it does see the 4 shoulder servos, so I don't think I fried any of them.
7093
The servos seem to move a bit, but not like I'd expect; Probably issue with my positions being generated.

Next step is getting the servos moving cleanly. Then probably cleaning up the values that I generate from my gaits. I may seek out a cheap set of phantomX leg plastic, rather than designing my own set of legs right away.

jwatte
10-16-2017, 09:55 PM
How does the PyBoard compare to, say, a Raspberry Pi Zero W?
The Pi has a much beefier CPU, and more RAM, and stuff. And is still cheap.
And you can run as much Python on it as you want :-)
The PyBoard has some peripherals that the Pi doesn't, but at $45, you could just add a Teensy LC or something to that Pi and still come out ahead :-)
(Except on size)

Gertlex
10-17-2017, 01:17 AM
How does the PyBoard compare to, say, a Raspberry Pi Zero W?
The Pi has a much beefier CPU, and more RAM, and stuff. And is still cheap.
And you can run as much Python on it as you want :-)
The PyBoard has some peripherals that the Pi doesn't, but at $45, you could just add a Teensy LC or something to that Pi and still come out ahead :-)
(Except on size)

While I've played with a RPiA, I've never used the zero. I certainly wouldn't want to be running raspbian, and I don't have any desire to experiment with more minimal OSes... so the pyboard is ultimately a win in the "up and running" category for me. And yeah, size is at a premium; I'm not building a MX64 quad here! :)

jwatte
10-17-2017, 07:52 PM
so the pyboard is ultimately a win in the "up and running" category for me

Got it! I'm wondering if there is an arbitrage opportunity to sell pre-made Pi/Teensy/Raspbian kits that kind-of work like Micro Python, but have higher performance. All in software!


I'm not building a MX64 quad here!

But maybe ... maybe you should be? :-D

kamondelious
11-29-2017, 08:45 PM
Looking good Gertlex!

Can't wait to see some more video. :D

Gertlex
09-09-2018, 08:57 PM
looks at calendar

So, in the last ten months, I've been very slowly progressing... Hasn't helped that (1) I'm always busy with work and (2) work is very similar, cognitively to the stuff I am doing on a mech. My next milestone is to design and make new legs. (After that I can do full robot testing/debugging/take-over-the-world!) The first step of that has been determining leg geometry, and creating tools to tell me if that geometry is better/worse, and whether it self-interferes.

(I've managed to forget a lot of the leg terminology... tibia, femur, coax, shoulder, elbow, pan... I may be miss-using terms below)

Numa V1 vs Numa V2; To get new numbers to plug into analysis, I needed new models. A profile of the AX12 servos is easy to work with in Solidworks sketch mode, so I did that; screenshots below. More compact leg design is my goal. I'll likely remove the 4th servo, too, eventually.
73277328

Numa V1 vs Numa V2; I've got jupyter notebooks that reuse the same python3 code the robot uses for IK, but pipes that workflow into a visualization approach shown below. The leg shown is moving through a gait cycle where it spends part of the time on the ground and part of the time in the air.

I've got the body closer to the ground now (but also, Numa V2 is also a double-decker chassis currently; maybe I'll move the pan servos to the bottom level though...). The below are likely confusing as they show additional lines that represent edges I'm concerned may intersect (namely, the servo bodies)... But now that I'm reviewing all this I'm slightly facepalming, as I can of course just replace the 4th servo with a long curved or open tibia, and could have skipped most of this intersection work.

73257326

Numa V1 vs Numa V2: I wanted to be able to view the nominal torque at different points in the leg's movement. Torque is arbitrary units here, and arbitrary numbers, even, as I'm just using approximate weight values for leg segments. Along the way I did better prove to myself that the weight that matters is the weight of the body, and not the weight of the legs, though! Numa V2 below here has higher torque due to the foot contact point currently being further from the shoulder joint.
73297330

I'm of course reinventing a lot, and not doing purely the essentials, but it's all worth it (except the sad part where this leaves my C/C++ skills to atrophy, probably). In particular, some skills-y takeaways from the past many months are (1) better code that's easier to test and answer questions with; (2) appreciation for what tf does for ROS; (3) using jupyter notebooks more, and better understanding how to fit them into my software development workflows.

Next I should explore what removing that 4th servo *really* does for me (and I expect it to make plenty of sense to do so, of course).

giantflaw
09-12-2018, 12:04 PM
Eric,

Myself and all the guys in Tucson are looking forward to the next V2 step in the Numa Mechwarfare line. It will be great to have a 2 time winning veteran back in the mix. If there is anything we can do to help, let us know.


The bbs go in here
7331

Gertlex
03-13-2019, 01:02 AM
I'm continuing to progress nicely, especially recently. But for the moment, I have a question for the peanut gallery:

Problem: For a given leg geometry, AX-12s can be mounted in two ways, resulting in reversing the positions you send them to. Previously I handled this with a bunch of direction variables (1 or -1), but also a lot of hard-coded position offsets. In particular, it looks like I'll need to regenerate several manual poses that I use as well.

Question: Does anyone know a good reference description of how to approach cleanly handling these parameters? i.e. I imagine the best bet is if a set of manually determined values are all defined in one spot and everything else is nicely derived from them. I probably want a documented outline of how the servos are oriented in the legs, and what the various offsets are.

This problem only just re-revealed itself to me, and I haven't gone researching/thinking/experimenting yet. Figured I'd end my day checking with you all for shortcuts :)

jwatte
03-13-2019, 12:56 PM
Peanuts incoming:

For Onyx (RIP) I defined a "standard leg" where the coordinate system is "forward/back," "out/in," and "up/down."

The IK solution then runs in terms of this standard leg, and a separate multiply-and-offset step translates from standard leg to specific leg.
This means that, yes, I have a table of offsets and multiplies for each servo. (Although IIRC, I made the math so that the servo-0 position was solution-0, leading to less need to offset by anything other than "center position for the negatives.")

So the full control loop was:
- read time
- read inputs
- for each leg:
- multiple inputs by desired gait generation based on time
- translate desired gait target foot position to standard leg coordinate system
- solve standard leg
- translate standard leg solution to servo angles
- write pose

Gertlex
04-21-2019, 09:56 PM
Lot's left to do. But looking really goood.

7488

jwatte
04-22-2019, 01:24 PM
Why do you have the AX-12's in a "Z" configuration? To shorten the horizontal distance between the hip and the ankle?

Gertlex
04-22-2019, 06:50 PM
Why do you have the AX-12's in a "Z" configuration? To shorten the horizontal distance between the hip and the ankle?

The positioning of servos 2 and 3 is pretty much just what I decided looked good, and enabled a good range of motion of the ankle.

What's your take on that choice? It sounds like you have opinions :P

At the end of the day, I won't be surprised if I regret not just doing 2DoF like cire. :)

giantflaw
04-22-2019, 06:58 PM
How much does Numa V2 currently weigh?

Gertlex
04-22-2019, 07:25 PM
Still gotta weigh it. I'm worried it weighs more than I intended, but I can't find my numbers for the original Numa's total weight.

GhengisDhon
04-22-2019, 10:25 PM
Looking real good. Expecting some real competitive matches at Maker Faire 2019.

giantflaw
04-23-2019, 12:10 PM
Numa V2 looks great. I'm excited in seeing it up close and in action.

Gertlex
05-15-2019, 11:38 AM
A while ago I was looking at my original Numa thread and wondering why I had so few updates leading up to Robogames. Well now I'm reminded. The list of things to do is never ending (well, I wrote it down and it's only a large sticky note...).

Since last time... I fixed a lot of things. I now have a walking, turning robot, with controls that are at least as good as what I had with Numa or TwitchMX. I bumped the speed up... a lot. 6 ft in 12-12.5 seconds was my quick test result.

The real time sinks have been (1) lots of minor code fixes and (2) making BB loading work. Given an extra month I would have done some more major refactoring, and probably just put the BB loading on the turret after all.

Here's a video from yesterday!
https://photos.app.goo.gl/RGy8YTCXfMRQLZ9DA

And testing this morning says my gun system is possibly very functional!
7522