#robotics | Logs for 2016-04-28

Back
[01:13:00] <jason__> Anyone know of any cheap solutions for indoor object localization? Something non-intrusive I can attach to objects/cats. -_-
[01:14:02] <jason__> (other than cameras)
[01:21:54] <Snert> rfid tags?
[02:04:05] <mrdata> melon helmets
[02:22:14] <cwliao> attach a bell to the cat?
[03:13:57] <jason__> cwliao, and use microphones? that could actually work :P
[03:52:32] <Jinxit> why not cameras?
[03:56:00] <jason__> cameras are the fallback if nothing simpler works
[03:59:28] <doomlord> chemical scent
[03:59:40] <doomlord> or is that too slow/inacurate :)
[04:04:17] <xx88xx> hi all, i have a bot with a wheel encoder attached to each motor and i'd like to sync these motors when it drive forward.(the motors are not rotate at the same speed with the same PWM value) should i use PID? does anyone know a tutorial/book/link..? help please
[04:05:04] <Jak_o_Shadows> Well, you definitley could use PID
[04:05:47] <xx88xx> but i don't know how to use it to synchronize the 2 motors
[04:06:17] <xx88xx> so i need some book or tuturial that explain it
[04:06:49] <xx88xx> all what i see on the web is a demo of what PID does
[04:08:26] <Jak_o_Shadows> Well, it's not so much synchronising them I think
[04:08:32] <Jak_o_Shadows> You'd approach each wheel as it's own system
[04:08:59] <xx88xx> i started to think on counting the clicks on both motors and use something like: if(leftClick < right ) suspendLeftMotor....
[04:09:38] <xx88xx> but i think its a bad idea
[04:09:54] <Jak_o_Shadows> well, depending on your system dynamics, that might work
[04:10:14] <Jak_o_Shadows> If you update fine enough, with enough resolution, and your motors have a sensible difference.
[04:10:33] <veverak> hmm
[04:10:46] <veverak> count actual "step count" for each encoder
[04:11:05] <veverak> control robot with setting "target step count" for both wheels
[04:11:08] <veverak> pid it?
[04:11:43] <xx88xx> i do count the clicks but dunno how to plug it to PID
[04:12:24] <Triffid_Hunter> xx88xx: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/
[04:12:32] <veverak> also
[04:12:43] <Triffid_Hunter> xx88xx: for tight motor control you want at least cascade PID, inner loop controlling velocity and outer loop controlling position
[04:12:50] <veverak> one can count step diff betwheen wheels (no matter the sign of correct PID implementaion is used afaik)
[04:12:56] <Triffid_Hunter> xx88xx: if you want it super tight, have a third inner loop controlling current
[04:12:56] <Jak_o_Shadows> Well, what are you PIDin'g on
[04:13:01] <Jak_o_Shadows> I agree with Triffid_Hunter
[04:13:01] <veverak> and just setup pid in a way that that step diff should be 0
[04:13:04] <veverak> :)
[04:13:24] <xx88xx> ok ill try, thanks a lot guys
[04:13:43] <veverak> P.s: warning: I was just brainstorming
[04:13:50] <xx88xx> :)
[04:15:14] <Jak_o_Shadows> What do you mean by cascade PID anyway? Your setpoint for the inner loop is velocity, and you update the out loop with position cointinously? Or is the velocity setup linked to the outer loop more?
[04:16:06] <Jak_o_Shadows> setpoint lnked to*
[04:17:08] <Triffid_Hunter> Jak_o_Shadows: the outer position loop takes desired position and actual position and outputs a velocity. the inner loop takes that and actual velocity (differentiated from the encoders) and spits out PWM
[04:17:19] <Triffid_Hunter> Jak_o_Shadows: or alternatively it spits out current, then the third loop controls motor current
[04:18:13] <Jak_o_Shadows> How does it output a velocity? Is some sort of time over the velocity acts implied or something?
[04:18:24] <Jak_o_Shadows> Yeah, the inner loop makes sense
[04:18:43] <Triffid_Hunter> Jak_o_Shadows: well PID takes a setpoint and a measurement and outputs a control signal.. the units are up to whoever's constructing the system, PID itself don't care
[04:19:17] <Triffid_Hunter> so if you tune the factors to spit out a velocity, you'll get a velocity. Probably useful to cap the desired velocity at this point before feeding to the next loop
[04:19:31] <Jak_o_Shadows> Yeah. But I've never seen a system where the output is in different units to the measurement
[04:20:05] <Triffid_Hunter> Jak_o_Shadows: I've never seen a system where they're the same unit..
[04:20:28] <Triffid_Hunter> Jak_o_Shadows: ie with heaters I'll put in °C and get out a PWM value.. PWM sure isn't in units of °C, rather it's a flat ratio used to control the heater
[04:20:59] <xx88xx> when you say "loop" you mean i need "for" loop or it's just a term of the PID feedback?
[04:21:16] <Triffid_Hunter> xx88xx: 'term of PID feedback'
[04:21:22] <xx88xx> ahh ok
[04:21:35] <Triffid_Hunter> xx88xx: because you have to keep running the PID at regular intervals
[04:22:22] <xx88xx> so what is inner loop and outer loop?
[04:22:29] <xx88xx> 2 usage of PID's?
[04:22:50] <Triffid_Hunter> xx88xx: yeah, one takes position and spits out velocity, the other takes velocity and spits out PWM for the motor
[04:23:04] <Triffid_Hunter> xx88xx: works way better than going directly from position -> PWM, trust me
[04:23:16] <xx88xx> now i understand better, thanks a lot!
[04:42:36] <Jak_o_Shadows> Hmm.
[04:42:39] <Jak_o_Shadows> That's a fair point.
[04:43:43] <Jak_o_Shadows> I suppose my confusion there is that it's not a linear transform between the units? velocity -> displacement is a integrator (or differentiator for vice versa)
[04:49:33] <Jak_o_Shadows> Like, I get how you get the sign of the velocity, and if your plant models the actuator limits and acceleration speed, etc, I sorta get how you might do it. But I'm missing it.
[04:49:37] <Jak_o_Shadows> Got a block diagram :P
[05:00:56] <Triffid_Hunter> Jak_o_Shadows: sure, PID has an integrator, that's the I term, but it's not like we're feeding displacement to the velocity thing, it's more like capped delta displacement over regular intervals
[05:03:22] <Jak_o_Shadows> Ok, yes, over regular time intervals
[05:03:28] <Jak_o_Shadows> That's the bit I was missing
[08:24:48] <rue_house> '1' isn't a good time interval either
[08:25:37] <rue_house> think of the calculation like an analog circuit
[08:26:38] <rue_house> where 0 is 0V and 255 (or whatever the max is for the data type your using) as your 5V (or whatever imaginary vcc your using is) and try to set it up so your values dont saturate
[08:28:06] <rue_house> and you would be using signed numbers of course, so maybe -128 to 127 and -1.28V to 1.27V
[08:29:49] <rue_house> so per interval make sure the motor cant move more than 120 units either way
[08:30:21] <rue_house> and your error isn't more than 120 at any time
[13:32:20] <Yakiza> good evening! i have an arduino and i want to sent a signal from sensors to my pc and from there to program it with c#
[13:32:23] <Yakiza> is it possible
[13:32:53] <Jinxit> yes
[13:34:28] <Yakiza> jinxit would you be so nice and stent me a link or something i am really a beginner i just started with robotics
[13:39:08] <Jinxit> I don't have any handy, just search for arduino C# and you should find something related to COM ports
[13:44:18] <Yakiza> thank you
[15:23:01] <robopal> hi
[18:18:23] <ace4016> hi
[19:41:30] <anniepoo> endooblets