Back
[00:02:11] <Jak_o_Shadows> Bloody floating point numbers
[00:04:47] <Jak_o_Shadows> I'm getting an error in the order of 10^-4 . But this error is about the same as my desired error bounds on the whole process
[00:09:08] <mrdata> design your code to be less sensitive to arithmetic error?
[00:09:40] <mrdata> or extend the precision of your numbers?
[00:11:43] <Jak_o_Shadows> I'm not sure how to make it less sensitive. The nature is that I need to deal with small numbers, and trig functions
[00:12:08] <Jak_o_Shadows> I don't want to extend the precision, cause it has to go on a uC, and space might be tight anyway
[00:14:13] <mrdata> how many small numbers?
[00:16:53] <mrdata> trig functions do interesting things when you have small angles
[00:17:29] <mrdata> https://en.wikipedia.org/wiki/Small-angle_approximation
[00:17:44] <Jak_o_Shadows> I'd be tempted to say literally everything. But um, a few. Um.
[00:17:53] <Jak_o_Shadows> yeah, I am well aware of the small angle approximation :P
[00:19:13] <mrdata> if you have only a few numbers, perhaps table lookups are your friend?
[00:20:44] <Jak_o_Shadows> How does math.h do trig calcs anyway?
[00:20:54] <Jak_o_Shadows> Cause yeah, a lookup table may be better on a uC anyway
[00:21:58] <mrdata> in standard C, trig operates on double-precision floating point numbers. uses rather a lot of steam
[00:22:09] <mrdata> as far as uC are concerned
[00:22:49] <mrdata> internally i believe the functions are using taylor series
[00:23:33] <Jak_o_Shadows> oh yeah. Coolies.
[02:44:03] <z64555> performance of stdlib cmath functions is reliant on how good the library is
[20:31:05] <z64555> oh
[20:31:46] <z64555> Jak_o_Shadows: I think if you set the floating point precision to "fast" the lookup tables are used instead of using something like the taylor series
[20:32:08] <z64555> it'll still be double-precision, though
[20:33:17] <z64555> You could probably make a table generator program on your PC and have full control of the precision
[20:33:46] <z64555> and then have lookup's and lerp's on youruC program
[20:34:35] <z64555> End result is that you'll have control over the size of the lookup tables vs. precision
[20:34:54] <z64555> execution speed would be about the same regardless of table size
[20:37:25] <z64555> If you're using an OOP language, you could even abstact it so as to create a table for any data type you might cook up
[20:38:28] <z64555> and for extra fanciness, you could have the same generator program test the accuracy of the resulting table
[21:23:33] <Jak_o_Shadows> z64555, I might talk to the guy who wrote the matrix & vector stuff I'm using
[21:23:46] <Jak_o_Shadows> First, see if he has any ideas, second, get him to do it for me.
[21:23:56] <z64555> lol. you might have to pay him
[21:25:33] <codepython777> Does anyone sell a H frame based on C -channels that can accomodate good motors / gears ? (preferably alum/alloy - light)
[21:26:31] <Jak_o_Shadows> aha. Not me, someone else :D
[21:28:25] <codepython777> Jak_o_Shadows: have you used vex?
[21:28:34] <z64555> H-frame? similar to a car, right? just curious
[21:29:13] <Jak_o_Shadows> Haven't used vex.
[21:29:22] <Jak_o_Shadows> MayTec is nice
[21:30:51] <codepython777> Jak_o_Shadows: are they expensive? no prices on their website
[21:30:58] <z64555> I'd use a box channel for the center beam, I feel like it would have better characteristics
[21:31:43] <codepython777> Let me draw something :)
[21:33:16] <z64555> have a cable or strap form a trangle at the two axles/arms
[21:33:20] <z64555> each
[21:33:37] * z64555 overbuilds it a bit
[21:33:42] <codepython777> https://snag.gy/GMc4nb.jpg
[21:35:08] <codepython777> z64555: Any thoughts?
[21:35:39] <z64555> I don't quite get what you're going after
[21:35:41] <z64555> sorry
[21:36:03] <codepython777> z64555: a simple 4 wheel robot with 4 motors on an H frame build on C-channels
[21:36:21] <z64555> H-frame or I-frame?
[21:36:27] <z64555> H-frame seems to be scaffolding
[21:37:06] <codepython777> k - you can also call the |-| frame
[21:37:17] <codepython777> but i want one leg to rotate around the middle connection
[21:37:40] <z64555> ok. Which direction is forward
[21:38:42] <codepython777> z64555:
https://snag.gy/xPMgjI.jpg
[21:38:47] <codepython777> its symmetric
[21:38:55] <codepython777> so any direction could be chosen to be forward
[21:39:17] <z64555> ok, it's an I frame then. :)
[21:39:46] <z64555> the center connection acts like a torsion spring
[21:40:10] <codepython777> k - I is a rotated H :) -
http://www.brookstone.com/nomad-4wd-off-road-chassis-by-actobotics/977907p.html
[21:41:16] <codepython777> z64555: something like that - but i want to build my own with my own motors. I dont like that one.
[21:41:28] <Jak_o_Shadows> Maytec is kinda expensive
[21:42:12] <z64555> Ok, now that one *is* and H frame.
[21:42:16] <z64555> lol.
[21:42:37] <codepython777> z64555: it does rotate around the small segment
[21:42:46] <z64555> Yeah, wondering why, though
[21:42:59] <codepython777> z64555: I want to build it myself with a C-channel
[21:44:43] <z64555> huh.
[21:45:14] <z64555> You can adjust the center of mass of the carraige, making it more stable at steep climb angles
[21:46:09] <codepython777> z64555: have you used vex? or something similar which is good for reliable design?
[21:46:20] <z64555> vs. I frames, where you can stabelize the carraige making it smoother in rough terrain
[21:46:24] <z64555> afraid not
[21:46:31] <codepython777> z64555: what do you use?
[21:46:53] <z64555> I build stuff out of raw materials, mostly wood at the moment
[21:46:58] * z64555 is a hobbyist
[21:47:30] <z64555> I can do some imprecise cold work of metal, I don't have access to machining tools
[21:51:05] <codepython777> Jak_o_Shadows: do you work with maytec pieces? How would you go about building what I am trying with their parts?
[21:52:45] <Jak_o_Shadows> well, Maytec has the connector things
[21:52:47] <Jak_o_Shadows> so it works ok
[21:53:05] <codepython777> Jak_o_Shadows: how do i build a H-frame using maytec parts?
[21:53:13] <codepython777> how do i attach my motors to the H?
[21:54:20] <Jak_o_Shadows> TBH, nowadays I would use 3D printed brackets
[21:55:32] <codepython777> Jak_o_Shadows: I'm looking to put 30 lbs of weight on this bot- 3d printed will break?
[21:55:58] <Jak_o_Shadows> eh, it's only a little bracket. So not if you design it right
[21:56:10] <Jak_o_Shadows> also, you could just get them milled out of ally if you find out they do break
[21:57:00] <codepython777> Jak_o_Shadows: That H shape will take 30 lbs of weight - you think 3d print will survive?
[21:58:39] <Jak_o_Shadows> I think that using 3D printed parts to attach your motors will
[21:59:33] <codepython777> Jak_o_Shadows: arent there nice channels that i can use to attach things?
[22:00:06] <Jak_o_Shadows> well, yes.
[22:00:10] <Jak_o_Shadows> But motors are normally round
[22:00:44] <codepython777> Jak_o_Shadows: what do you use maytec for?
[22:05:36] <Jak_o_Shadows> I haven't personally very much
[22:14:42] <codepython777> I've another proble
[22:14:48] <codepython777> some motors I buy have wobbly shafts
[22:15:01] <codepython777> they are not concentric with the shaft. Any ideas how to fix that?
[22:16:55] <z64555> wobbly shafts? what
[22:18:34] <z64555> is the rotor balance along the axis of rotation? do the motors vibrate a lot when spun up?
[22:19:54] <codepython777> z64555: the motors are attached to a metal bracket. The shaft is attached to a wheel. The wheel wobbles.
[22:20:41] <z64555> that could be the wheel, or the shaft is bent just ouside of the motor housing
[22:21:17] <codepython777> z64555: When I mount the metal piece on the shaft (hex piece) that already wobbles - no wheels
[22:22:06] <z64555> unmount the motor and have it run against a flat surface from differnt angles
[22:22:21] <z64555> If it causes vibrations, then the shaft is bent
[22:22:39] <z64555> If that's not significant, then the problem is with the wheel or the hub
[22:22:43] <codepython777> z64555: is there a video of what you are talking about somewhere? Perhaps youtube?
[22:22:58] <z64555> don't belive there is
[22:22:59] <codepython777> In my case the hub already wobbles. So its either the shaft or the hub
[22:23:01] <z64555> Ever use a dremel?
[22:23:06] <codepython777> yes
[22:23:23] <z64555> pretend the motor's a dremel
[22:24:19] <codepython777> I see
[22:24:25] <z64555> angles closer to perpendicular to the test surface will test the tip of the shaft for roundness
[22:24:44] <z64555> angles closer to parallel to the surface will test for straightness
[22:25:54] <z64555> uh. how big is this motor, by the way
[22:26:06] <z64555> if it takes two hands to hold it, then that test isn't going to work
[22:27:01] <z64555> In which case, take a pencil or toothpick and place it on the tip of the shaft as the motor is spinning
[22:35:18] <z64555> Uh, have the shaft rotating *away* from you when you do the pencil test
[22:35:31] <z64555> unless you like a toothpick jammed into your skin
[22:35:31] <Jak_o_Shadows> aha
[23:06:59] <codepython777> z64555: its a small motor
[23:13:36] <codepython777> who makes good motors for such applications?