#robotics Logs
Jan 16 2021
#robotics Calendar
12:00 AM rue_mohr: Jak_o_Shadows,
12:07 AM Jak_o_Shadows: hi
12:07 AM rue_mohr: Traceback (most recent call last):
12:07 AM rue_mohr: File "/usr/lib/python3/dist-packages/pandas/core/indexes/base.py", line 3078, in get_loc
12:07 AM rue_mohr: return self._engine.get_loc(key)
12:07 AM rue_mohr: File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
12:07 AM rue_mohr: File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
12:07 AM rue_mohr: File "pandas/_libs/hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
12:07 AM rue_mohr: File "pandas/_libs/hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
12:07 AM rue_mohr: KeyError: 'x_column'
12:07 AM rue_mohr: :/
12:07 AM Jak_o_Shadows: yes - change "x_column" to the label you did for the column of the data
12:07 AM rue_mohr: I'll ditch the first row, which is labels
12:07 AM rue_mohr: oh
12:07 AM rue_mohr: zippo:/files/programming/c/RC_filter/plot# head foo.csv
12:07 AM rue_mohr: freq, Av
12:07 AM rue_mohr: 8.00000000, -0.00690896
12:07 AM rue_mohr: 8.10000000, -0.00708274
12:07 AM rue_mohr: missed that :)
12:07 AM Jak_o_Shadows: aha
12:07 AM rue_mohr: odd
12:07 AM rue_mohr: crashed faster, but says
12:07 AM rue_mohr: KeyError: 'Av'
12:07 AM rue_mohr: what am I missing here
12:09 AM Jak_o_Shadows: yeah?
12:09 AM rue_mohr: nope
12:09 AM rue_mohr: hmmm
12:12 AM rue_mohr: print(df.columns.value)
12:12 AM rue_mohr: AttributeError: 'Index' object has no attribute 'value'
12:13 AM Jak_o_Shadows: Try just df.columns
12:14 AM rue_mohr: oh kitty, I want to type...
12:14 AM Jak_o_Shadows: I mean, we're still just having the same issue of your CSV's being a bit odd
12:14 AM flav0r: HEY HEY !
12:14 AM rue_mohr: Index(['freq', 'Av '], dtype='object') <--- hey hey!
12:14 AM flav0r: dude i got the dimming working nice on the display im making !
12:14 AM flav0r: GOOD TIMES !
12:15 AM rue_mohr: yes!
12:15 AM Jak_o_Shadows: There's a space there!
12:15 AM rue_mohr: ok, how do we well it to not use big dots at the data points!?
12:15 AM flav0r: the BIGGER the BETTER
12:15 AM flav0r: ok i got this print job started
12:15 AM flav0r: hmm now what
12:18 AM rue_mohr: Jak_o_Shadows, know how to remove the dots at the data points?
12:18 AM rue_mohr: lines only?
12:18 AM Jak_o_Shadows: get rid of the 'o' in 'o-'
12:18 AM rue_mohr: aha!, I was just going to say!
12:19 AM rue_mohr: awesome!
12:19 AM rue_mohr: minor grid lines?
12:20 AM rue_mohr: ax.minorgrid?
12:21 AM rue_mohr: grid(b=None, which='major', axis='both', **kwargs)[source]ΒΆ
12:21 AM rue_mohr: ok
12:21 AM Jak_o_Shadows: yeah, dunno, I don't use grid lines much
12:23 AM rue_mohr: ax.grid(which='both',axis='both')
12:23 AM rue_mohr: your supposed to say "software is free, support costs extra" :)
12:24 AM Jak_o_Shadows: lol
12:25 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/foo.png
12:25 AM rue_mohr: :)
12:26 AM Jak_o_Shadows: nice!
12:27 AM Jak_o_Shadows: change "plt.subplots()" to "plt.subplots(figsize=(10, 5))" to make it wider
12:34 AM rue_mohr: sure, thats nice!
12:34 AM rue_mohr: that is so much easier than opening it in gnumeric, selecting the columns, hitting plot, change the line type, setting X to log, adding minor and major gridlines to x and y, then setting the graph size
12:34 AM rue_mohr: which I have done about a MILLION times now
12:34 AM Jak_o_Shadows: yes, excel graphing is always bad
12:34 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/foo.png <-- update with your adjustment
12:38 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/foo.png <-- update with that and line weight adjustments
12:40 AM rue_mohr: its nice that the -3db came out right at 200Hz where I designed it to
12:41 AM Jak_o_Shadows: That's always nice
02:01 AM rue_mohr: mrdata-, see how the -3db of that exactly hits 200Hz?
02:01 AM rue_mohr: thats your formula at work :)
02:02 AM mrdata-: :)
02:03 AM rue_mohr: I have this PD servo
02:04 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1180461.jpg
02:04 AM rue_mohr: the avr samples at ~4khz
02:04 AM rue_mohr: so, to make that filter digital, k=40.5055
02:07 AM rue_mohr: should I try to pull it off with floating point on an avr?
02:07 AM rue_mohr: crafting a multiply of 40.5055 with integer math would be a new trick for me
02:07 AM Jak_o_Shadows: I'm kinda regretting not using the L0 for my custom stm stuff
02:08 AM Jak_o_Shadows: I'm using the F0, which has no floating point
02:08 AM rue_mohr: I have a library to divide by integers, and a libary to multiply by n<1
02:08 AM rue_mohr: I could not get even emultated floating point on the F103
02:09 AM rue_mohr: which is still a problem
02:09 AM Jak_o_Shadows: Is that not a C Stdlib thing?
02:09 AM rue_mohr: apparently not
02:09 AM rue_mohr: there is a compiler flag thing
02:12 AM rue_mohr: huh, I cant get my brain to code right now
02:58 AM Jak_o_Shadows: I have not coded up any graphs for way too long to remember how to do this
03:15 AM rue_shop3: ?
03:44 AM Jak_o_Shadows: Trying to do a family tree/history thing
04:54 AM rue_shop3: ah
04:55 AM rue_shop3: XML?
05:15 AM srk: afaik you don't need to do anything to get floating point ops on F103 - compiler just adds stuff that's needed. maybe -mfloat-abi=soft
05:16 AM srk: it can grow binary size considerably and it's pretty slow compared to fixed point math
05:16 AM rue_mohr: it wasn't
05:16 AM srk: slow?
05:16 AM rue_mohr: dont know if I had that set or not, but it seemeed to just to a reboot if it hit floating math
05:18 AM srk: looking at one of the f103 Makefiles I have -mcpu=cortex-m3 -mfpu=auto -mfloat-abi=soft
05:19 AM srk: anyway, better use something modern with FPU :)
05:24 AM rue_mohr: no, I dont need a better fpu
05:24 AM rue_mohr: emulated would be fine
05:25 AM rue_mohr: even the abilities of the floating point on an apple IIe would be fine
05:41 AM srk: I'm using STM32F765 due to double precision FPU
05:42 AM rue_mohr: do you actually need it tho?
05:46 AM srk: single precision would do, but yes I need FPU (BLDC servo)
05:46 AM rue_mohr: hah
05:46 AM rue_mohr: hah, a single motor?
05:46 AM rue_mohr: or more than 4 of them?
05:46 AM srk: yeah, I've started with Odrive (STM32F405) which can do two motors but I'm only interested in single motor
05:46 AM rue_mohr: hah, you dont need it
05:46 AM rue_mohr: I run 4 loops on a m32
05:46 AM rue_mohr: whats your loop time?
05:47 AM rue_mohr: I'm going to be playing with some "advanced digital filtering" on a m8, I'm curious how much I can do in the adc sample time
05:48 AM rue_mohr: I think I could do the calcs 3 or 4 times
05:48 AM srk: 8kHz iirc
05:48 AM srk: (FOC)
05:48 AM rue_mohr: ok, and whats your pwm rate?
05:49 AM srk: IIRC doubled (16kHz)
05:49 AM rue_mohr: encoder feedback?
05:49 AM srk: yup
05:49 AM Jak_o_Shadows: the family treeis in gramps, which has a python API of some kind of complex object interface
05:50 AM Jak_o_Shadows: it's figuring out how to make a nice looking export
05:50 AM srk: currently optical one with 600CPR, sampled using timer peripheral. trying to finish driver for magnetic absolute one atm
05:51 AM rue_mohr: are you using the encoder for magnetic timing or sensorless?
05:51 AM Jak_o_Shadows: I'll use a L0 series chip if I ever get around to porting the kinematics to micro
05:51 AM srk: rue_mohr: yes, for FOC, can't do sensorless yet
05:52 AM rue_mohr: how smart are your drivers?
05:52 AM rue_mohr: power drivers/amps
05:53 AM srk: pretty smart/integrated - DRV8301 (Odrive) and DRV8323 for my version
05:53 AM rue_mohr: nice of the stm- to have that encoder interface eh?
05:53 AM srk: exactly :)
05:54 AM srk: well bunch of their series target motor control so no surprise there (same with advanced timers)
05:54 AM rue_mohr: does your P constant scale ID or just P?
05:55 AM srk: just P I think
05:56 AM rue_mohr: heh, someone elses library?
05:56 AM srk: whole implementation is not quite there, I'm in the middle of porting everything to new HAL to be able to support bunch of STM32 MCUs
05:57 AM rue_mohr: hmm
05:57 AM rue_mohr: I wonder how easily I could port my code between things...
05:57 AM rue_mohr: so, whats your test motor like?
05:57 AM rue_mohr: 1500KV? :)
05:58 AM srk: 350KV, want to try 2300Kv quadcopter motor soonish :D
05:58 AM rue_mohr: heh
05:58 AM rue_mohr: hmm
05:58 AM rue_mohr: do you have a jig with the encoder and stuffs?
05:59 AM srk: new jig https://imgur.com/gallery/hxJo3DG
05:59 AM rue_mohr: is it a large one then? that low I'd expect something maybe 5cm dia, ~20cm long?
06:00 AM rue_mohr: damn imugr..
06:00 AM rue_mohr: got it
06:00 AM rue_mohr: ooo not a huge one
06:01 AM srk: these two are both quadcopter motors with over 2000kV, there's one more rig I can't find a picture of right now which has a bigger one
06:01 AM rue_mohr: hmm, rubber band wouldn't help with timing
06:01 AM srk: just an experiment if I can make this jig modular enough
06:01 AM rue_mohr: that looks a lot like a REALLY expenisve chineese kit for control loop education
06:02 AM srk: haha
06:02 AM rue_mohr: I happened upon them browsing
06:02 AM rue_mohr: they wanted like $300
06:02 AM rue_mohr: for just the control baord
06:02 AM srk: I wanted to use closed loop belts but I don't have enough of them
06:02 AM rue_mohr: so, hows your loop gain look?
06:03 AM rue_mohr: the servo I'm playing with is just over 1 ;(
06:03 AM rue_mohr: the damping can take care of it, but it would be nice to need the controller to be over 0db
06:05 AM srk: don't know tbh, been a while since I've tried tuning it for real - last time with original Odrive firmware https://www.youtube.com/watch?v=WS2JV9aDkMw
06:06 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1180399.jpg
06:07 AM rue_mohr: nice
06:08 AM rue_mohr: oh what was I printing...
06:09 AM srk: http://48.io/~rmarko/odrive/mess2.jpg :D
06:10 AM srk: I'm now motivated to start hacking on it again, thanks :)
06:10 AM rue_mohr: nice
06:11 AM rue_mohr: generic input board, coool
06:11 AM rue_mohr: did you put debounce on the input encoder?
06:11 AM rue_mohr: I haven't dont up software debounce for those yet
06:12 AM rue_mohr: ALTHO, I have that new low-pass filter code...
06:12 AM rue_mohr: Rue: "printer!, print small thing!"
06:12 AM rue_mohr: Printer: .....
06:12 AM rue_mohr: Rue: "where is small thing???"
06:12 AM rue_mohr: Printer: ----> .
06:13 AM srk: I think you can use it with timer peripheral w/o debounce, not sure tho. there was too much noise even for the buttons/595 bargraph to be usable
06:13 AM rue_mohr: Rue: 8-| omg it was so much larger in the modeling software!
06:13 AM srk: my goal is to have everything split to CANOpen nodes (hence 1 motor per MCU)
06:13 AM rue_mohr: yea, those are borderline usable due to the noise
06:13 AM rue_mohr: ah I was going to ask your control channel
06:14 AM srk: what do you use for yours?
06:15 AM rue_mohr: so far my servo library set has buttons, analog, encoders, and serial
06:16 AM rue_mohr: its all specific systems, I splice them if I need something new
06:16 AM rue_mohr: I have them sorted by the control type, feedback type, driver type, and loop control type
06:16 AM srk: nice
06:17 AM rue_mohr: ok, the magnet is 8mm....
06:17 AM rue_mohr: aha, and the pocket is 8.0mm
06:21 AM rue_mohr: so, are you just building it for project stock or is there a specific target?
06:27 AM srk: closed loop system for machine control - https://distrap.org/
06:28 AM rue_mohr: well, I have some work to do yet, but I'm kinda excited about the idea of being able to advance past PID on my control loops
06:28 AM srk: same, later o/
06:31 AM rue_mohr: at the same time I'm working to apply my new filter types, I really want to advance them
06:31 AM rue_mohr: I want to break out of the n*20db/decade box
06:31 AM rue_mohr: but to do it, I need to understand more about where 20db/decade comes from