#robotics Logs

Dec 24 2019

#robotics Calendar

12:07 AM rue_mohr: you know baout the $250 lidar moduls from china right?
12:12 AM rue_mohr: for robot vacuum cleaners?
12:12 AM chisight: i was aware that lidar was around that much.
12:12 AM chisight: that's where the cost prohibitive came from.
12:12 AM chisight: turns out you can actually buy a lidar vacuum cheaper than a lidar module.
12:13 AM rue_mohr: not my point
12:13 AM chisight: that is cheap though.
12:15 AM rue_mohr: that is my point
12:15 AM rue_mohr: if you want, I'll buy it for you, and ship it to you
12:15 AM rue_mohr: just 100% markup
12:16 AM rue_mohr: you get a deal cause I like you yes?
12:16 AM rue_mohr: NO RETAIL BOX
12:16 AM chisight: silly. i was going to say that was really nice of you.
12:18 AM rue_mohr: I'm in canada it would take 4 months to ship and cost that much anyhow
12:21 AM chisight: i'm a few hours from canada.
12:24 AM rue_mohr: that doesn't change anything
12:24 AM rue_mohr: most of the 4 months is to get to the border
12:24 AM rue_mohr: I'm just west of vancouver
12:24 AM rue_mohr: after it crosses the border it takes like 2 or 3 days to get where its going
12:27 AM chisight: my near border crossing is winsor.
12:27 AM chisight: not close.
12:49 AM chisight: turns out: http://wiki.ros.org/hls_lfcd_lds_driver $33 delivered.
01:04 AM Jak_o_Shadows: hey rue, your servo protocol. Should the engage cache command only apply to the listening servo?
01:06 AM rue_mohr: nope, all servos
01:06 AM rue_mohr: iirc
01:06 AM rue_mohr: the idea is its low overhead
01:06 AM Jak_o_Shadows: Why?
01:07 AM Jak_o_Shadows: ah
01:08 AM rue_mohr: 3 set flags (flags) (+toggle debug) { bitwise obey }
01:08 AM rue_mohr: 0 enguage cached position {always obey command}
01:08 AM rue_mohr: 1 turn servo on {obey if listening}
01:08 AM rue_mohr: 2 turn servo off {obey if listening}
01:08 AM rue_mohr: 3 set cmdpos to curpos {obey if listening}
01:08 AM rue_mohr: flags might be better described as binary signals
01:09 AM rue_mohr: which are better descibed as just signals
01:10 AM rue_mohr: you can choose to load some servos directly and some via cache
01:10 AM Jak_o_Shadows: Mechanically, I think the cache works better for me.
01:10 AM Jak_o_Shadows: Because it's a parallel manipulator
01:10 AM rue_mohr: its just meant to be buffering so you dont have a ripple effect sending positions
01:10 AM rue_mohr: synchronous
01:11 AM rue_mohr: part of the important bit is that the servos are slow compared to the comm protocol
01:11 AM rue_mohr: so, even at 100Hz there is lots of time to send new positions
01:12 AM rue_mohr: esp when you can effectivly RLE compress them
01:12 AM rue_mohr: oh, did you see the ripple addressing note?
01:12 AM rue_mohr: 2 One Time listen (servo number) {always obey command}
01:12 AM Jak_o_Shadows: well, I can't recall it anyway
01:12 AM rue_mohr: with..
01:13 AM rue_mohr: static unsigned int chainAddress = 1023;
01:14 AM rue_mohr: so, if you set address 1023, you will get servo 0 for the next write, then servo 1, etc
01:14 AM rue_mohr: till you issue an ignore all
01:15 AM Jak_o_Shadows: oooooh. Yeah, ok. That's handy.
01:15 AM rue_mohr: thats meant for things like scanning for servos
01:15 AM rue_mohr: you might see it in the console code
01:15 AM rue_mohr: but you can use it for any ripple addressing
01:15 AM Jak_o_Shadows: Or if you have unique values for all servos, you can just go through them.
01:16 AM rue_mohr: yup
01:17 AM rue_mohr: on the avr side its just a little state machine and a decoder
01:18 AM rue_mohr: unsigned int dobyte(char data) puts togethor the command:argument pairs and passes them to unsigned int servoCmd(unsigned int command, unsigned int argument) that does things with them
01:20 AM Jak_o_Shadows: Yup. I think I have the uC (a STM in this instance) side working
01:20 AM rue_mohr: did ya port the code?
01:20 AM Jak_o_Shadows: yeah.
01:20 AM rue_mohr: should have been pretty easy
01:21 AM Jak_o_Shadows: Using an i2c PWM chip for the servo driving
01:21 AM Jak_o_Shadows: yeah, it was
01:21 AM rue_mohr: :)
01:21 AM Jak_o_Shadows: Main thing was I let it do more servos
01:21 AM rue_mohr: yup
01:21 AM Jak_o_Shadows: Your example code had 4 servos - i just put in some for loops
01:21 AM rue_mohr: easy to expand, or shink
01:21 AM rue_mohr: incase you need a serial line to an isolated system with just 2 servos, but on the same bus
01:21 AM Jak_o_Shadows: With luck, the compiler would flatten it out anyway.
01:21 AM rue_mohr: you can OR the rx data lines
01:22 AM rue_mohr: as only one board needs to talk at once
01:22 AM Jak_o_Shadows: yeah, with unique servo IDs
01:22 AM rue_mohr: I have a board that ORs togethor 5 baords (yes, with different ranges programmed in)
01:23 AM rue_mohr: thats why the defines like that
01:23 AM rue_mohr: ;)
01:23 AM Jak_o_Shadows: I like it.
01:23 AM Jak_o_Shadows: I'll have to swap to using the STM PWM directly at some point though
01:23 AM rue_mohr: :)) I dont get the chance for many people to play with my code
01:24 AM rue_mohr: I have code that will drive a 4017 off a timer
01:24 AM Jak_o_Shadows: I think I bougth some 4017's at some point for that exact reason
01:24 AM rue_mohr: it cycles the interval values on the timer to pulse out to 8 seroos (could be 10)
01:25 AM rue_mohr: ooo where is the code for frankenhex
01:25 AM rue_mohr: https://github.com/ruenahcmohr/servo32
01:25 AM rue_mohr: its in there, if you dare to enter
01:27 AM rue_mohr: it uses a SSC like protocol
01:27 AM rue_mohr: for no particular reason
01:27 AM Jak_o_Shadows: TBH, it'd just swap it to the one we've been talking about
01:28 AM Jak_o_Shadows: I have the positions updating in a hidden layer at 10Hz anyway
01:28 AM rue_mohr: I think the timing is all interrupt driven
01:29 AM Jak_o_Shadows: Yeah - but like, the set point position can be updated at that 10Hz rate
01:30 AM rue_mohr: I'm only driving 8 servos off each 4017 in order to keep 50hz updates
01:30 AM rue_mohr: you CAN drive up to 11 per 4017 if you drop the update rate
01:35 AM rue_mohr: cause 2.5ms*11 != 20ms
01:35 AM rue_mohr: (iirc, I go from 0.5ms to 2.5ms to get full range from the servo)
01:35 AM Jak_o_Shadows: Yeah, probably.
01:35 AM Jak_o_Shadows: I think i would probably increase from 10Hz if i were doing it on-board
01:35 AM Jak_o_Shadows: but I didn't want to have to think about the i2c layer
01:37 AM rue_mohr: its completely generic
01:37 AM rue_mohr: you register each axis with a update function, and a master sync for the machine
01:38 AM rue_mohr: it does the interpolation to move all the axies to their targets at the same time
01:38 AM rue_mohr: (linear interpol only)
01:38 AM Jak_o_Shadows: assuming no delay between servos? Doesn't try to compensate for the comms, then other delay?
01:38 AM Jak_o_Shadows: (because those delay are so small)
01:38 AM rue_mohr: you set the update to cache the position
01:39 AM rue_mohr: so it caches up all the next positions and pushes an cache exec
01:39 AM rue_mohr: because their callbacks you can do just about whatever you want
01:39 AM Jak_o_Shadows: Does it take advantage of the ripple thing?
01:39 AM rue_mohr: its a layer above
01:40 AM rue_mohr: your callbacks can
01:40 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm7/pc_software/interlin2.c <-- go on, check it out!
01:41 AM rue_mohr: see main.c as its a multiaxis player
01:41 AM rue_mohr: (6 axis)
01:42 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm7/pc_software/test.motion
01:43 AM rue_mohr: so thats a position data file
01:43 AM rue_mohr: I have a waldo recorder that outputs them
01:43 AM rue_mohr: the first number is the time to get to the spec'd points
01:44 AM rue_mohr: in my realtime I use like 0.1 seconds
01:44 AM rue_mohr: test.motion3 is a 1 second example
02:06 AM Jak_o_Shadows: ok, back from dinner
03:29 AM SpeedEvil is now known as CloudEvil
03:32 AM CloudEvil is now known as SpeedEvil
03:32 AM SpeedEvil is now known as Guest85315
06:49 PM logb0t_ is now known as logb0t
09:07 PM rue_mohr: --