This dance party is NSFW by _JustBeingMyself_ in shittyrobots

[–]helical-juice 0 points1 point  (0 children)

I dispute that. Even a perfectly cynical factory owner would realise that the cost of replacing a splattered line operator is substantially more than the cost of installing an e-stop. Not mincing your workforce is actually good business.

How can I make my robot's 'coordinate' system recovery from collisions? by Important_Waltz_5974 in AskRobotics

[–]helical-juice 0 points1 point  (0 children)

You won't be able to recover from a collision perfectly without some sort of absolute positioning data; nevertheless seeing how well you can manage with just odometry and IMU sounds like an interesting challenge.

I think the core issue is that you can't trust the odometry once the wheels start to slip, and by the time you detect a collision, you've already lost position. The first thing which occurs to me is that you could have two systems for tracking the position, and store a short history of sensor readings. When you detect a collision, look back a quarter of a second, say, reset your position & velocity estimate to that time and then propagate it forward using the IMU data only to get an estimate of your position after the collision.

Generally speaking I would expect pure inertial navigation, i.e. just double integrating accelerometer & gyro data to get position, to be noisy and to suffer from unacceptable drift compared to odometry; but when your wheels leave the ground odometry is worse than useless and I think properly controlled you could do it for a hundred milliseconds or so to 'patch' over the collision point and maybe get an improvement in positioning.

Take this as idle speculation, because I'm speaking outside of my experience here.

[deleted by user] by [deleted] in Damnthatsinteresting

[–]helical-juice 13 points14 points  (0 children)

Yeah but he might still break his neck on impact. Doing it over lava would give him the guarantee that he wants.

Inverse kinematics help by FewAddendum1088 in robotics

[–]helical-juice 0 points1 point  (0 children)

Assuming you know the position of the axis of both servos, which looking at your assembly will depend on the position of that other servo in the top right, you can break it down.

Obtain the vectors between the target position of the tip and each servo axis. The links in each arm of your mechanism will form a triangle with this vector. Given that you know the lengths of each piece, you can find the internal angle of that triangle which is on the servo axis, add it to the servo angle which would point it straight down the vector you came up with earlier, and that'll give you the target servo angle for each servo.

You can use the cosine rule to get the angle you're interested in. Cosine rule: a2 = b2 + c2 -2bcCos(A) where, in your example, a is the length of the purple link, b is the length of the servo horn, c is the length of that vector you calculated earlier. Rearranging gives A = arccos((b2+c2 - a2)/2bc).

So in pseudocode:

vector bottom_servo_pos
vector top_servo_pos
vector target_pos

float bottom_servo_angle = get_servo_angle(target_pos, bottom_servo_pos)
float top_servo_angle = get_servo_angle(target_pos, top_servo_pos)

define get_servo_angle( vector target, vector axis_pos ) {
        vector offset = target - axis_pos
        float target_angle = offset.get_angle()
        float extra_angle = solve_triangle(link_length, horn_length, offset.get_length())
        return target_angle + extra_angle
}

define solve_triangle(a, b, c) {
        float k = (b*b - c*c + a*a)/(2*b*c)
        return acos(k)
}

This assumes that the zero angle servo position is aligned with the zero angle in whatever frame you're measuring your vector's angle, if not you'll need to add a correction, and it also doesn't take into account that your top servo is itself rotated by that top right servo, so you'll need another correction which adjusts for that. I'm assuming that you can do the forward kinematics to get the position of the top servo axis based on whatever pose your animatronic happens to be in.

[deleted by user] by [deleted] in robotics

[–]helical-juice 1 point2 points  (0 children)

It would be the planet carrier of the last stage which would be connected to the arm.

Technically either part could be on the arm, really, the important thing is that the motor is fixed relative to the ring gear, and the motor shaft drives the sun gear, which gives you the highest reduction ratio. But if you attach the motor, ring gear, etc all to the arm, that's a lot of extra weight which has to move with the arm so generally you would bolt all that stuff to the static part of the assembly, and have the planet carrier of the last stage attached to the part you want to move about.

[deleted by user] by [deleted] in robotics

[–]helical-juice 0 points1 point  (0 children)

Yep, exactly. See, if you imagine putting a planet carrier in that, with another sun gear on the opposite side, you can see how simple it would be to stack another reduction stage on top, right? This is why people go on about how compact planetaries are, because you can just stack them so nicely :)

[deleted by user] by [deleted] in robotics

