#robotics Logs

Dec 16 2015

#robotics Calendar


01:22 Snert http://www.haydonkerk.com/LinearActuatorProducts/StepperMotorLinearActuators/RotaryStepperMotors/PancakeRotaryMotors/PlanetaryPancakeMotors/tabid/107/Default.aspx
01:23 Snert when the power is off....is the arm going to collapse?
01:23 Snert or is the reverse planetary force going to be enough to keep position until juice comes back on.
01:25 Red_Onyx hello peoples
02:28 anonnumberanon Hello reoxex
09:16 AgnanoD hi there, i'm encounter some problem with wheel encoder when using interrupt.the problem is this: when i set the wheel encoder to be triggered with interrupt, then the code in the loop function don't executing.how can i overcome this issue?
09:17 Snert please use pastebin.com to show us your code
09:18 rue_house AgnanoD, you have to learn how to code interrupts
09:18 rue_house :)
09:18 AgnanoD sec plz im posting it
09:18 rue_house esp not putting while loops in them
09:19 AgnanoD here: http://pastebin.com/fep2j7U3
09:19 AgnanoD when the motor start spin then HandleMotor dont respond anymore
09:21 Snert that handlemotor function looks funny.
09:22 Snert you have a if/else with no {}
09:22 AgnanoD Snert, if / else dont have to have "{} if its one line of code!
09:23 AgnanoD if you have a block code then you should use : { or }
09:23 Snert didnt know that - thought it was always required
09:23 AgnanoD so it's not funny lol
09:23 AgnanoD i wonder how can you help if you dont know this basic stuff
09:23 rue_house hah
09:24 rue_house is this arduino code?
09:24 AgnanoD yep
09:24 rue_house k
09:25 rue_house so, you need to know that interrupts need to exit as fast as possable
09:25 AgnanoD they do!
09:25 rue_house you shouldn't be printing things in your interrupt
09:25 rue_house set a flag or do math
09:25 rue_house print things in the main loop
09:26 AgnanoD i think that the problem is because the interrupt always happen because the wheel is constantly spin so there is no chance for something else
09:27 AgnanoD this is my assumption
09:27 rue_house and dont detach and reattach the handlers like that... thats evil
09:27 rue_house its a 2 channel encoder?
09:27 AgnanoD yep
09:28 rue_house you want to track its position?
09:28 AgnanoD yep
09:28 rue_house is the encoder mechanical or optical
09:28 AgnanoD optical
09:28 rue_house ok
09:28 rue_house would you like to see my code or have me teach you how to do it?
09:29 AgnanoD rue_house, i think i can read code, it will be fine with me.
09:30 rue_house this isn't arduino code, but I think you can understand and translate
09:31 AgnanoD ok thanks
09:31 rue_house http://pastebin.com/qcHeuC5P
09:32 rue_house I'll guide you to the right parts...
09:32 AgnanoD ok
09:32 rue_house offsets[] is a table that maps the previous state of the encoder, to the new state and says what the position change was
09:33 rue_house ISR() set up the interrupt routine, I catch both edges and send them to the same function
09:35 rue_house updatepos() collects the state of the enocder, adds the previous state of it, does the table lookup, and adds the difference to the global position value
09:35 rue_house and there is the setup routine that makes sure both interrupts are set for both edges and enabled
09:36 rue_house so the main loop just sees the global position go up and down, it can do what it likes with the value
09:36 AgnanoD looks a bit complex
09:37 rue_house there are other ways of doing it, that is the fastest
09:38 rue_house :) it also works
09:38 jhylands there's a perfectly good encoder class on the playground that handles quadrature encoders, with the interrupts coded in assembler to speed things up
09:39 rue_house that code of mine is assembler optimized C
09:39 rue_house and somehow I bet mine works better
09:39 jhylands actually, not on the playground - on the PJRC site
09:40 rue_house jhylands, ... hylands...
09:40 rue_house hi!
09:40 jhylands hi
09:40 AgnanoD jhylands, its for arduino?
09:40 jhylands yeah, they have a version that runs on AVR-based arduinos, I think
09:40 jhylands they also have an ARM version for their newer Teensy
09:40 jhylands https://www.pjrc.com/teensy/td_libs_Encoder.html
09:41 AgnanoD oh great, gonna check it. thanks all
09:41 jhylands there's a whole page of them here: http://playground.arduino.cc/Main/RotaryEncoders
09:43 rue_house I wonder why most arduino libraries seem to be so flakey
09:43 AgnanoD it also works from within loop function :)
09:43 rue_house does nobody put love into code anymore?
09:43 jhylands because its hard to write good solid code
09:43 rue_house its not hard tho
09:43 jhylands its harder than building crappy code that sorta works
09:43 rue_house yea, agreed...
09:44 rue_house everyone is going for cobble instead of masterpeice
09:45 rue_house then again, I dont make any money off my stuff, so i can masterpeice whatever I want
09:45 jhylands it also depends on what you're trying to accomplish
09:45 rue_house well, from what I'v seen, nobdy is going for sturdy foundation!
09:45 jhylands when I'm working on a robot, I might not spend quite as much time polishing code for utility type stuff
09:46 jhylands but then again it depends on what the code is
09:46 jhylands I'm currently completely redoing the code for Roz (my bioloid quad walker)
09:46 rue_house have you seen the arduino code for playing wav files? they are all terrible, fixed bitrates, playing the header and the tail of unfilled buffers...
09:47 jhylands no
09:47 jhylands I don't use arduinos much
09:47 jhylands my low-end stuff tends to run on bare AVRs, but lately I've been using ARMs for everything
09:47 rue_house it damn near had to shuddering in the coner trying to erase it from my mind.
09:48 jhylands I really like MicroPython, so I've been mainly concentrating on the Cortex M4 series
09:48 rue_house hows the vrc?
09:49 jhylands vrc?
09:49 rue_house maybe i'm thinking ofthe other hylands
09:49 jhylands my brother dave
09:49 jhylands who is also into robotics and embedded stuff
09:49 rue_house must be an interesting family
09:50 jhylands indeed, although I only see him a few times a year - he lives 3000 km away from me
09:50 rue_house thats about 13ms on the internet?
09:50 jhylands something like that
09:51 rue_house well, I'm late for work, again
10:03 akem hey
10:05 akem anyone using rxtx gnu.io java on recent android? i wonder if i can just import the java side lib, or if i still have to deal with shared libs bin on the system
10:07 akem i did not had to do anything when installing arduino ide obviously
10:16 Lajkie well I regret designing robots now ;(
10:58 akem i think im gonna try mik3y usb serial 4 android if i can use it AIDE.
10:59 akem my java camera input is so slow
11:00 robotustra may be java is just slow?
11:02 robotustra akem: As I told yesterday - if you don't want be upset of shitty performance - do not buy chip shit
11:10 akem2 kmcx
11:11 akem2 robotustra yes, i can still port the code to C/C++ on PC
11:11 akem2 easy enough, on different hardware
11:13 akem2 not that it is bad hardware but because of java/android its not easy but it will possibly change with stuff like augmented reality etc
11:13 akem2 i can run 3D apps, its not so bad.
14:31 student Hello guys
14:31 robopal hi
14:31 student is any one even active
14:31 robopal they are
14:32 student ok sorry i was not patient
14:32 robotustra wut?
14:32 student never mi
14:32 student nd
14:33 robopal whats up
14:33 student nothin you
14:33 robopal oh ok I thought you wanted to ask something
14:34 robotustra severe russian LED hinting about light overload http://demotivators.to/media/posters/3248/18586400_surovyij.jpg
14:34 robopal :S
14:34 robopal omg
14:36 robopal what LED hinting?
14:37 robotustra the current overload
14:39 Snert__ just a warm dull glow.
14:39 Snert__ I'd say it can take 10% more current :)
14:40 robopal they use the conductor to heat the building, smart russians
14:41 robotustra not only russians heat everything with conductor
14:41 robotustra everyone does
14:43 Snert__ that connection is gonnaget worse with time too.
14:44 Snert__ I see a weinie roast with the fire department in the making.
14:44 Snert__ which is alright if they bring the beer.
14:46 mrdata-- the fire department attended my weinie roast
14:46 Snert__ was it good for all?
14:46 Snert__ was there anything left?
14:46 mrdata-- certainly good for all; they didnt even have to turn on the pumper
14:47 mrdata-- i had a bbq in the courtyard of a housing co-op; one neighbour who saw some smoke called it in
14:47 mrdata-- the fire fighters chuckled as they pulled up
14:48 Snert__ that neighbor should be forced to chug a beer.
14:48 mrdata-- i showed them the bbq and a pile of sand we had nearby, just in case
14:49 mrdata-- the neighbour was too embarassed to come join the party
14:49 mrdata-- some others did tho
15:51 foul_owl What's the motor equivalent to a 9g servo? Something very small, lightweight, inexpensive (9g servos are $3 each) but doesn't have to be precise and supports full rotation. I don't want to mod a servo, I want to buy something off the shelf. Thanks!
16:39 deshipu foul_owl: there are 9g continuous rotation servos
17:01 foul_owl Aha!
17:01 foul_owl Ok in my mind servo != continuous rotation
17:01 foul_owl Thank you!
17:01 Snert__ maybe not for 3bucks though.
17:39 anonnumberano attachInterrupt()
17:39 anonnumberano wait what, arduino does interrupts ?
17:39 anonnumberano heh
17:39 deshipu of course it does
17:41 deshipu Snert__: which is strange, as they are even simpler that normal servos
17:42 deshipu I guess not as popular
17:55 Snert__ a specialty where a little additional profit taking is justified for them
17:56 Snert__ not a whole lot more, mind you, but if a $3.00servo is the upper limit of price then it might get rough
17:57 Snert__ Hi-Tec does good ones but that's a $25.00 servo
17:57 Snert__ metal gears, bal bearings and such.
17:58 anonnumberano Lol full rotation is actually cheaper to make than 180*
17:58 anonnumberano and easeir
18:00 anonnumberano how much strength/force do you need on the motor foul_owl
18:07 deshipu that's why I usually just convert the servos
18:08 deshipu a drop of glue and a small drill is all it takes
18:08 robotustra_ https://www.youtube.com/watch?v=cTr5zi_TA94
18:09 deshipu vroom, vroom
18:10 Snert__ I was reading about encoders and wheels.
18:11 Snert__ it said never put an encoder on a driven wheel if you can avoid it.
18:11 Snert__ always use a non-powered wheel that just rolls.
18:11 Snert__ if you can, that is. Not possible sometimes.
18:12 Snert__ I'm kinda doubting that if it is a tracked vehicle.
18:12 robotustra_ there is no encoders on these wheels
18:14 deshipu do you plan to add them?
18:14 Jak_o_Shadows robotustra, what's the middle shaft for? Just structural?
18:15 robotustra_ no
18:15 robotustra_ the body is split on 2
18:15 robotustra_ it's rotation along the axis
18:15 anonnumberano For full rotation to use servo as a driving motor there is a stop on the larger gear that needs removed with pliers. The potentiometer needs to be removed and resistors put instead of it. That way the controller thinks the potentiometer does not get to the end yet and keeps telling the motor to turn.
18:16 Jak_o_Shadows Just passive?
18:17 robotustra_ passive?
18:17 robotustra_ did you see my draft?
18:17 Jak_o_Shadows anonnumberano, you can just hot glue the pot to the middle value
18:17 anonnumberano And destroy part of its connection with the gears..
18:17 robotustra_ Jak_o_Shadows: http://i.imgur.com/Bd5Wybf.png
18:18 robotustra_ http://i.imgur.com/KCz25bd.png
18:18 robotustra_ http://i.imgur.com/scLWV6I.png
18:19 Jak_o_Shadows Yeah, that's what I thought was going on.
18:19 Jak_o_Shadows Nice idea
18:20 robotustra_ idea is on the surface
18:21 robotustra_ it provides the good contact to the floor of all 4 wheels
18:29 Jak_o_Shadows What's the payload going to be?
18:42 robotustra_ 40-50kg
18:42 robotustra_ on flat floor
18:43 robotustra_ max speed 1 m/s
18:43 Jak_o_Shadows What are you going to put on it?
18:43 robotustra_ http://robotustra.ca/my-robot
18:44 Jak_o_Shadows Ah, cool.
18:44 Jak_o_Shadows I was about to ask about your eyes
18:46 robotustra_ what's done is in here http://robotistra.ca/my-robot-done
18:51 Jak_o_Shadows cool, harmonic gearbox
18:55 robotustra_ not truly harmonic
18:55 Jak_o_Shadows sorta planetary?
18:56 robotustra_ no, cycloidal
18:57 robotustra_ idea is here http://i.imgur.com/qLU0frh.jpg
18:58 Jak_o_Shadows Have you greased it at all?
18:58 anonnumberano lol i was thinking that very same thing
18:58 robotustra_ a little bit
19:00 robotustra_ anonnumberano: what is the vary same thing?
19:01 anonnumberano robotustra, wondering about grease
19:06 robotustra_ there is no big friction there it could be done without friction
19:06 robotustra_ it could work without grease
19:10 jhylands back
19:10 jhylands oops
19:10 jhylands wrong window
19:12 anonnumberano jhylands, how far did you get in biped robot?
19:19 robotustra_ as far as biped could walk :)
19:23 Jak_o_Shadows I think that you would get more wear without grease
19:24 jhylands far enough to decide that AX-12's are not going to cut it for the walking gait I wanted to use
19:24 jhylands if you look at my MicroRaptor walking video, you can see instead of the typical shuffle gait, I'm taking big long steps (about 5" long)
19:27 jhylands https://www.youtube.com/watch?v=wOsNJCwrm6Y
19:30 Snert__ that thing is scary
19:30 Snert__ it might eat me up in the middle of the night
19:30 anonnumberano yeah about that, you shoudl keep going
19:30 anonnumberano floor was waxed wood, very low friction, i would have tried with more friction
19:30 anonnumberano make it simpler at the beginning
19:31 Snert__ maybe a rubber/padded show on it's feet.
19:31 anonnumberano you were almost to the point of making a dynamic gait there
19:31 Snert__ shoe
19:32 onnumberano wants to see more raptor actio
19:32 anonnumberano and what was wrong with ax 12?
19:32 jhylands yeah, but it wasn't a traction issue, it was a servo strength issue
19:32 jhylands they don't have the torque to maintain the lean angle
19:32 jhylands for that kind of gait
19:33 jhylands I tried to make it walk with the feet more or less in a line
19:33 jhylands so the leg had to lean in, which put lots of strain on the hip roll axis servos
19:33 jhylands and the ankles as well
19:34 jhylands each leg has 7 servos, btw
19:37 anonnumberano I'd like to find a way to use the gyro feedback to make decisions for 2 legs to correct so the robot goes back straight
19:37 anonnumberano that woudl be goal 1
19:38 anonnumberano then when that works, remove a bit of one side and give it an impulse and then that makes the robot walk in that direciton
19:39 jhylands I decided to switch to quads
19:39 jhylands simpler to do with AX-12's
19:39 anonnumberano i guess goal 0.5 would be: push the robot just enough so that it will be in fall motion, then teach it to take one step
19:39 jhylands still interesting gaits
19:42 anonnumberano thinking about this stuff keeps one's mind sharp!
19:45 anonnumberano the video of brainbot walking is nice too
19:45 anonnumberano how did you manually move the servos? sequencing?
19:48 jhylands I had a full sequence editor
19:48 jhylands I wrote
19:49 jhylands http://huv.com/~bioloid/tiki/show_image.php?id=108
19:49 anonnumberano I am using slider pots. Seems pretty tactile for the task.
19:49 anonnumberano well, I will be using
19:50 jhylands the idea was with sequences, once it was working reasonably well, I could apply a genetic algorithm to attempt to auto-tune it
19:50 Jak_o_Shadows slider pots are kinda expensive
19:50 anonnumberano Jak_o_Shadows, a bit, a dollar a pop
19:51 anonnumberano it's really negligible money for what it is though
19:51 jhylands This was the data from the six-axis IMU - http://huv.com/~bioloid/tiki/show_image.php?id=110
19:51 jhylands it fell over, which you can clearly see
19:51 anonnumberano what's the difference between genetic algorithm and neural networks?
19:51 jhylands lots
19:52 jhylands genetic algorithms are a generic thing, where you apply "mutations" to the data and see what happens
19:52 jhylands NN are learning networks
19:53 anonnumberano do you have to spend a really long time trying a lot of different things or is it kind of logical/intuitive?
19:53 jhylands you have to try a lot of different things
19:53 jhylands but the idea is to make it self-monitoring, which you can do if you have a way to measure the fitness of a particular gait/sequence
19:53 jhylands an onboard IMU does that nicely
19:54 jhylands This was the project page, if you're interested in some reading: http://huv.com/~bioloid/tiki/tiki-index.php?page=MicroRaptor
19:54 anonnumberano yes
19:56 anonnumberano what software to draw this did you have to draw all or are there downloadable sprites? http://huv.com/~bioloid/tiki/show_image.php?name=MicroRaptor-07.PNG
19:56 jhylands That was done with Rhino
19:57 anonnumberano it looks legit
19:57 jhylands http://www.rhino3d.com
20:06 robotustra_ anonnumberano: there is a difference
20:06 robotustra_ GA is more like Monte Carlo
20:07 robotustra_ it generates the solutions from some set of bad solutions
20:08 robotustra_ and NN should be trained for some patterns and when they are trained they give the answer immideately
20:10 robotustra_ I wander how to teach biped's neural network on the robot
20:10 robotustra_ I think it's better to make it on model
20:29 anonnumberanon yeah i really dony know how ill make my walk
20:29 anonnumberanon lot of trial and error and intuition
20:30 anonnumberanon id like to buy or build a small treadmill
20:40 anonnumberanon Gyros are getting so cheap nowadays i think there is some thought to be had about using more than one IMU. If not 3 or 5.
20:40 Jak_o_Shadows what, in different legs?
20:45 jhylands you can buy a full 9-axis IMU single chip that includes a Cortex M0 running fusion for $11
20:46 jhylands http://www.mouser.com/ProductDetail/Bosch-Sensortec/BNO055/?qs=sGAEpiMZZMtIHXa%252bTo%2fr2SMZuH5v3473jYOqmUidcJg%3d
21:08 jhylands wow, I found the real CyberDog
21:08 jhylands https://www.youtube.com/watch?v=9xMoXywKyOs
21:08 jhylands although its apparently an ape, but it walks like a dog
21:09 Jak_o_Shadows oh, that's cool
21:09 Jak_o_Shadows It's basically got a stewart platform for the back
21:09 jhylands yeah, interesting way to get a flexible-ish backbone
21:10 jhylands definitely 4 dof legs
21:11 jhylands and it stands up
21:11 jhylands https://www.youtube.com/watch?v=hMn99bd-G-E
21:14 Jak_o_Shadows I gotta figure out what effect the use of rotating things does
21:18 Jak_o_Shadows Like, instead of pure linear actuators, you have it rotating.
21:21 robotustra_ red button on the ass
21:31 jhylands I whipped up a 4 DOF leg using AX-12's following that dog/chimp's morphology
21:31 jhylands https://app.box.com/s/2rzxav8aatmvcb5wulgoki364dsmwfqu
21:31 jhylands front leg
21:32 jhylands deshipu, are you around?
21:43 jhylands what I'd really like to know, is, how does Spot turn so well
21:43 jhylands https://www.youtube.com/watch?v=M8YjvHYbZ9w
21:44 jhylands oh, I see - its moving its back legs in and out as it turns