#robotics Logs

May 04 2020

#robotics Calendar

12:02 AM mrdata: you could test multiple solvers' outputs and store the motion you like
12:08 AM mrdata: then drive all the solvers into a relatively small set of standard positions for which you already have a mapping
12:24 AM mrdata: so with 64 standard positions, you'd have 4032 mappings
12:26 AM mrdata: if that's not enough, go up to like 500 or so standard positions, then you'd have 250,000 ish mappings
12:28 AM mrdata: but i think 64 is a good place to start
12:46 AM rue_mohr: veverak, can you send me a drawing with the system to solve the ik for?
12:46 AM rue_mohr: I'd like to know if my silly crude means work
04:20 AM veverak: rue_mohr: fu, it's simple 'ZYY' robot leg
04:21 AM veverak: (Z axis joint, Y axis joint, Y axis joint)
04:22 AM veverak: aaand mrdata left now knowning that I allreay have those :(
04:22 AM veverak: so, input is a motion planner generated over 24^3 graf of leg configurations
04:23 AM veverak: *motion plan
04:23 AM veverak: want to implement IK that is able to provide better solution given one of the configuration from the graf
05:47 AM srk: veverak: monte carlo ;)
05:47 AM srk: veverak: monte-carlo-ik-amdo08.pdf :D
05:48 AM srk: actually it's called just amdo08-final.pdf
06:56 AM Jak_o_Shadows: oh, that one is about how to get to the next state - not just what the next state is
07:13 AM Jak_o_Shadows: neat
08:39 AM rue_mohr: :)
09:24 AM rue_mohr: veverak, do you have distances and things or is this a generic solution?
09:25 AM rue_mohr: with all the mapping, it sounds more like your trying to develop a work envelope than solving for ik
10:37 AM veverak: srk: hmm
10:37 AM veverak: rue_mohr: I have specific distances, but want generic solution
10:44 AM srk: veverak: I've had this shower idea of using monte carlo and then search for it and found the paper :D
10:44 AM srk: *searched
10:45 AM srk: after studying https://github.com/michaelforney/inverse_kinematics/blob/master/InverseKinematics.hs
10:45 AM veverak: wait
10:45 AM veverak: srk: MonteCarlo is not really algorithm, it's just class of algo.s with uncertain results
10:46 AM veverak: ah
10:46 AM veverak: TIL: Monte Carlo ALgorithm vs Monte Carlo Method
10:46 AM veverak: :)
10:51 AM srk: :)
03:24 PM rue_mohr: veverak, if you throw me the specific information, I'd like to see if I can come up with something that could be done realtime
04:16 PM veverak: k
04:18 PM veverak: rue_mohr: (0,0,0) [Z joint] (0.065,0,0) [Y joint] (0.095, 0, 0.03) [Y axis] (0.1, 0, 0)
04:18 PM veverak: yeah, body at the beginning tip of the leg at the end
04:18 PM veverak: (x,y,z) are 3d coordinate vectors
04:21 PM veverak: P.S: unit: meters
04:24 PM rue_mohr: z up?
04:25 PM veverak: yes
04:27 PM rue_mohr: 2 joints then
04:27 PM rue_mohr: last is an offset
04:27 PM rue_mohr: ?
04:31 PM rue_mohr: and that would be with all the rotations set to zero, right?
04:32 PM rue_mohr: its a nice easy leg to do for sure
04:32 PM rue_mohr: you must mean 2 joints tho, right?
04:34 PM veverak: no, three joints
04:34 PM veverak: sorry
04:34 PM veverak: [body] (0,0,0) [Z joint] (0.065,0,0) [Y joint] (0.095, 0, 0.03) [Y joint] (0.1, 0, 0) [tip]
04:34 PM rue_mohr: big tho!
04:35 PM rue_mohr: so, you want the 3 theta for a given tip xyz, no funny co-ordinate systems, right?
04:35 PM veverak: yes
04:36 PM rue_mohr: ok
04:37 PM rue_mohr: is it a 4 or 6 leg bot?
04:39 PM veverak: 4
04:40 PM rue_mohr: ooo
04:40 PM rue_mohr: static or dynamic gait?
04:44 PM rue_mohr: hmm, yea, I could have a few more utility fn's to clean this up
04:44 PM veverak: planned gait, so dynamic
04:45 PM veverak: rue_mohr: the planner does not have specified gait
04:45 PM rue_mohr: :) I mean, static or dynamic balance
04:46 PM veverak: for now static
04:48 PM rue_mohr: so, I'll express the angles as "under the elbow" and "from chest to under leg" and of course z rotation, which is whatever
04:49 PM rue_mohr: you get to work out the rotation sign
04:50 PM veverak: yeah
04:51 PM rue_mohr: oh wow, my 2d library is leagues beyond my 3d library
04:51 PM rue_mohr: that not even funny how much more advanced that is
04:51 PM Tom_L: 2d is easy though
04:52 PM rue_mohr: the 3d library has like 4 fn's
04:52 PM rue_mohr: the 2d is like 20
04:53 PM rue_mohr: tho, it looks like some corners need work
04:53 PM rue_mohr: arc_t * scaleArc (arc_t *a, point2d_t by){ // position and size
04:53 PM rue_mohr: scale(&(a->c), by);
04:53 PM rue_mohr: a->r *= by.x; // !!!???!!! oh damnit, what have I done!
04:53 PM rue_mohr: return a;
04:53 PM rue_mohr: }
04:56 PM rue_mohr: oh, actually I set that up perfectly
04:56 PM rue_mohr: huh
04:56 PM veverak: so
04:56 PM veverak: fixed my tests
04:57 PM veverak: now they correctly show that it does not work
04:57 PM veverak: ;)
04:57 PM rue_mohr: heh
04:57 PM rue_mohr: I got it, I'll code it up later for ya
04:57 PM rue_mohr: turns out the 3fn's in my iklib do it just fine
04:57 PM rue_mohr: thought I'd set them up different
04:58 PM veverak: btw: my geom lib is ... 1k2 lines
04:58 PM rue_mohr: apparently my ik lib is 29
04:58 PM rue_mohr: 655 for my 2d library
04:59 PM rue_mohr: I wanted to get into 3d intersections, but the different orders of results made me sit and think
04:59 PM rue_mohr: it started to happen in 2d
05:00 PM rue_mohr: as you can see with the arc thing
05:00 PM rue_mohr: realized that I couldn't express things as circles with start and end angles anymore
05:00 PM veverak: 3d intersections?
05:00 PM veverak: collision detection?
05:00 PM rue_mohr: for modeling and stuff
05:00 PM veverak: heard of separation axis theorem?
05:00 PM rue_mohr: no
05:01 PM veverak: !!!
05:01 PM rue_mohr: its ok, I'm not into it right now
05:01 PM rue_mohr: oh wait
05:01 PM Tom_L: everybody starts a free cad package but nobody finishes one
05:01 PM rue_mohr: I think I know what you mean
05:01 PM rue_mohr: I want to know the *result* of the intersection
05:01 PM rue_mohr: aka, if I chop this triangle off by that one, whats left
05:02 PM rue_mohr: Tom_L, gui issues!
05:02 PM rue_mohr: with mine
05:02 PM veverak: rue_mohr: oh, I see
05:02 PM Tom_L: what gui?
05:02 PM rue_mohr: I was trying to do mine in .....
05:02 PM rue_mohr: uh
05:02 PM rue_mohr: yea, by the way, my brain is off i need sleep
05:03 PM rue_mohr: veverak, you know I'd swear I did a demo that exactly matches you leg
05:04 PM veverak: :D
05:04 PM rue_mohr: its realtime with a mouse
05:04 PM rue_mohr: well, it does the 2d part then you just need the rotation, which is, whatever.
05:05 PM veverak: yeah
05:06 PM rue_mohr: veverak, your on linux?
05:06 PM veverak: yes
05:06 PM rue_mohr: if I can find this, maybe you can compile it
05:07 PM rue_mohr: ah , under SDL
05:07 PM rue_mohr: ./a.out: error while loading shared libraries: libSDL_gfx.so.13
05:07 PM rue_mohr: I wonder if I can compile it...
05:08 PM rue_mohr: heh, its broken, go figure
05:09 PM rue_mohr: I'v changed a fn from degrees to rads somwwhere
05:09 PM rue_mohr: I can tell that error from a mile away
05:09 PM veverak: :D
05:10 PM rue_mohr: C = dist3d(len0, 0, 0, px, py, 0);
05:10 PM rue_mohr: c = elbow(C, len2, len1);
05:10 PM rue_mohr: b = elbow(len2, C, len1);
05:10 PM rue_mohr: t = dir(px-len0,py);
05:10 PM rue_mohr: but...
05:13 PM rue_mohr: strange I need sleep
05:13 PM veverak: does not seem strange
05:14 PM veverak: you human ...
05:14 PM rue_mohr: }:| no need to rub it in
05:14 PM veverak: :D
05:14 PM veverak: so
05:14 PM veverak: I generate random target for the movement
05:14 PM veverak: and let the ik solver solve it
05:15 PM veverak: (target tip pos)
05:15 PM veverak: and I generate new random tip pos, and solver has to move there from previous pos with the leg
05:15 PM veverak: so, kind of random jumping around
05:16 PM veverak: 100 jumps, I have the algorithm around 128 steps to try
05:16 PM veverak: it passes all
05:16 PM veverak: hmmm, goooood :)
05:17 PM rue_mohr: I got it, but there is a reverse co-ordinate or something
05:17 PM rue_mohr: its doing the right thing in the wrong way
05:17 PM veverak: rue_mohr: how do you calc it?
05:17 PM rue_mohr: http://paste.debian.net/1145013/
05:17 PM rue_mohr: there is the code, most of it draws the result
05:18 PM rue_mohr: but I keep "correcting" things in my library, and I need to adjust this code a bit yet
05:18 PM rue_mohr: let me get it working right and I'll send you the whole package
05:18 PM veverak: awesome
05:25 PM rue_mohr: / oops, fixed xy error Aug 11/2015 <-- this is part of my issue
05:35 PM rue_mohr: oh thank god, now I can go to sleep
05:35 PM rue_mohr: gcc -lm -lSDL -lSDL_gfx ikLib.c 2d.c main.c; ./a.out
05:38 PM rue_mohr: veverak, still there?
05:38 PM rue_mohr: http://ruemohr.org/~ircjunk/programming/c/2dik.tgz
05:38 PM rue_mohr: hit escape to quit
05:39 PM rue_mohr: as you can see the distances are in the #defines
05:40 PM rue_mohr: veverak, ?
05:41 PM veverak: got it
05:41 PM veverak: but goint to zZzZzZz now
05:41 PM rue_mohr: cmon, I just did 32 code fudges to make that work
05:41 PM rue_mohr: no try 'er first!!!!
05:43 PM veverak: what packages od you have?
05:43 PM veverak: /usr/include/SDL/SDL_gfxPrimitives.h:38:10: fatal error: SDL.h: No such file or directory
05:43 PM veverak: 38 | #include <SDL.h>
05:44 PM veverak: this is weird
05:44 PM veverak: I have all arch packages for that +-
06:54 PM rue_mohr: libsdl2-dev: /usr/include/SDL2/SDL.h
08:24 PM mrdata_ is now known as mrdata