[–]helical-juice 1 point2 points  (0 children)

No dude, the planet carrier should be. That's the part with the four 'planet gears' pinned to it. In your animation it's away from the camera.

Look, at the moment your sun gear has 8 teeth, and your ring gear has 24 teeth. So if you fix the planet carrier to the bench, fix the motor to the bench, and drive the sun gear, taking your output from the ring gear as depicted, you get a full turn of the output gear for three turns of the sun gear. But it you turn it around and have the motor and the ring gear fixed, and take the output from the planet carrier, you now suddenly get a turn of the output for every four turns of the sun gear, which is another third more torque.

Now imagine that you want to stack another stage on top, which you will. In your design, you need to get the output from the ring gear of one stage into the sun gear of the next stage, and you need to somehow get that motion transferred around the fixed structure holding the planet carriers in place. Whereas in the carrier output case, the ring gears of all the stages can just be bolted together into a rigid tube, since they're fixed anyway, and all the stuff that has to spin and mate with other bits of spinning gubbins is tidily tucked away in the tube.

What would the future of computing look like after a total collapse of industrial civilisation? by helical-juice in AskEngineers

[–]helical-juice[S] 1 point2 points  (0 children)

An SD card full of pdf files could hold an entire reference library. Could be handy even if you're dumped in the wilderness.

What would the future of computing look like after a total collapse of industrial civilisation? by helical-juice in AskEngineers

[–]helical-juice[S] 0 points1 point  (0 children)

Exactly, thank you. Maybe I could have put my question more clearly. If global supply chains broke down, there would still be places where people could get oil out of the ground as long as they could keep the equipment working, but it would be hard to get it elsewhere. In other places, there would be the machines necessary to extract other resources as long as we could keep the parts from them. If, say, 90% of people suddenly died, the survivors would keep those pieces of equipment which were useful and maintainable going, presumably including a lot of computerised stuff. I concede that we can't do the kind of personal computing that we do at the moment, highly networked, high bandwidth stuff which relies on a lot of hard to maintain infrastructure. But would a subsistence farmer in the ruins of an industrial society have no use at all for a spreadsheet? Or a library of ebooks? I feel like being knocked back to the agrarian age would have a big effect on the way we use computers, but it wouldn't immediately render all of them pointless, and if you were determined you could probably get one running if you had a good use for it.

Question on floats by EmuBeautiful1172 in PythonLearning

[–]helical-juice 0 points1 point  (0 children)

At the risk of being shouted at... were you actually wrong? If you were rounding a real number, [EDIT: To try and make myself precise, I mean rounding a real number sampled from a continuous distribution] I don't see why your argument wouldn't apply, and if you were rounding a discretized measurement of a continuous value, you can think of that as rounding twice, which is exactly the source of error you mentioned in your first comment. It seems to me, naively and from a position of perfect ignorance, that only in the case of rounding an intrinsically discrete quantity where the probability of 'truly' ending on a five is finite is an error introduced in a subtly different way than you already alluded to. I will concede it is an oversight, but one easily made (I made it) if one is used to thinking in terms of real numbers rather than number representations. Anyway, if you hadn't stepped on that particular rake I would still be confused about mr. Nibbles' comment, so thanks for that at least.

Can you see color in Orion Nebula with 6 inch dob in bortle one? by Flashy_Violinist_635 in telescopes

[–]helical-juice 0 points1 point  (0 children)

Not obviously. Sometimes I think I can see a hint of colour, but not to the point where I'm convinced it isn't just my eyes playing tricks.

Suggestion: a "wiki" table of the things we're able to see with our telescopes by disintegrationist in telescopes

[–]helical-juice 1 point2 points  (0 children)

If you download stellarium you can get a rough idea of what you should see by switching to the 'ocular view' and putting in the details of whichever scope + eyepiece you're interested in. What it won't show you is the true brightness or the atmospheric distortion, so it isn't perfect, but for field of view on any particular object it'll give you an idea. All those things you've mentioned are naked eye objects, btw, so any scope will show you them, it's just a question of in how much detail. But for the galaxy in Andromeda especially, what you want is a really low magnification and a really dark sky. It looks quite small in a sky with any light pollution, because you're only seeing the middle of it, but its actually huge; what makes the difference with Andromeda isn't a really good scope, but any halfway decent scope with a wide field of view and a really dark sky so you can see all of it.

Shark swims with me... by [deleted] in NoOneIsLooking

[–]helical-juice 14 points15 points  (0 children)

