#robotics | Logs for 2016-06-06

Back
[00:04:30] <mrdata> talking? what does it say
[00:08:08] <rue_shop3> its says the first and last input are low
[00:08:38] <rue_shop3> aBCDEf
[00:08:47] <rue_shop3> inputs B C D E are high
[00:09:23] <rue_shop3> but something isn't working, it cant move when trying to zero the robot
[00:25:26] <rue_house> there was a hard coded serial port in the zero routine, it can zero now, but locks up trying to do regular motion
[00:38:06] <mrdata> hmm
[07:22:21] <pokmo> hi
[07:22:31] <pokmo> does anyone know what sort of control theory is implemented in gimbals?
[07:23:04] <pokmo> afaik, control theory equations can be computationally expensive to evaluate. how do gimbals' weak processors manage to cope?
[07:23:17] <Triffid_Hunter> pokmo: a gimbal is simply a mechanical arrangement of joints.. what sort of gimbal specifically are you asking about?
[07:23:30] <pokmo> Triffid_Hunter: i mean motorised gimbals
[07:23:44] <pokmo> camera stabilisers
[07:23:45] <Triffid_Hunter> pokmo: like camera mount ones? probably just cascade PID
[07:23:50] <pokmo> yeah
[07:24:16] <deshipu> you can do a lot of heavy number crunching really fast on fpgas...
[07:24:33] <deshipu> but I have no idea if they actually use that
[07:24:54] <veverak> they open chicken
[07:24:57] <Triffid_Hunter> you'd be surprised at the cost of a >100MHz 32 bit microcontroller with floating point coprocessor these days too
[07:25:01] <veverak> find a part of brain that takes care of stabilisation
[07:25:04] <veverak> and insert into gimbal
[07:25:05] <Triffid_Hunter> also what's possible with a simple avr8 core
[07:25:06] <veverak> :)
[07:25:18] <pokmo> Triffid_Hunter: STM32?
[07:25:43] <deshipu> veverak: reminds me of that "environmental suit" for a goldfish
[07:25:53] <Triffid_Hunter> pokmo: whole cortex-m4f family is pretty fascinating, some of them run up to 208MHz
[07:26:06] <deshipu> veverak: someone made a mobile robot with a goldfish tank, controlled by the fish's motions
[07:26:22] <veverak> :D
[07:26:28] <deshipu> upgrade your pet
[07:27:23] <pokmo> i wonder if there's any 1 axis "gimbal" code available
[07:27:29] <pokmo> i wonder how the PID works
[07:27:52] <deshipu> there are thousands articles and tutorials on that
[07:28:08] <deshipu> I think there was one recently on hackaday.com
[07:29:14] <deshipu> https://hackaday.com/2016/05/18/flying-with-proportional-integral-derivative-control/
[07:29:22] <pokmo> cool
[07:29:33] <pokmo> thanks
[07:30:01] <deshipu> not the best one I saw
[07:36:30] <abcd2345> wrt working with electronics, how important is having an oscilloscope?
[07:37:02] <SpeedEvil> abcd2345: very.
[07:37:15] <abcd2345> hm
[07:37:18] <SpeedEvil> abcd2345: Though it somewhat depends on what you're doing.
[07:37:31] <SpeedEvil> In some digital cases, you can get by without it.
[07:37:41] <abcd2345> So with anything remotely complex you cant get by with just a multimeter?
[07:38:58] <Jak_o_Shadows> A scope is dead handy.
[07:39:02] <Triffid_Hunter> abcd2345: I got by without a 'scope for 2 decades.. would definitely suggest getting one as soon as you can afford it though
[07:39:17] <Triffid_Hunter> abcd2345: best bang for buck at the moment is the rigol 1054z I'm told by a wide range of people
[07:39:30] <abcd2345> Hold on I'll check price
[07:39:31] <Jak_o_Shadows> I have a cheap logic analyzer, and it'll hep, but it's no good if it's not working
[07:39:33] <goppo> that's the one i got :)
[07:39:56] <Triffid_Hunter> abcd2345: scope is almost as useful as a proper temp controlled soldering station and hot air gun
[07:40:10] <abcd2345> See thats the problem, that scope you suggested is 600£ on amazon...
[07:40:20] <goppo> my soldering iron is crappy though
[07:40:29] <SpeedEvil> abcd2345: yeah - no
[07:40:31] <SpeedEvil> https://www.rigol-uk.co.uk/Rigol-DS1054Z-Digital-Oscilloscope-p/ds1054z.htm?gclid=CMKn_4Swk80CFbEy0wodCY0HSg
[07:40:36] <SpeedEvil> Our Price: £276.00 (£331.20 inc VAT)
[07:40:43] <SpeedEvil> With free delivery
[07:40:50] <goppo> the temperature control is dodgy
[07:43:19] <abcd2345> So the price for a decent scope starts around 250-ish?
[07:44:13] <goppo> i got mine for £220
[07:45:14] <SpeedEvil> abcd2345: you can get second hand ones for less.
[07:45:35] <abcd2345> Where should I look for one, ebay?
[07:45:55] <SpeedEvil> yes.
[07:45:57] <SpeedEvil> However.
[07:46:15] <SpeedEvil> They are of course second hand, without a guarantee, and may not work in entertaining ways.
[07:46:39] <SpeedEvil> In principle older scopes may be more reliable and maintainable in some ways
[07:48:58] <deshipu> abcd2345: I actually find a logic analyzer more useful than a scope
[07:49:05] <abcd2345> Why?
[07:49:11] <deshipu> then again, good scopes have logic analyzers built-in
[07:49:33] <deshipu> abcd2345: because it lets me debug my i2c or spi drivers
[07:52:25] <Jak_o_Shadows> Once you get em working in the first place
[07:52:29] <Jak_o_Shadows> I hav e counted bits so many times
[07:52:57] <SpeedEvil> Better than counting shadows.
[07:55:56] <abcd2345> Thanks for the help
[08:43:42] <veverak> deshipu: http://squirrel.veverak.org/laptop/tote/_MG_6624.JPG
[08:43:56] <veverak> http://squirrel.veverak.org/laptop/tote/_MG_6626.JPG
[09:21:46] <rue_house> veverak, looking good
[09:22:23] <veverak> yup
[09:22:46] <veverak> actual pain in the ass is the fact that I can't find repo with ROS packages for debian jessien armh
[09:23:10] <rue_house> you might have to just write code yourself!
[09:24:16] <veverak> well, I intend to do
[09:24:18] <veverak> :D
[09:24:22] <veverak> but as ros packages :)
[09:26:48] <rue_house> is that like making a program out of npm packages that each have 1 line of code?
[09:27:36] <veverak> wat?
[09:27:38] <veverak> nope
[09:27:48] <veverak> come on
[09:27:55] <veverak> have you ever did something with ros?
[09:27:57] <veverak> :)
[09:28:14] <rue_house> no I wreite all my own code
[09:29:16] <rue_house> and its a good thing too, dont need cameras to know where marbles are
[09:31:03] <rue_house> hah, they call it a 50Mhz scope, but its got a 20Mhz bandwidth limit...
[09:32:49] <rue_house> huh, they dont say what the adc resolution is
[09:33:38] <deshipu> veverak: makes me wonder if you wouldn't be better off to just attach the servos to a rapsberry pi case
[09:34:06] <rue_house> I'm a better coder than that, I can do it with an 8 bit avr
[09:34:25] <veverak> deshipu: that black plastic
[09:34:27] <veverak> will be pcb
[09:34:29] <veverak> :)
[09:34:34] <veverak> it's just "shape prototype"
[09:34:46] <deshipu> rue_house: admit it, you just can't handle a real computer ;)
[09:34:51] <rue_house> explains the molded spacer
[09:35:07] <rue_house> I havn't needed one yet
[09:35:50] <rue_house> your servo horns are bolted to the wrong side? hole print .5mm too small?
[09:36:20] <deshipu> veverak: you know what it's missing?
[09:36:23] <deshipu> veverak: goggly eyes
[09:36:32] <rue_house> my robots almost never break the $20 mark, whats that one cost so far?
[09:36:34] <veverak> deshipu: I was thinking more of santa hat
[09:37:08] <veverak> rue_house: nope, realized that it's better anyway
[09:37:14] <deshipu> rue_house: $30 for the servos alone
[09:37:29] <rue_house> https://youtu.be/slxOrCXxXOg
[09:37:34] <veverak> other way around, there's not enough space between servos/plate
[09:37:39] <rue_house> googly eyes like the ones on that robot?
[09:37:55] <rue_house> veverak, ah
[09:38:01] <deshipu> veverak: I had that problem with one batch of tote pcbs, when I odereder them too thick
[09:38:09] <deshipu> veverak: but smaller screws helped
[09:38:12] <veverak> deshipu: exactly
[09:38:30] <veverak> deshipu: well, I realised that I really don't need it other way around
[09:38:48] <veverak> I have enough space to switch to double-sided horns
[09:38:50] <veverak> :)
[09:40:06] <deshipu> rue_house: that has a *little* fewer degrees of freedom
[09:41:04] <veverak> deshipu: but
[09:41:17] <veverak> with one part, I lost "you don't need 3d printer" value
[09:41:24] <veverak> :/
[09:41:40] <deshipu> you could laser-cut them too
[09:41:40] <veverak> that damn holder for camera
[09:41:53] <veverak> deshipu: yep, but I can't lasercut the holder for camera the way it's designed
[09:41:55] <veverak> ;D
[09:42:04] <veverak> everything else can be lasercutted
[09:42:09] <deshipu> then redesign and laser-cut it :D
[09:42:23] <veverak> yep, but that needs time and think-it-through properly
[09:42:33] <deshipu> or just hotglue everything togteher, like me
[09:42:57] <veverak> deshipu: not possible here properly I suppose
[09:43:13] <deshipu> veverak: by the way: https://hackaday.io/project/9927-tote-had/log/36031-3d-printed-body
[09:43:41] <veverak> deshipu: http://thingiverse-production-new.s3.amazonaws.com/renders/92/6d/57/6b/cb/7e28feebbcfbe52bb748caca8ec946c3_preview_featured.jpg
[09:43:43] <veverak> this holds the camera
[09:43:52] <veverak> wow
[09:43:57] <veverak> deshipu: neat trick with wires
[09:44:24] <deshipu> veverak: the dseign files for that are there, you could 3d-print better legs :)
[09:44:30] <veverak> hmm
[09:44:38] <veverak> deshipu: too bulky
[09:44:56] <veverak> But I am thinking about simple way to strengthen coxa servos
[09:45:40] <deshipu> adding that second femur would really help
[09:46:09] <deshipu> and a bearing on the bottom of the coxa servos
[09:46:27] <veverak> yeah, I like the way it strengtens the coxa servos
[09:46:29] <veverak> hmmm, will see :)
[09:47:05] <veverak> but nah, I would love if somebody would make double-sided small servos
[09:49:46] <deshipu> just glue a bolt there ;)
[09:50:09] <deshipu> or 3d-print alternate backs for the servos
[09:51:03] <deshipu> actually, you could even take one to make a mold, drill a hole in the mold to add the bolt, and cast it from resin
[09:56:20] <veverak> deshipu: I want to make something that is easily replicable ideally
[09:58:12] <deshipu> a flat-head bolt should be easy to obtain
[10:00:46] <veverak> deshipu: hmm, will think about something
[10:01:08] <deshipu> you just need to place it in the right place -- probably make a rig
[10:01:12] <veverak> point with gluing bolt is that you want to be somehow precise with position being on the right place
[10:01:14] <deshipu> to hold it
[10:01:17] <veverak> yep
[10:01:19] <veverak> something like that
[10:01:21] <veverak> :)
[10:01:58] <deshipu> you might want to drill a hole (with the rest of the servo removed) and put the flat-headed bolt from the other side
[10:02:11] <deshipu> the forces would work really bad for the glue
[10:03:07] <veverak> deshipu: well, I could make a simple board
[10:03:14] <veverak> or
[10:03:16] <veverak> :D
[10:03:24] <veverak> deshipu: you disassemble the servo
[10:03:39] <veverak> take everything out
[10:03:48] <veverak> assemble it again, and just drill it from top to botom
[10:04:00] <veverak> that could work
[10:04:03] <veverak> or, something like that
[10:12:25] <veverak> deshipu: what I wonder now
[10:12:28] <veverak> is how to make http://squirrel.veverak.org/laptop/tote/_MG_6627.JPG
[10:12:32] <veverak> the black part that holds camera
[10:12:43] <veverak> in a way that doesn't require 3d printing
[10:12:56] <veverak> and DIY skills to make it from raw piece of plastic
[10:20:49] <deshipu> make it from two pieces and screw together?
[10:27:24] <veverak> deshipu: or
[10:27:40] <veverak> glue plate and collums together?
[10:29:59] <deshipu> coulmns?
[10:30:41] <veverak> deshipu: stuff I have between top/bottom pcb
[10:30:50] <veverak> http://www.gme.cz/img/cache/800x600/623/294/di5m2-5x06-nikl-vigan-obrazek-1.jpg
[10:30:59] <deshipu> btw, there are plastic spacers like that too
[10:31:05] <deshipu> you could save some weight
[10:32:15] <veverak> I seee
[10:32:24] * veverak got bunch of metals around everytime, used that...
[10:34:02] <deshipu> veverak: http://www.aliexpress.com/item/Durable-160pcs-M3-Nylon-Black-M-F-Hex-Spacers-Screw-Nut-Assortment-Kit-Stand-off-Set/32437486883.html
[10:34:30] <veverak> cool
[10:34:32] <veverak> except
[10:34:35] <veverak> raspbery just has to use 2.5
[10:34:37] <veverak> :)
[10:35:17] <deshipu> http://www.aliexpress.com/item/150pcs-M5-M4-M3-M2-5-M2-white-nylon-screws-nuts-washer-PCB-board-height-hexagon/32502736561.html
[10:35:34] <deshipu> oops, sorry, those are bolts
[10:36:07] <veverak> yeah
[10:36:11] <deshipu> but just look for m2.5 nylon spacers
[10:36:13] <deshipu> lots of them
[10:36:38] <deshipu> can't see a box with black ones, only white
[10:39:22] <veverak> deshipu: http://www.aliexpress.com/item/Free-Shipping-100pcs-lot-Hex-nut-screw-M2-5-X-10-PCB-Hexagon-Spacer-Nylon-off/32337911936.html?spm=2114.01010208.3.102.icAnEF&ws_ab_test=searchweb201556_10,searchweb201602_1_10017_507_10032_401,searchweb201603_9&btsid=8277d99e-2b3c-4c8d-9ec8-1e7908d0d6fb
[10:39:43] <veverak> and there are many different versions etc
[10:39:46] <veverak> so
[10:39:58] <veverak> I think I can put these things into "higly available" category and just don't care
[10:40:00] <veverak> :)
[10:40:19] <deshipu> and plastic is easier to glue
[10:40:30] <veverak> yup
[10:41:52] <veverak> deshipu: http://www.aliexpress.com/item/150Pcs-M2-5-Nylon-Hex-Spacers-Screw-Nut-Stand-off-Plastic-Assortment-Kit-Set-Black/32531586284.html?spm=2114.01010208.3.1.eCbjvn&ws_ab_test=searchweb201556_10,searchweb201602_1_10017_507_10032_401,searchweb201603_9&btsid=4f285c19-3983-4bd3-99b2-25f62615cfe1
[10:41:55] <veverak> ideal
[10:42:19] <deshipu> ha!
[10:42:45] <veverak> hmm
[10:42:47] <deshipu> I really love those nylon and acrulic bolts
[10:42:49] <veverak> I think I will order one
[10:42:51] <veverak> ;)
[10:43:17] <deshipu> not only you can cut them to size easily, they don't damage your pcb and don't cause shorts
[10:43:21] <deshipu> and they are light
[10:44:04] <deshipu> and look cool
[10:45:03] <veverak> yep
[10:45:09] <veverak> ordered one set
[10:45:11] <veverak> I like this set
[10:45:21] <veverak> looks like it's everything you need to build the robot
[10:52:35] <deshipu> :)
[10:52:45] <deshipu> veverak: did I tell you a bought a lego set?
[10:53:08] <veverak> deshipu: nope
[10:53:15] <veverak> but after I found out that latest mindstorms can do ROS
[10:53:18] <veverak> was considering it
[10:53:20] <veverak> ;)
[10:53:59] <deshipu> latest mindstorms is linux
[10:54:18] <deshipu> I mostly bought it for the tracks
[10:54:18] <veverak> yep
[10:54:20] <veverak> :)
[10:54:25] <deshipu> they look pretty good
[10:55:23] <veverak> yay
[10:55:25] <veverak> :)
[15:31:48] <codepython777> rue_house: you there?
[18:39:11] <orlock> heya Crenn
[19:37:14] <rue_house> yes
[19:54:07] <rue_house> ok I have a robot arm to debug
[19:59:48] <rue_shop3> rue
[19:59:49] <rue_shop3> yea
[19:59:54] <rue_shop3> ok, where we at
[20:00:17] <rue_shop3> yesterday you found a bug, the port is opened twice, guess where your missing data is going :)
[20:00:19] <rue_shop3> ah!
[20:01:12] <rue_shop3> printf("Opening connection to robot...\n");
[20:01:12] <rue_shop3> arm4Init(&(robot.motorSet), "/dev/ttyUSB1");
[20:01:12] <rue_shop3>
[20:01:12] <rue_shop3> printf("Zeroing robots axies...\n");
[20:01:13] <rue_shop3> arm4Zero(&(robot.motorSet));
[20:01:25] <rue_shop3> --
[20:01:26] <rue_shop3> Status_t arm4Zero(arm4_t * this ) {
[20:01:26] <rue_shop3>
[20:01:26] <rue_shop3> serialStepper_t * robot;
[20:01:26] <rue_shop3>
[20:01:27] <rue_shop3> robot = &(this->motors);
[20:01:29] <rue_shop3>
[20:01:31] <rue_shop3> stepMotorInit(robot);
[20:01:33] <rue_shop3> stepMotorSetSerial(robot, "/dev/ttyUSB1"); //!!!???!!!
[20:01:35] <rue_shop3> stepMotorSpd(robot, 4000);
[20:01:36] <rue_shop3> stepMotorQLimitUpdate(robot);
[20:01:41] <rue_shop3> zero should not init then
[20:02:49] <rue_shop3> oh wait
[20:02:55] <rue_shop3> thats a different object
[20:03:14] <rue_shop3> you cant think clear can you?
[20:03:16] <rue_shop3> no
[20:03:27] <rue_shop3> focus on the LETTERS then
[20:03:35] <rue_shop3> arm4Init(&(robot.motorSet), "/dev/ttyUSB1");
[20:03:40] <rue_shop3> stepMotorSetSerial(robot, "/dev/ttyUSB1");
[20:03:51] <rue_shop3> Status_t arm4Init(arm4_t * this, char * port ) {
[20:03:51] <rue_shop3> stepMotorInit(&(this->motors));
[20:03:51] <rue_shop3> stepMotorSetSerial(&(this->motors), port);
[20:03:51] <rue_shop3> stepMotorSpd(&(this->motors), 5000);
[20:03:51] <rue_shop3> }
[20:04:05] <rue_shop3> the serial port was already set
[20:04:41] <veverak> nah
[20:04:44] <veverak> one simply misses OOP here
[20:04:46] <veverak> ;)
[20:04:48] * veverak hides
[20:05:06] <rue_shop3> objects are find, oop is just bad
[20:05:12] <rue_shop3> as currently implemented
[20:05:22] <veverak> ah
[20:05:35] <veverak> well
[20:05:49] <veverak> main reason I enjoy it is that it allows me to group data and methods together
[20:05:57] <veverak> more or less that's the main point
[20:05:57] <rue_shop3> where is the serial port acutally opened rue?
[20:06:25] <rue_shop3> Status_t stepMotorSetSerial(serialStepper_t *this, char * port){
[20:06:25] <rue_shop3> if ((SerOpen(&(this->serial), port, 115200)) != OK) {
[20:06:25] <rue_shop3> printf("Unable to open serial port\n ");
[20:06:25] <rue_shop3> return CantOpen;
[20:06:25] <rue_shop3> }
[20:06:25] <rue_shop3> }
[20:06:36] <rue_shop3> ok
[20:08:23] <rue_shop3> I think that will do it
[20:08:34] <rue_shop3> it compiled :)
[20:08:40] <rue_shop3> thaks for your confidence
[20:09:14] <rue_shop3> nope
[20:09:43] <rue_shop3> Status_t finishStep(serialStepper_t *this) {
[20:09:43] <rue_shop3> // if we need to , wait for the last step to finish.
[20:09:43] <rue_shop3>
[20:09:43] <rue_shop3> while (this->waiting) {
[20:09:43] <rue_shop3> stepMotorListen(this);
[20:09:44] <rue_shop3> }
[20:09:46] <rue_shop3> return OK;
[20:09:48] <rue_shop3> }
[20:09:53] <rue_shop3> you were talking about that one eariler
[20:10:07] <rue_shop3> want to copy the timer from the trainer code?
[20:10:13] <rue_shop3> 250ms?
[20:10:16] <rue_shop3> sounds good
[20:12:57] <rue_shop3> so I add 250000?
[20:13:12] <rue_shop3> 30000 would be .03 sec
[20:13:17] <rue_shop3> so yea