#robotics Logs
Oct 10 2018
#robotics Calendar
01:33 AM rue_bed: --
02:03 AM Jak_o_Shadows: theBear, it could be that bikes are sorta a personal item. That and the rest of the bike is more traditionally repaired.
02:03 AM Jak_o_Shadows: sensille, what plotting library is that?
02:04 AM sensille: Jak_o_Shadows: gnuplot
02:04 AM Jak_o_Shadows: hmmm.
02:04 AM sensille: poorly used
02:05 AM Jak_o_Shadows: I'm more of a matplotlib kinda guy
02:07 AM Jak_o_Shadows: also, theoretically, i might have the background to understand you
02:08 AM sensille: oh :)
02:08 AM sensille: so i have to peak your interest
02:09 AM sensille: have you read some of what i'm trying to achieve?
02:10 AM Jak_o_Shadows: Smoother/more accurate motion paths
02:10 AM Jak_o_Shadows: mostly more accurate?
02:10 AM Jak_o_Shadows: and you're having trouble with the acceleration in some cases - which you can definitely tell from looking at the velocity
02:11 AM Jak_o_Shadows: also, you should tots do a bunch of error plots
02:11 AM sensille: mainly two goals: strictly control jerk to reduce vibrations/ripple. b) move at constant speed
02:11 AM sensille: b is because the printer extruder is bad at changing extrusion rate
02:12 AM sensille: there are some error graph at the right, have you seen them?
02:13 AM Jak_o_Shadows: ah. yeah, but you should have it in each component, like in the other graphs
02:13 AM sensille: although you can easily see the error if you compare the ax target/actual
02:14 AM Jak_o_Shadows: You said 5th degree polys. Is there much in the way of state? Or is the shape of the curve
02:14 AM Jak_o_Shadows: like, if you did just the one bend?
02:14 AM sensille: sorry?
02:15 AM sensille: i didn't get that
02:15 AM Jak_o_Shadows: You have a bend at like, 0.8 seconds, and 1 second.
02:15 AM Jak_o_Shadows: What if you only had the one? same thing happen?
02:16 AM sensille: yes
02:16 AM sensille: i have the curve modeled with a clothoid. and i split each clothoid into 8 segement
02:17 AM sensille: and only interpolate between each pair
02:17 AM sensille: no further state
02:17 AM sensille: *each pair of endpoints
02:22 AM Jak_o_Shadows: interesting
02:22 AM Jak_o_Shadows: So like, you give it a position path
02:22 AM Jak_o_Shadows: and it works out velocity and acc from there?
02:23 AM sensille: no, i give it position, velocity and acceleration for start and end. that already full defines the 5th order polynome
02:23 AM Jak_o_Shadows: but the 5th order poly goes funny in the middle
02:23 AM Jak_o_Shadows: can you plot the breakpoints on those graphs?
02:27 AM sensille: you can see the interpolation point where the acceleration is minimal
02:27 AM sensille: also where the error goes to zero
02:27 AM Jak_o_Shadows: ayup
02:27 AM sensille: also you can see the triangle below the acceleration 'wave'
02:27 AM Jak_o_Shadows: yeah, you shouldn't have that many osicllations for just a 5th order poly i would've thought
02:28 AM sensille: that's actually the expected acceleration
02:28 AM Jak_o_Shadows: nah, on the actual graph
02:28 AM sensille: if you look at this: http://djfk.net/3dpfs/6/
02:29 AM sensille: i've done that first and was very hopeful
02:29 AM sensille: that's nearly perfect
02:29 AM Jak_o_Shadows: yeah, that looks great
02:29 AM sensille: only 10 segments for a full circle
02:30 AM sensille: even 3 look still decent
02:30 AM sensille: but there's something about the spiral that makes the interpolation go crazy
02:31 AM Jak_o_Shadows: Hmm. the circle has smaller segments?
02:31 AM sensille: the circle always looks great, no matter how many segments i choose
02:31 AM sensille: and the clothoid always looks bad
02:33 AM Jak_o_Shadows: but ultimately the clothoid has segments does it?
02:34 AM sensille: http://djfk.net/3dpfs/10/ with less segments
02:34 AM Jak_o_Shadows: huh
02:35 AM sensille: the amplitude of the acceleration basically stays the same
02:35 AM sensille: relatively independent of the number of segmenst
02:35 AM sensille: that one take the whole clothoid as one segment
02:35 AM sensille: for each bend i use two symmetrical ones
02:37 AM Jak_o_Shadows: 5 -> 4 -> 3. how do you fix the acc at the boundaries?
02:39 AM sensille: "5" what? the acc at the boundary is known from the model.
02:40 AM sensille: or which boundary?
02:43 AM Jak_o_Shadows: hmm, nevermind
02:43 AM sensille: http://djfk.net/3dpfs/3/ shows a clothoid with many segments
02:44 AM sensille: so i'm completely contraining the polynom with my endpoint conditions, leaving no degrees of freedom
02:45 AM sensille: i've found several paper to approximate clothoids with polynoms, but they all aim for G2/G3, not C2
02:46 AM sensille: which gives them some degrees of freedom back
02:46 AM sensille: which they use to minimize the deviation in curvature
02:46 AM Jak_o_Shadows: i was wondering about that
02:49 AM sensille: so i see several possible solutions
02:49 AM sensille: a) use a higher degree polynom to get some DOF
02:50 AM sensille: b) use G2/G3 approximation and do arc-length re-parametrization in hardware while executing
02:50 AM sensille: and c) use something better suited for the approximation as a transition curve
02:50 AM sensille: instead of clothoids
02:51 AM sensille: each one as drawbacks
02:52 AM sensille: ah, and a2) don't restrics acceleration to the endpoints, only require continuity
02:52 AM sensille: which would mean carrying state between the segments
02:53 AM sensille: does any of these make sense to you?
02:53 AM Jak_o_Shadows: yeah.
02:53 AM Jak_o_Shadows: But i don't really know what would be best
02:54 AM sensille: the main drawback of a) is the required precision. it is already insane with 5th order
02:54 AM sensille: also i'd need to find algorithms to use the degrees of freedom for optimization
02:54 AM Jak_o_Shadows: Using a higher approximation w. more precision is probably the simplest?
02:55 AM sensille: b) seems to be quite doable in hardware
02:55 AM Jak_o_Shadows: like, you can do arbitary precision on a FGPA?
02:55 AM sensille: i already use 208 bits
02:55 AM sensille: it takes a lot of resources
02:55 AM sensille: and slows down the clock
02:55 AM sensille: but is easy to implement
02:55 AM sensille: would take me 20 minutes to change that
02:56 AM Jak_o_Shadows: is it quick to implement? Like it's worht tryinfg
02:56 AM Jak_o_Shadows: at the very least, you might have a reference implementation
02:56 AM sensille: it's the math side that worries me
02:56 AM sensille: i could just again restrict at the ends to the 3rd derivate
02:57 AM sensille: but i doubt that would fix the problem
02:57 AM sensille: so i'd need an optimization algorithm
02:57 AM Jak_o_Shadows: I like the idea of the optimisation algorithm.
02:57 AM sensille: i think i can rule out c), though. i suspect every spiral will exhibit this behaviour
02:57 AM Jak_o_Shadows: but it's a bunch of complexity and speed
02:58 AM sensille: that part is done offline
02:58 AM Jak_o_Shadows: ah
03:03 AM sensille: the big advantage of b) is that i can take any polynomial C2 shape and execute it. without re-approximation. like bezier curves
03:04 AM Jak_o_Shadows: yes.
03:05 AM sensille: and might even go back to 3rd order polynomials
03:06 AM sensille: can you think of any other approach?
03:07 AM Jak_o_Shadows: nup.
03:08 AM Jak_o_Shadows: my exposure to this type of thing (apart from the bezier re-calcluatoin thihgn) was patching together fixed bits
03:08 AM sensille: what kind of re-calculation did you do?
03:10 AM Jak_o_Shadows: erm, well, it's more that I know you can do it with beziers
03:10 AM Jak_o_Shadows: not that I did it
03:11 AM sensille: also for completeness i could add d) describe the curve in term of sharpness(t) and a speed profile
03:11 AM sensille: that would be very natural
03:12 AM sensille: but i can't really think of a good way to execute that in fpga
03:17 AM sensille: for a) i'd probably need to find someone who want to write his thesis about the optimization
03:17 AM Jak_o_Shadows: i mean, a speed profile is just another profile to be stored.
03:20 AM sensille: problem is that the direction is given as an angle
03:23 AM Jak_o_Shadows: and you have the normal complexities of it being like, circular?
03:24 AM sensille: circles would be easy to described, fixed curvature, no sharpness
03:25 AM Jak_o_Shadows: nah, nah, i mean the wohole 0 = 360 degrees thing
03:25 AM Jak_o_Shadows: that always annoys me
03:27 AM sensille: the complexity lies in having to use sin/cos
03:27 AM sensille: which is not nice on a cpu, let alone on fpga
03:27 AM sensille: and going in incremental steps would accumulate the error
03:31 AM Jak_o_Shadows: yeah.
06:49 AM LuminaxWk is now known as Luminax
06:59 AM Luminax is now known as LuminaxWk
06:59 AM LuminaxWk is now known as Luminax
09:06 AM rue_mohr: so, you didn't write that trapazoidal velocity profile code yet?
10:36 AM VansFannel: Hi
10:36 AM VansFannel: The only way to control a robot in Gazebo with keyboard is using ROS, isn't it?
01:13 PM VansFannel: Hi!
01:13 PM VansFannel: The only way to control a robot in Gazebo with keyboard is using ROS, isn't it?
07:20 PM rue_mohr: dunno
07:20 PM rue_mohr: I dont simulate robots, I build them
07:24 PM Tom_itx is now known as Tom_L
10:15 PM rue_mohr: ok, lets play aymantics
10:15 PM rue_mohr: symantics
10:16 PM rue_mohr: you adjust the weight of neurons with active inputs if the result of the net is wrong
10:16 PM rue_mohr: by a random value is just fine
10:17 PM rue_mohr: now, I suppose we have to evaluate the network to know if its answer is wrong
10:17 PM rue_mohr: hmm
10:18 PM rue_mohr: so, we have to know the weights for the neurons, but we also need to know if their inputs were active when the net was evaluated
10:18 PM rue_mohr: hmm
10:21 PM zhanx: bowl
10:21 PM zhanx: heard me out
10:22 PM zhanx: I place 10 "bowls" on a table
10:22 PM zhanx: I train with weights
10:22 PM rue_mohr: the dead cat is under the 5th one, but if you look, it'll be alive.
10:22 PM zhanx: but the bowls have holes in them to pass weights to other bowls
10:23 PM zhanx: cascading
10:23 PM rue_mohr: hmm
10:23 PM rue_mohr: so you dont change the overall weight
10:23 PM zhanx: but the bowls need to shook all the time to pass the proper weight or keep it
10:23 PM zhanx: not on the bowl tree
10:25 PM zhanx: you have bb's and marbles etc the holes pass them down the tree
10:25 PM zhanx: bet i could do AI with a marble maze
10:31 PM rue_mohr: I'm having a challange building a model I like
10:31 PM zhanx: i like the shake it out method
10:32 PM zhanx: say each node has 10 weights
10:32 PM zhanx: during training you re-enforce the ones with the inputs
10:33 PM zhanx: higher the input greater the weight but masses of small inp
10:33 PM zhanx: input can equal it
10:33 PM zhanx: remember current AI is broken
10:38 PM rue_mohr: the structure and link strength is different than the values, which is giving me issue
10:38 PM zhanx: the structure is the hard part
10:39 PM zhanx: top should be able to move to bottom or anywhere
10:39 PM zhanx: it needs to be non linear
10:39 PM rue_mohr: I'm keeping with ... you know what?
10:39 PM rue_mohr: it doesn't matter what I do
10:39 PM zhanx: my issue is
10:39 PM rue_mohr: I just need to do it
10:39 PM rue_mohr: I'll change it up later when I know more
10:40 PM zhanx: how do i code a value that can rise and fall on the chain and the chain i can't do
10:41 PM rue_mohr: lost me on that
10:41 PM zhanx: ok
10:42 PM zhanx: so i train it blue is good, then Its trained that blue is bad, how do i code the change
10:42 PM zhanx: the learning is fine, but the weight change on the chain is getting me
10:43 PM rue_mohr: in an 8 sample fft, there are 8*1+4*2+2*4 butterfly calcs... = 24
10:44 PM zhanx: let me draw this
10:44 PM rue_mohr: 8+7+6+5+4+3+2+1
10:45 PM rue_mohr: nope
10:46 PM rue_mohr: bits*2^bits
10:47 PM zhanx: on email compter or post here?
10:47 PM rue_mohr: yup
10:47 PM rue_mohr: <-- computer with email
10:47 PM zhanx: ok emailed it
10:47 PM zhanx: that is a straight branch
10:48 PM zhanx: not a a full branched
10:51 PM zhanx: or is my box out there?
10:53 PM rue_mohr: sorry, playing with thingiverse feedback
10:55 PM rue_mohr: hmm
10:56 PM rue_mohr: 1*0.9 = 0.8?
10:56 PM rue_mohr: er
10:56 PM rue_mohr: 1*0.8=0.9?
10:56 PM zhanx: weights on training
10:57 PM rue_mohr: I'm not getting it, not yet
10:57 PM zhanx: ok how best to explain it
10:58 PM zhanx: Large weights are added in a queue, but smaller weights are able to equal it
10:59 PM rue_mohr: hmm
10:59 PM rue_mohr: can move down to train?
11:00 PM zhanx: move up and down
11:00 PM zhanx: needs to be non linear
11:01 PM rue_mohr: yes
11:01 PM zhanx: so it needs a counter on top of weights
11:01 PM zhanx: but the counter needs to be tied to the higher or lower levels
11:01 PM rue_mohr: result = 0; if (net >= 0) result = 1;
11:02 PM rue_mohr: thats my nonlinearity
11:02 PM zhanx: yea mine is a ring
11:02 PM rue_mohr: hmm
11:02 PM zhanx: and why should 1 be the upper limit and zero the bottom
11:03 PM rue_mohr: my model requires each layer have a node count thats a power of 2
11:03 PM rue_mohr: hmmm
11:03 PM zhanx: node count should make its self
11:04 PM zhanx: rue I think i should do the layout and it codes itself
11:05 PM zhanx: got to remember my single branch tree is 4d not 3d
11:06 PM rue_mohr: well, one of the other things to keep in mind, is that neural networks are SO stable, the node structure doesn't matter
11:07 PM rue_mohr: as long as its dense enough
11:07 PM zhanx: stable is wrong
11:08 PM rue_mohr: compared to code, their stable
11:08 PM zhanx: that is the box we need to break open
11:09 PM rue_mohr: in one training pass, my 4 node network (no hidden layers) learned NOR
11:10 PM rue_mohr: zippo:/files/programming/c/neural# ./a.out
11:10 PM rue_mohr: (0.500000) 0.000000 0.000000 (0.500000) 1.000000
11:10 PM rue_mohr: (0.500000) 0.000000 1.000000 (0.500000) 1.000000
11:10 PM rue_mohr: (0.500000) 1.000000 0.000000 (0.500000) 1.000000
11:10 PM rue_mohr: (0.500000) 1.000000 1.000000 (0.500000) 1.000000
11:10 PM rue_mohr: (0.500000) 0.000000 0.000000 (0.500000) 1.000000
11:10 PM rue_mohr: (0.500000) 0.000000 1.000000 (0.500000) 0.000000
11:10 PM rue_mohr: (0.500000) 1.000000 0.000000 (0.500000) 0.000000
11:10 PM rue_mohr: (0.500000) 1.000000 1.000000 (0.500000) 0.000000
11:10 PM rue_mohr: 0.084363, -0.190698, -0.475696, 0.131637
11:10 PM zhanx: but could it learn OR also?
11:10 PM rue_mohr: the bottom is the weights
11:10 PM zhanx: at the same time
11:10 PM rue_mohr: yes, it cant learn xor
11:10 PM rue_mohr: dual outputs?
11:11 PM rue_mohr: wait...
11:11 PM zhanx: quad?
11:11 PM * rue_mohr sniffs zhanx
11:11 PM rue_mohr: how much of that have you been drinking tonight?
11:11 PM zhanx: non that is the issue, i took a pain med
11:12 PM rue_mohr: is that Coors pain med?
11:12 PM zhanx: no i stay away from canadian syrup
11:13 PM rue_mohr: too strong for ya eh?
11:13 PM zhanx: each learning state will start like your NOR, but what is to stop it from doing more than one at a time?
11:14 PM rue_mohr: it bumps the values of all the weights for nodes that were active any time the output was wrong
11:14 PM rue_mohr: this is code in progress.
11:14 PM rue_mohr: http://paste.debian.net/1046830/
11:14 PM zhanx: saw that before
11:15 PM rue_mohr: no, its similar but different
11:15 PM rue_mohr: my brain is not operating right and I'v been having a hard time thinking, so progress is slow
11:15 PM zhanx: k, i didn't look close enough the first time
11:16 PM zhanx: dont worry rue, i stopped drinking during the work week
11:17 PM rue_mohr: 8 calcs in the butterfly
11:20 PM rue_mohr: did I tell you I'v worked out fft to be a type of neural network
11:20 PM rue_mohr: its a special pre-calculated case
11:21 PM zhanx: no you didn't
11:21 PM rue_mohr: not trained obviously
11:22 PM rue_mohr: the values are preset, and just happen to be trigometric
11:22 PM zhanx: how well does 20 weights work?
11:23 PM zhanx: also why 20
11:24 PM rue_mohr: I'm totally hand calculating this, 4 is more than enough trouble
11:24 PM zhanx: k
11:25 PM zhanx: ok opencv hates me, will pick it up in the morning
11:27 PM zhanx: apple is red, not all apples are red
11:34 PM rue_mohr: this is an interesting road
11:34 PM zhanx: ?
11:34 PM rue_mohr: now that I have 4 inputs neurons, and the output count is matched, and I have 16 weights, working out who to adjust when the answer is wrong is going to be... interesting
11:36 PM rue_mohr: for now, I'm only defining one of the outputs (randomly chosen by me) as *the* output
11:38 PM zhanx: hmm
11:39 PM zhanx: do i go to Vermont for Wendy's or pass
11:39 PM zhanx: its a 3.5 hour drive
11:39 PM zhanx: at 10 pm
11:41 PM rue_mohr: damn, I think I have to run an itteration just to know whats going on
11:48 PM rue_mohr: ok, its the same number of calcs, but the butterfly uses less memory
11:51 PM rue_mohr: but the butterfly obfiscates which weights need training
11:51 PM rue_mohr: if a network has 13million nodes, the memory savings are important
11:52 PM rue_mohr: *per layer*
11:52 PM zhanx: that i did not think of
11:56 PM rue_mohr: huh, I dont know how, using an fft butterly technique, to work out which nodes to apply trainign changes to
11:57 PM rue_mohr: er, which weights
11:57 PM rue_mohr: idea
11:57 PM rue_mohr: lets us a stockmarket ticker...
11:57 PM rue_mohr: lets use..
11:58 PM rue_mohr: oooo
11:58 PM rue_mohr: maybe