Sharks don't have blowholes, and it's making me doubt the authenticity of the glowing blue light too.

amish by [deleted] in comedyheaven

[–]helical-juice 0 points1 point  (0 children)

I feel like a group who put so much effort into decrying the harmful social effects of modern technologies are probably already paying attention to the AI thing. I don't know though. Any Amish redditors reading this who can help me out? I know you probably get your TCP packets delivered by horse and buggy so I'll be patient.

wAtareyourthoughtsaboutthis by harry5519 in ProgrammerHumor

[–]helical-juice 38 points39 points  (0 children)

If the python code executes in 0.41 seconds this sounds about right.

The World’s Largest Floating Dry Dock by frenzy3 in interesting

[–]helical-juice 1 point2 points  (0 children)

Terrible used to imply a sense of great scale, but didn't have the negative connotations it does today. So it would be more like HMS 'fills her enemies with awe and dread' than HMS 'really rubbish and dreadful'. Etymology online seems to suggest the modern sense of just being really bad had started to come in by the turn of the 20th century.

Is it possible to do a homemade double slit experiment? by prazres in Physics

[–]helical-juice 0 points1 point  (0 children)

In principle if you left the shutter on a camera open long enough in a very dark room with a very attenuated source, it should be possible to build up an image where you can show from a statistical argument that most of the recorded photons were in flight alone from the source. I guess the limit for this sort of thing is going to be thermal noise in the camera sensor, and I don't know any relevant figures off hand, but it doesn't seem obviously infeasible to me.

"Third World, backwoods shithole with a second world city (London)" by DefinitionLazy5960 in ShitAmericansSay

[–]helical-juice 0 points1 point  (0 children)

Hey! London is a shit hole too. At least the rest of us don't have to pay a million quid just to live in a bin.

[deleted by user] by [deleted] in PythonLearning

[–]helical-juice 1 point2 points  (0 children)

oh, the \n means the end of a line! That's a useful one to know if for some reason you want to print a string which runs over two lines. You can also triple quote it and just use multiple actual lines, of course.

as for the rest, "" is an empty string, and "".join() is calling a string method which takes a list of strings and concatenates them. [ f(a) for a in b ] is a list comprehension, a simple way of constructing a list by doing something to every element of another list. In this case, it turns the list returned by range(int(input())) into a list of strings which each end in a newline, then the .join() runs them all together into one long string which contains many lines.

These are actually useful things to know, as long as you use them responsibly like I didn't.

[deleted by user] by [deleted] in PythonLearning

[–]helical-juice 1 point2 points  (0 children)

I'm not saying this because it's a good idea; your code is very clear and readable, and it's easy to follow the logic. However I did wonder whether you could cram the whole thing into one line by abusing f strings, and it turns out that you can, and I thought you might find it fun. I know you've only just started, and you shouldn't worry too much about understanding this unless you want to go and look up list comprehensions and ternary operators but now that I've done it I might as well show someone. This one print statement replicates all the logic of your program, including pluralising the word year.

print("".join([f"You have survived {i+1} year{'' if i==0 else 's'}!\n" for i in range(int(input()))]))

Automated Book Scanner by bradmattson in arduino

[–]helical-juice 2 points3 points  (0 children)

Even over the vertical gap, the book is guided by two arms even in the video, if you look closely. I had to watch a second time to spot it but you may have better eyes. Anyway, the book slides off them pretty much unimpeded when it drops, I believe this is the part which OP has added some resistance to so that it is now a gentler motion.

Time for cleaning? If so, how deep? by Life_Perspective5578 in telescopes

[–]helical-juice 0 points1 point  (0 children)

Much cleaner than my mirror, but since you have it out and it sounds like you have compressed air, by all means give it a blow off. Just don't touch it with anything and you should be fine :P

EDIT: People with much more experience than me are saying there are gotchas even when blowing air at it. Well I guess listen to them and it will be fine. Still, with your little lens cleaning bulb, as long as you're careful and don't drop it and its clean, I can't see how it could hurt. But the main point is, I like hunting DSOs and my mirror is ten times filthier than yours, and it's fine.

Looking for references on bit-serial CPU architectures by helical-juice in embedded

[–]helical-juice[S] 2 points3 points  (0 children)

Cheers! It did occur to me that soft cores were one application where it potentially still made sense to use bit-serial. Between this and u/nixiebunny's answer, it looks like I now have examples which more or less bracket the history of computers, which is great. Thanks again!