Thanks. I was trying to mimick the real life principle of operation. This model does not have the range or accuracy of yours. A good clockmaker like rangycrow could probably do a nice job on the internal mechanism.
If you make a metronome that uses the pendulum principle, then I will delete my scene. Feel free to use any of my ideas. You may be able to improve on my weight sliding system (maybe a scripted stiff spring actuator), those ugly springs (maybe with a hinge bendConstant), or the method of adding energy (maybe by using restitution, script, or an escapement).
1. Save tach in components folder.
2. Start a new scene.
3. Drag tach from components folder into scene.
4. Delete big "Two-hinge..." text box.
5. Drag lower half circle cover off the tach.
6. Create a circle.
7. Add a center axle.
8. Move circle and axle over the center of the tach.
9. Select only the circle and drag it to the left. The axle should "stretch".
10. Add a center axle to the circle.
11. Move the half circle cover back onto the tach.
12. Select stretched axle. Right click.
13. Script menu > autoBend = true, bendConstant = 1, hingeConstant = 1e-007.
14. Select left axle (select circle and axle then: selection > select > select axles). Options - axle: Motor = check,Motor Speed = 350 RPM, Motor torque = +inf.
I gave this a 10 because it appears to be an original idea. In my opinion, only a small percentage of the scenes in algobox (mine included) contain original ideas.
I reset Algodoo and it still works fine for me. Do you get a sine wave at the amplifier output? If so, then it is working. The amount modulation is not much (about 7%), so you won't see it on the modulator output signal. The phase detector is an exclusive-OR (XOR), so its output is a pulse width proportional to the phase offset. I tried greater modulation and detecting it with a phase locked loop, but was unsucessful.
Q: Where did you learn that mouseover trick?
A: My idea.
Q: Is there a tutorial in the forum?
A: No.
Details:
Mouseover trick created thru necessity (How do you adjust 25 axles?), geometry (How far is the mouse from the axle?), and trial and error (How do I turn the axle motor on or off?). Axles can be used in other scenes providing the two functions listed in the description are entered in the console.
That is a good idea. In the real world memory is cheap, but time is not cheap. Eliminating dead time would make the robot movement more efficient. The only downside I see is if you were timing the movement to work with another process.
Feel free to make any changes you like. The only thing is, I may steal them and use them in future revisions. This way we can build on each other's ideas.
In order to make the idea work you probably need to determine when none of the motion keys are being pressed. The "Key Down/Up Phunlet" shows one way to do this.
The reason for this is because if autoBrake == true, then if the wheel takes a hard hit, the strut may be permanently tilted. Using bendConstant = +inf allows the strut to always spring back parallel to the guides.
P.S. It appears that in this example it does not matter. When I tried this concept in another application the brake slipped (even with motorTorque = +inf) and the sliding element angle changed. Using bendConstant, the sliding element angle did not change.
Q: Have you given this much thought as to whether or not the playback should be the same speed as the record speed?
A: No. At first I had them the same speed, but then I thought that the faster the playback the better. The code that sets the speeds is here:
Q: ...basic theory of operation?
A: Four angles define the position of the robot arm. These angles are calculated based on user inputs. The angles are periodically saved when recording.The angles are set during playback. The angle variables reside in the bendTarget property of each joint. The angle calculating code is in the green x,y box. The recording and playback code is in the brown action box.
Xray - Since you got me thinking about eliminating dead time, I decided to give it a shot. I was able to do it with few changes, but I will wait a while in case you wish to post your solution first. I created a variable scene.my.moving that is true while the robot is moving. I then ANDed scene.my.moving to the read code like this: "_rwState == "read" && scene.my.moving ? ..."
Xray - I'm finished playing with this for a while. I will not be adding textures any time soon. Feel free if you would like to spiff it up. I'm more about function than looks. Compare my Wall & Edge Sense Car to ravenplucker's Edge-sensor bot and you will see what I mean.
He dances real well for somebody who is not really "light on his feet". Your grandkids must get a laugh out of this one. You can clone "Disco Dan" if you like synchronized dancing. Maybe somebody will do Michael Jackson.
Looks good and works well so far. I probably won't try to modify this scene any time soon.
I was looking at the code and noticed that the x and y values are stored in a 1-dimensional array. It looks like you may have originally tried a 2D array, but it didn't work out. What happened?
A future enhancement would be to add an x-y stage from a top wiew and a z stage from a side view. You can use ideas from X, Y, Theta Stage if it helps.
On my PC it looks like a draw; they either both get stuck on the gold box or they both fall off. At any rate, I upgraded my original Contest Ender Ender scene to handle your bot. Looks like you better get back to work.