#robotics Logs
Jan 10 2018
#robotics Calendar
12:04 AM rue_: aha I know another test
12:32 AM rue_: ok these are the same
12:33 AM rue_: *but* the "optimized" internet version is a WAY harder hit since "floating point" became "common place"
12:33 AM rue_: AND I'm not using floating point anyhow
12:33 AM rue_: the 4 multiples, 4 adds, and a copy will take me WAY longer than 2 sin table lookups
12:57 AM mrdata: ok
01:54 AM rue_: wow, the sin lookup table for a 32 byte fft alg, need not have a resolution higher than 32 entries
01:54 AM rue_: or... less...
07:20 AM mrdata: really
09:07 AM rue_: I was laying in bed staring at the code, and saw ANOTHER optimization
09:07 AM veverak: calculate in log values so you can replace multiplication by sum ?
09:07 AM rue_: removed an add and a divide
09:07 AM veverak: s/*/+/g
09:08 AM rue_: :)
09:08 AM rue_: too many other sums that need to be done
09:08 AM veverak: saw that trick in octree map
09:08 AM veverak: you store a chance that the voxel is occupied normaly
09:08 AM rue_: huh
09:09 AM veverak: but, if you replace the P(x) (where 'x' is event that it is occupied) with P(x)/(1-x)
09:09 AM veverak: P(x)/( 1 - P(x))
09:09 AM veverak: nothing changes really
09:10 AM veverak: but how do you update this? multiplication with another fraction
09:10 AM veverak: that updates the chance that something is in that voxel
09:10 AM veverak: moving that into logarithm and storing the log() value, replaces the multiplication with simple sum
09:11 AM * rue_ nods,
09:11 AM rue_: interesting
09:11 AM veverak: yeah
09:11 AM rue_: what was using voxels?
09:12 AM veverak: octree
09:12 AM rue_: dont know it
09:12 AM veverak: OctreeMap to be precise
09:12 AM veverak: each node of that tree is voxel
09:12 AM rue_: ok
09:12 AM veverak: that is either leaf or has 8 children (that divides the space of their parent in 8 parts)
09:12 AM rue_: oof
09:12 AM rue_: that spreads out fast
09:13 AM veverak: yeah, but you can easily prune it
09:14 AM veverak: if the values of the children are same, you can drop them
09:14 AM veverak: (value = probability that the voxel is fully occupied)
09:15 AM veverak: rue_: and you have to keep in mind that this has really ... "neet" implementation
09:15 AM veverak: each node of the three can be implemented as structure holding one float and one pointer
09:15 AM veverak: that is only hting necessary
09:15 AM veverak: :)
09:16 AM rue_: I'm astounded how much I'm repairing this fft code
09:16 AM veverak: anyway, now I do have good structure/code to store 3D model of the robot environment
09:16 AM veverak: it would be nice to figure out how to fill it with data
09:17 AM rue_: when you fix the loops, and make it fft specific (no ifft) everything just kinda falls in place
09:17 AM veverak: :)
09:17 AM rue_: ah, your not storing a 3d array of voxels, you just make a tree of the ones that exist?
09:18 AM veverak: more or less
09:18 AM veverak: I have voxel tree that have fast insert and expansion
09:19 AM rue_: cause the arrays of 64 bit pointers to point to the array of pointers to point to the voxels would take up all your memory
09:20 AM veverak: yep, I do not use 3D array
09:20 AM veverak: it's waste of memory :)
09:20 AM veverak: the tree is much better
09:20 AM rue_: yea, hmmm
09:20 AM anonnumberanon: a pointer to a pointer to voxel... hum...
09:20 AM rue_: that could come in handy later
09:20 AM anonnumberanon: ppv?
09:20 AM anonnumberanon: this should be a new cryptocurrency
09:20 AM veverak: now I have to figure out sensors that I can use
09:21 AM rue_: I love looking at code and having to say "I cant optimize this"
09:21 AM rue_: fft on avr;
09:21 AM veverak: I was thinking
09:21 AM veverak: let's say I have pose estimate of my robot
09:22 AM rue_: I use a state machine to load the values from the adc in the right order into the array
09:22 AM veverak: I should that be able to say, that each voxel that collides with the robot madel
09:22 AM veverak: is definetly empty
09:22 AM veverak: no ?
09:22 AM veverak: :)
09:22 AM anonnumberanon: fft intrinsically needs optimized on avr so if you're reading code there's a low chance it will be slow
09:22 AM rue_: I have a 2 level nested loop to do the calcs
09:22 AM rue_: anonnumberanon, all the code I can find is horrid
09:22 AM anonnumberanon: post example
09:23 AM rue_: so I been rewriting
09:23 AM rue_: http://www.drdobbs.com/cpp/a-simple-and-efficient-fft-implementatio/199500857
09:23 AM rue_: that itteritave code came from 1967
09:23 AM veverak: ok
09:23 AM rue_: and its a horrid rewrite
09:23 AM veverak: do I want to mix voxels and sphere boundary tree
09:23 AM veverak: or store the 3d model of the robot in octree too
09:24 AM rue_: a) the data arrays dont need to be mixed anymore, we have multiple pointers on our new processors
09:24 AM rue_: b) that need not be a 3 level loop
09:24 AM rue_: c) thats been mauled for machines with no floating point (in a bad way)
09:25 AM rue_: d) its not been properly optimized for fft (opposed to ifft)
09:25 AM rue_: :) there is almost nothing left of it when you take the origional fortran and rewrite it properly
09:26 AM veverak: :D
09:26 AM veverak: reminds me of the C code passed around for collision detection
09:26 AM veverak: I suppose most copy paste it and nobody understands it
09:27 AM rue_: yup
09:27 AM anonnumberanon: if you're machine is fast and the result is fast then yes you could do that
09:27 AM veverak: thankfully
09:27 AM veverak: I finally got collission detection method which I understand
09:27 AM veverak: <3
09:27 AM rue_: since 1976, from what I can tell, the author of the fortran says its a mix of 3 peoples code
09:31 AM veverak: alol
09:31 AM veverak: hmm
09:31 AM veverak: I like the idea really
09:31 AM veverak: create a 3D model of robot, init the octree for environment
09:31 AM veverak: insert IMU and let the robot map the room into the octre by bumping into environment around him
09:36 AM veverak: I feel that there should exist an article when somebody tried that
09:58 AM micmac_ is now known as micmac
03:07 PM robotustra: hi
05:05 PM robotustra: what is the best usb->LPT25 converter?
05:06 PM Tom_L: there is no such thing
05:07 PM Tom_L: the wires may connect but the functionality lacks
05:07 PM robotustra: that's the question
05:08 PM robotustra: which converter provides full functionality
05:09 PM robotustra: looking at this: https://www.ebay.com/itm/USB-2-0-to-DB25-Female-Port-Print-Converter-Cable-Cord-LPT-ZE396A/192415504920
05:21 PM Tom_L: what for?
06:05 PM robotustra: pc->usb->LPT25->breakout board->cnc lathe
06:10 PM Tom_shop: i can't really see that working out
06:21 PM rue_: 2 pacajkges from china!
06:21 PM rue_: robotustra, just use grbl
06:22 PM rue_: !!! the PI camera arrived already!
06:23 PM rue_: and 1000 blue leds
06:50 PM robotustra: what is grbl?
06:59 PM Tom_shop: limited gcode interpreter
07:00 PM Tom_shop: will fit on an avr i think
07:11 PM robotustra: grbl = limited gcode interpreter?
07:12 PM Tom_shop: like linuxcnc or reprap
07:13 PM Tom_shop: in fact reprap uses grbl i think
07:14 PM robotustra: I will do my own spooler
07:14 PM robotustra: not gcode based
07:15 PM Tom_shop: ask rue but you might regret that decision
07:15 PM Tom_shop: his first cnc was off the wall but the rest were gcode based i think
07:16 PM robotustra: what is "off the wall"?
07:20 PM Tom_shop: some random scheme he used to cut parts
07:20 PM Tom_shop: non standard
08:05 PM rue_: I already told him not to
08:05 PM rue_: er, thats was anonnumberanon
08:05 PM rue_: ugh
08:12 PM Tom_shop: pics on the way
08:29 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Z_Motormount1.jpg
08:29 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Z_Motormount2.jpg
08:29 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Z_Motormount3.jpg
08:29 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Z_Motormount4.jpg
08:32 PM rue_: nice
08:35 PM rue_: do you have a reading on the belt you will need>?
08:35 PM rue_: I need to make a control box and I'm not in the groove
08:36 PM Tom_L: i got the center distance and i'm getting ready to check
09:00 PM robotustra: HDT3M?
09:21 PM ikeaeraser: hey guys, I'm having trouble getting accuracy of my robot with amcl implementation in ros
09:22 PM ikeaeraser: it's always off between 7-10 cm
09:47 PM ikeaeraser: would you know of a modern and good implementation of ICP and scanmatching to complement amcl accuracy?
10:30 PM Tom_L: ok, belt for Z on the way
11:46 PM rue_: ok, now I code the rest of the night