#robotics Logs

Jan 02 2019

#robotics Calendar

02:44 AM polprog: hey rue
02:48 AM polprog: those look good to me
08:10 AM rue_bed: if you die in your dream, you die in real life right?
08:10 AM veverak: depens on scifi you are watching
08:10 AM rue_bed: I came > < that close to getting crushed between a locomotive and its storage shed cause its boiler was cooling down and pulled a vacuum
08:10 AM rue_bed: :S
08:10 AM rue_bed: nasa had clumbsy space ships flying all over the place, I think they were using NN learning
08:10 AM veverak: NN still feels overrated
08:10 AM rue_bed: lots of overgrown and abandoned houses along the shores of california
08:10 AM veverak: and I am now studying it for exams
08:10 AM rue_bed: it seems they are good at taking 'kinda like this' -> 'is probably this'
08:24 AM veverak: yup
08:25 AM veverak: which is of course a perfect solution for a lot of problems
08:25 AM veverak: but it is definetly not "one solution to everyhing"
08:38 AM deshipu: it's great for fitting curves :)
08:39 AM veverak: well
08:39 AM veverak: https://imgur.com/a/MYqsBC8
08:39 AM veverak: some path for the legs are planned
08:39 AM veverak: (just paths to step on0
08:39 AM veverak: needs some bugs to be fixed
08:50 AM haolez: kind of off topic, but I'm being asked by a recruiteer if I know "C++ for robotics". I know C++, but I don't understand what would be specific to C++ about robotics. What would you understand in this context? Maybe she meant that I need to know control theory as well...?
08:52 AM veverak: or maybe experience with embedded ?
08:52 AM veverak: :)
08:53 AM haolez: veverak: yeah, I have that as well. I'm googling here and it seems that this usually means that I need to be able to communicate with the hardware in real-time (probably just soft)
08:54 AM haolez: What I don't know is control theory... that's some serious math and I'm completely rusty
08:55 AM veverak: you should look at that definetly
09:02 AM veverak: haolez: embedded - realtime (write code that is _fast_ and _predictable_, usually during interrupts)
09:02 AM veverak: also: write without dynamic allocation
09:04 AM rue_mohr: ok I have all the scan images....
09:05 AM veverak: haolez: aaaaaand be prepared that half of standart library is not usable on embedded
09:05 AM veverak: :)
09:05 AM veverak: but it is possible that "C++ for robotics" here means coding for ARM platform, so the thigns I said does not apply
09:06 AM rue_mohr: the odds are you just taking exsting stuff and piling on more other stuff
09:07 AM veverak: that would be bad
09:07 AM veverak: I remember a guy
09:07 AM rue_mohr: thats most of the world right now
09:07 AM veverak: that tried to convice me that I can't delete code of others... (which I said is the best thing that can happen, when code is removed) ... because other coders could be offended and you have to work with them!
09:08 AM veverak: I wasted hour convincing him that this is bullshit thinking, without sucess :/
09:08 AM rue_mohr: ALL the FFT code you see that uses one multiplexed array, is doing that cause the origional fortran source hacked out of two other sources could only have one data array
09:08 AM veverak: lol
09:08 AM veverak: :D
09:08 AM veverak: rue_mohr: have you ever seen code for collision of a ray with triangle?
09:08 AM veverak: I did
09:08 AM veverak: and you can trace 90% of it to one single .c file
09:08 AM veverak: :)
09:09 AM rue_mohr: and the person who ported it from fortran to basic didn't understand the math, so just did a translation, and the person who took the basic and ported it to C did the same, but just carried forward the stuff from the basic loops
09:09 AM rue_mohr: veverak, cool
09:09 AM veverak: I suppose same is true for the ray-triangle collision
09:10 AM rue_mohr: I found the origional '67 source
09:10 AM rue_mohr: the author said it was a mash of two peoples code
09:10 AM rue_mohr: also says its not the fast implementation
09:11 AM rue_mohr: but its the one that got translated thru the ages
09:13 AM veverak: lol
09:14 AM rue_mohr: so, way I see it, since '67 programming has been about hacking other peoples code
09:15 AM veverak: not in every case
09:15 AM veverak: but mostly, yeah
09:15 AM rue_mohr: so veverak did you rewrite the collision code?
09:15 AM veverak: I wrote my own code based on different math
09:15 AM veverak: it can handle the line-triangle case, but not I am not sure it is optimal
09:15 AM veverak: thing is
09:15 AM veverak: it should handle any convex shapes :)
09:16 AM veverak: custom templated code based on this https://gamedevelopment.tutsplus.com/tutorials/collision-detection-using-the-separating-axis-theorem--gamedev-169
09:17 AM veverak: should result in optimized assembler for each case you use it for
09:17 AM veverak: "should be about fast enough"
09:18 AM rue_mohr: have a link to that origional .c for the intersection?
09:18 AM rue_mohr: is it mid 90's?
09:19 AM veverak: fuuu
09:19 AM veverak: let me check
09:21 AM veverak: nope :/
09:22 AM rue_mohr: is it less work than breaking the shapes down into triangles and checking for overalaps?
09:23 AM rue_mohr: dont think I did tri:tri collisions yet
09:24 AM rue_mohr: that would be part of my new poly library
09:25 AM rue_mohr: double polyArea(point2d_t* poly, unsigned int n)
09:25 AM rue_mohr: that is the only fn in it now
09:26 AM rue_mohr: I wonder where the centroid fn is
09:26 AM rue_mohr: oh its for trianlges only, so its in 2d lib
09:35 AM haolez: veverak: thanks for your input
09:50 AM veverak: 16:20:51 rue_mohr │ is it less work than breaking the shapes down into triangles and checking for overalaps? | yup
09:50 AM veverak: :)
09:50 AM veverak: or, depends on the shape really
09:50 AM veverak: I use the separating axis theorem for full collision
09:50 AM veverak: and sphere collision as "fast" collision
09:51 AM veverak: (you calc smalles sphere for the shape and use that )
11:25 AM SoCo_cpp_: Hi. I've been trying to get one of these popular high torque servo motors, MG996, to work swinging 90 degrees one way, then 90 degrees back. Yet, no matter the signal frequency (verified by digi scope 50Hz 0.5 to 1.5 ms ON) it just spins continuously in the same direction. Any suggestions?
11:27 AM SoCo_cpp_: I guess my next step is to throw a nob on the circuit and adjust the duty cycle by hand to look for a reasonable reaction.
11:35 AM deshipu: SoCo_cpp_: sounds like you have a continuous rotation servo, not a regular servo
11:36 AM SoCo_cpp_: I don't think it is supposed to be, but the documentation is admittedly lacking. I thought it switch directions once, but don't know what caused it.
11:37 AM deshipu: a regular servo shouldn't be able to rotate 360°
11:37 AM SoCo_cpp_: well, it definitely does that with ease.
11:37 AM deshipu: if it's a continuous rotation servo, it will rotate one way when then signal is <1.5ms, and the other way when it's >1.5ms
11:38 AM deshipu: does it have a trimer for setting the middle point?
11:38 AM SoCo_cpp_: I don't believe so.
11:40 AM SoCo_cpp_: I pretty much tried frequencies until I found the bounds of where it does *something*.
11:41 AM SoCo_cpp_: * I should say, I tried duty cycles (of 50 Hz)
11:49 AM mrdata||: SoCo_cpp_, is it a hobby servo?
11:49 AM mrdata||: are you using a servo controller?
11:50 AM mrdata||: there is a specific interface
11:50 AM SoCo_cpp_: It is for helicopters or boat rudders...It seems to have nothing but terrible reviews. It is possible it is just junk, the more I read reviews.
11:50 AM veverak: SoCo_cpp_: servos are not controlled by the frequency of the PWM pulse
11:50 AM veverak: but it's length
11:50 AM veverak: 1-2ms is usuall range
11:50 AM mrdata||: you feed it a sequence of pulses of a certain width
11:50 AM veverak: at 60Hz
11:50 AM mrdata||: at a repeat rate of something like 1 kHz
11:51 AM mrdata||: i thought
11:51 AM SoCo_cpp_: Yes I'm getting a response at 0.5 to 1.4 ms at 50Hz
11:51 AM mrdata||: 50 Hz seems slow
11:51 AM veverak: ah, it's 50Hz
11:51 AM veverak: https://en.wikipedia.org/wiki/Servo_control
11:51 AM veverak: :)
11:52 AM veverak: mrdata||: it's made for human control, you do not really need a faster response with silly old fumans
11:52 AM veverak: *humans
11:52 AM mrdata||: this control mechanism was invented for RC planes, to control the rudder andstuff
11:53 AM mrdata||: okay, "the neutral position is always around 1.5 milliseconds (ms) pulse width"
11:53 AM veverak: yup
11:53 AM veverak: "around" is crucial, you want some trim mechanism to adjust the center usually
11:53 AM mrdata||: shorter than 1.5 and it will move one way, longer it will go the other
11:53 AM mrdata||: to its position
11:54 AM SoCo_cpp_: I think mine might just be broke. It doesn't do anything above 1.4 ms duty
11:54 AM SoCo_cpp_: and it just continuously spins, but the documentations says 90 degrees one way and 90 the other way.
11:54 AM mrdata||: SoCo_cpp_, you may have mashed the gears
11:54 AM SoCo_cpp_: there are so many bad reviews for these.
11:55 AM deshipu: I think they are the second most cloned ones, after sg90
11:55 AM mrdata||: i took one of these apart after it did that, and found one of the gears was plastic and was ruined
11:55 AM deshipu: the "real" ones are all metal
11:57 AM mrdata||: "Most RC servos move to the same position when they receive a 1.5 ms pulse every 6 ms (a duty cycle of 25%) as when they receive a 1.5 ms pulse every 25 ms (a duty cycle of 6%) – in both cases, they turn to the central position (neutral position). With many RC servos, as long as the refresh rate (how many times per second the pulse is sent, aka the pulse repetition rate) is in a range of 40 Hz to 200 Hz, the exact value of the refresh rate i
11:57 AM mrdata||: s irrelevant."
11:57 AM deshipu: it could also be that the pot is broken
11:57 AM deshipu: so it's always moving the same direction
12:58 PM veverak: https://hobbyking.com/en_us/turnigy-d2836-8-1100kv-brushless-outrunner-motor.html?___store=en_us
12:58 PM veverak: I have this thing
12:59 PM veverak: what do you think
12:59 PM veverak: can I rotate the shaft 180 degrees?
01:11 PM SoCo_cpp_: just for an update, I cracked open that servo motor at lunch. Gears are all metal and look good. There is no POT or adjustable pieces. I'll inspected it better later.
01:25 PM deshipu: veverak: since it's a motor, it should rotate all the way...
01:25 PM deshipu: veverak: thought the moment will be bad at small speeds
01:25 PM deshipu: though
01:25 PM veverak: why do you think?
01:25 PM veverak: I need motor with mounting on the side of the shaft
01:26 PM deshipu: you could use it to build something like https://hackaday.io/project/157812-3d-printed-robot-actuator
01:26 PM veverak: https://www.youtube.com/watch?v=4jSix3rUI2E
01:26 PM veverak: anyway
01:26 PM veverak: it can be done
01:26 PM SpeedEvil is now known as Guest91662
01:28 PM deshipu: ah yes, you can also completely replace the shaft
01:29 PM deshipu: with a longer one that sticks out both sides
01:30 PM veverak: yup
01:30 PM veverak: but not needed
01:31 PM deshipu: I didn't understand what you mean by "rotate"
01:32 PM veverak: :)
01:32 PM veverak: got rc boat
01:32 PM veverak: hmm
01:32 PM veverak: 35cm long boat with 2x300W motors?
01:32 PM veverak: well, let's call it a plane than
01:32 PM deshipu: a rocket
01:33 PM veverak: a plane
01:33 PM deshipu: a torpedo maybe?
01:33 PM veverak: it should tow a bigger ship
01:33 PM veverak: I suppose it can fly to it and than pull it away
01:33 PM deshipu: that's called a tug
01:33 PM veverak: tugs do not fly
01:34 PM deshipu: https://en.wikipedia.org/wiki/Space_tug
01:34 PM veverak: oh
01:34 PM veverak: so they do now
01:34 PM veverak: I see
01:35 PM deshipu: https://magazine.artstation.com/wp-content/uploads/2014/07/140708_PP_tug_space_assemble2_large.jpg
01:36 PM veverak: cool design
01:36 PM deshipu: that guy makes a lot of nice spaceships
01:37 PM deshipu: Paul Pepera
01:37 PM veverak: cool!
01:37 PM deshipu: https://www.artstation.com/paulpepera
01:38 PM veverak: NICE!
01:40 PM deshipu: not super realistic, but at least some consideration of the actual space requirement and engineering has been done
01:50 PM BitEvil is now known as SpeedEvil
01:55 PM veverak: hmm
01:55 PM veverak: I found stupid way to solve IK
02:03 PM deshipu: simulated annealing?
02:04 PM veverak: deshipu: I have a graph
02:04 PM veverak: where each vertex is configuration of leg
02:04 PM veverak: and I have code for forward kinematics
02:04 PM veverak: => find vertex with closes forward kinematics and use that
02:04 PM veverak: :)
02:05 PM veverak: reason for this hack?
02:05 PM deshipu: yeah, and that's pretty much the only way to do it when you also have torque and acceleration limits
02:05 PM veverak: I have code for 'N' dimensions
02:06 PM veverak: or, N joints of the leg
02:07 PM veverak: and what i need si to detect, if there is a configuration of leg, which tip is at point 'P', which is NOT in collision with environment
02:07 PM veverak: so go through all vertexes, filter the ones which are 'close enough' to 'P', and one of them has to be collision free
08:05 PM rue_mohr: SoCo_cpp_,
08:05 PM rue_mohr: the ouput shaft of the servo should turn a potentiometer that provides the feedback for the position
08:05 PM rue_mohr: if you want, I have avr code to control the servo position
08:05 PM rue_mohr: 50Hz, 0.5 to 2ms
08:06 PM rue_mohr: (the normal rating is for only 90 degrees of its movement)
08:32 PM rue_mohr: LM321
10:37 PM Luminax is now known as Nackpacket
10:37 PM Nackpacket is now known as Luminax
10:52 PM rue_mohr: hahah I take a picture of the inside of the fridge as the first image every year
10:52 PM rue_mohr: and those almost empty ketchup bottles are WAY too old
10:58 PM mrdata||: i refilled the mustard bottle
10:58 PM mrdata||: with home made mustard
11:06 PM rue_mohr: ok, force feedback servo
11:06 PM rue_mohr: ok
11:06 PM rue_mohr: oh I was upposed to test this...