#robotics Logs
Oct 07 2014
#robotics Calendar
01:45 deshipu wolfmanjm: sure
01:45 deshipu wolfmanjm: I've built a bunch of quadrupeds
01:45 wolfmanjm can you recommend a good sample I'm playing with one from here http://engineer-this.com/IK.shtml but having some issues
01:46 wolfmanjm X and Z seem to do what I expect but Y doesn't
01:47 wolfmanjm I printed out most of the parts so I have one full leg and just playing with the IK code before I print the remaining parts
01:47 deshipu you can always look at my code: https://bitbucket.org/thesheep/ukubik/src/tip/leg.py
01:47 wolfmanjm ok thank you ;)
01:48 deshipu I think I also have an image explaining it somewhere, give me a moment
01:49 deshipu http://paste.sheep.art.pl/eb422b04-7a08-4e2b-aa7c-e449dcadb374
01:49 deshipu here
01:49 wolfmanjm ahh that woul dhelp too, I've think I've seen about 6 sites so far and they all make a littl esense but mostly are confusing as the axis are all different :) I know the basics of IK so the math I'm ok with
01:50 wolfmanjm heh very clever minimal servo system ;)
01:51 deshipu I like to have the _solve_triange function that calculates the angle given the lengths of the tree sides
01:51 deshipu that simiplifies the code
01:51 deshipu wolfmanjm: thank you, I think it's my favorite robot: http://sheep.art.pl/Micro-Kubik
01:52 wolfmanjm I need to compar ethis with what I have so far :) i don;t wnat to print any more parts until I get the basic firmware working
01:52 deshipu what are you using for the brains?
01:53 wolfmanjm I have seversl options :) but right now an arduino nano, I have several arm based baords too I could use once I understand the computational requirements
01:54 deshipu I have one with an arduino, the code is https://bitbucket.org/thesheep/katka/src/tip/katka/
01:54 deshipu you can look at it especially when you want to start programming the gait -- I'm really proud of how I did it
01:54 deshipu (I know, it's probably shitty code and I will look at it in a few years and shake my head, but for now I'm proud)
01:54 wolfmanjm I love the minimalistic approach to the build :)
01:55 deshipu but Katka has a little different leg configuration and hence different IK
01:55 deshipu it's a mammal-like quadruped
01:55 deshipu uses less energy to move
01:56 deshipu and you can put it inside a stuffed toy ;)
01:57 wolfmanjm I'm basing the design on this http://www.thingiverse.com/thing:432829 but I redesigned some of the parts in openscad, and only using four legs
01:57 wolfmanjm If the quad fails I may upgrade to hex but the servos are fairly expensive so I wanted to start with 12
01:58 deshipu by the way, here is a forum thread where we hash it all out:
01:58 deshipu http://www.letsmakerobots.com/inverse-kinematics
01:58 wolfmanjm deshipu: what do you use the accelerometer for?
01:59 wolfmanjm I was planningon putting a IMU I have in it but not really sure what it would need to do as there is little balancing needed
01:59 deshipu wolfmanjm: for now I just got it to freeze when you pick it up
01:59 deshipu wolfmanjm: but I have a lot of plans
01:59 deshipu wolfmanjm: many probably impossible
02:00 deshipu wolfmanjm: for instance, I want to watch the accelerometer when I putting the leg down, to detect when I hit the ground
02:00 deshipu wolfmanjm: this way I can avoid the edges of the table
02:00 deshipu I can also watch it when I put the leg forward, to see when I bump into something
02:01 deshipu and have an automatic flipping routine when the robot is flipped up-side-down
02:01 deshipu etc.
02:01 deshipu lots of possibilities, but it's hard to analyze the output
02:02 wolfmanjm sounds like fun, I did a two whel auto balancing a few years ago, I think the quad will be easier :)
02:02 deshipu balancing is not the problem, I want to use it as a makeshift touch sensor, basically :)
02:02 wolfmanjm ok seems most people use the same basic math that is at least a good sign ;)
02:03 deshipu well, there isn't much more you can do, unless you go into control theory and derivatives
02:06 deshipu right now I'm struggling with another 2DOF quadruped
02:08 wolfmanjm Yea I'm tryin gto understand how the leg is supposed to move when the Y is moved (in this framework Y is movimg the tip of th eleg away from or towards the body. I would think that the tibia and femur would move to keep the heigh tthe same, but mine seems to not do that
02:09 wolfmanjm X which is just side to side works (only one servo so it shouod) and Z (up and down) seems to mostly do what I expect
02:09 deshipu well, X also has to change the lenght of your leg
02:09 deshipu practically all directions will move all servos
02:10 wolfmanjm thanks for all the links, I have some serioud reading ahead of me :)
02:10 wolfmanjm hmm yes that is correct, in this case it does not, so ther eis something missing in the IK I am using
02:13 wolfmanjm I need to compare the basic IK code I found with this new stuff... thanks this'll keep me busy for a while :)
02:24 deshipu that's the whole fun of it :)
02:25 wolfmanjm And four 3d printers later I finally get to use my 3d printers for what I originally got one for ;)
02:25 wolfmanjm I didn't realize 3D printers were a whol euniverse unto themselves
02:26 wolfmanjm and got sidetracked from playing with robots in the meantime
02:26 deshipu robots also have their sub-universes
02:48 wolfmanjm ok I need to convert your nice python program to ruby so I can play with it :)
02:51 deshipu ew
02:52 deshipu I need to convert it to C one of these days
02:52 deshipu so that I can use higher level commands
02:53 deshipu right now the arduino serves as nothing more than a servo controller
02:56 wolfmanjm in python what does x = (a, b, c) mean?
02:56 wolfmanjm yea I should go direct to c :) but I lik eruby to do simulations ;)
02:57 deshipu it means "assign the tuple (a, b, c) to the variable x"
02:57 wolfmanjm I have a TI launchpad $10 board here it has an arm M4 with FPU so can do lots of noce math
02:57 deshipu tuples are like read-only lists
02:57 wolfmanjm ah tuples :) I don't got them :)
02:59 wolfmanjm I can just use arrays
02:59 deshipu or you can use individual variables
02:59 deshipu they are just a nice way of returning multiple values in python
03:46 wolfmanjm deshipu: Hmm so with your IK it also onluy changes hip when X changes so that is the same
03:47 wolfmanjm X change do not affect the other joints
03:47 deshipu wolfmanjm: that is strange
03:47 wolfmanjm hip = Math.atan2(y, x)
03:47 deshipu wolfmanjm: maybe try witn non-zero y
03:48 wolfmanjm well the other equations do not take x into consideration at a quick glance
03:50 Tom_itx rue_house, no i've got a bunch of those... i did get a USB thingy though as well as a PATA to SATA adapter
12:51 deshipu wolfmanjm: hey, any progress? :)
16:37 wolfmanjm deshipu: some I confirmed the IK does not take X into account for any of the servos except the coxa/shoulder on any of the ones I've looked at, I do not think this is a big problem but it is odd as an X change will make the foot scribe a circle rather tahn a straight line. Still looking at why my Y is odd
16:40 deshipu wolfmanjm: I'm quite sure that my formulas take x into account for all servos
16:41 deshipu wolfmanjm: not directly, but as the diagonal between x and y
16:41 wolfmanjm hmm yea I see that
16:42 wolfmanjm I get very odd results using your IK though not sure what the resting psosiotn shoul dbe that gives all servos at 90
16:42 wolfmanjm I thought it was X 0, Y coxa+tibia and z tibia
16:42 deshipu wolfmanjm: ah, my servos center at 0
16:42 deshipu wolfmanjm: they rotate from -90 to 90
16:42 wolfmanjm that should be a knee bend
16:43 wolfmanjm ahh that may explain it :)
16:43 deshipu wolfmanjm: and the 0 is with coxa horizontal and tibia vertical
16:43 wolfmanjm yea that makes sense
16:43 deshipu and with coxa at 45° from the body looking from the tip
16:43 deshipu the top
16:44 wolfmanjm I'm only playing with the _inverse_kinematics() call directly
16:45 wolfmanjm and if I ignore hip_offset then the 45° should not be included?
16:45 deshipu yeah
16:45 wolfmanjm I'll play with it some more :)
16:45 deshipu then they are at 90° from the body
16:45 wolfmanjm as I only have one leg offsets are not required yet
16:45 wolfmanjm so Z would be tibia length when at reset?
16:46 deshipu minus tibia legngth
16:46 deshipu z points upward for me
16:46 wolfmanjm Y would be coxa+femur?
16:46 wolfmanjm oh
16:46 wolfmanjm that also will cinfuse me :)
16:47 deshipu https://bitbucket.org/thesheep/ukubik/src/tip/leg.py#cl-42
16:47 deshipu this is the "home" position calculation
16:47 wolfmanjm I like how simple your IK method is... I just need to get comprehend able results from it :)
16:47 deshipu (x, y, z)
16:48 deshipu but that assumes the leg is at 45°
16:48 deshipu that's why the SQRT(2)
16:48 wolfmanjm self_y_dir is the offset from the body center?
16:49 deshipu no
16:49 deshipu xdir and ydir are the directions to which the legs point from the body
16:49 wolfmanjm ahh ok so +1 or -1
16:49 deshipu so (1, 1) is the front left leg, iirc
16:49 wolfmanjm yea got it
16:50 deshipu and (-1, -1) is the hind right
16:50 deshipu so y grows towards the front of the robot
16:50 deshipu and x grows towards the outside
16:50 wolfmanjm ok I got those reversed in mine again this woul dadd to my confusion ;)
16:51 wolfmanjm Y is the front to back axis, X is the side to side and Z is the up and down
16:51 deshipu I think it's the same for me
16:52 wolfmanjm yea I meant that is what your axis are?
16:52 deshipu I think so
16:52 wolfmanjm mine are XY reversed from yours and Z is negated
16:52 shipu checks the
16:52 wolfmanjm so I need to change my frame of reference then the results may make more sense :)
16:52 deshipu yup, y is front to back, x is left to right
16:52 deshipu or rather, x is middle to outside
16:53 deshipu and z is down to up
16:53 deshipu so most reachable z are negative
16:53 wolfmanjm so a positive Z moves the tip of the leg up or down?
16:54 deshipu (0, 0, 0) would be at the leg's base if it was reachable
16:54 deshipu (0, 0, 1) would be above the robota
16:54 deshipu (0, 0, -1 is below it
16:55 wolfmanjm is that -1mm below or do you normalize to +/- 1
16:55 deshipu (0, coxa+femur, -tibia) would be the home position
16:55 deshipu |~~*~~|
16:56 deshipu no, 1mm below
16:56 wolfmanjm ok
16:56 deshipu it's all in mm
16:56 deshipu so I actually set it to something like (30, 30, -30)
16:56 wolfmanjm do you have X and Y swapped there? I thought X would be coxa+femur in your coordinates
16:57 deshipu hmm, right
16:57 deshipu I actually have it at 45°, so the home is ((coxa+femur)/sqrt(2), (coxa+femur)/sqrt(2), -tibia)
16:58 wolfmanjm yea I see :) let me play some more :) then I can code it and see what the physical thing does :)
17:20 wolfmanjm ok I am starting to see understandable results now from the command line version (albeit rewritten in ruby :)
17:20 wolfmanjm now to code it for arduino and see what the physical leg does
17:44 wolfmanjm so far so good, runs on arduino ;)
17:45 wolfmanjm and prints credible angles
18:06 wolfmanjm deshipu: does this loom correct? seems to mostly work but I still get odd results when I set X to be smaller than the start position, the tibia tucks itself under the body
18:06 wolfmanjm https://gist.github.com/wolfmanjm/1382224dda256466defa
22:25 rue_house http://www.ebay.ca/itm/1pc-CCL-Anti-etching-PCB-Ink-Marker-Pen-For-DIY-PCB-/181100275388
22:25 rue_house love it when I find a howto in an ebay listing
22:28 Tom_L even more if it's one of yours?
22:56 theBear dalo pen, crazy fools, selling stuff they don't even know the name of
22:57 rue_bed-aok I think I most like how the pen isn't even used in the howto