problem with double-spring function for revolute joint
I'm having trouble using this function:
set-double-spring with-strength 10.0 with-max 1.0 with-min -1.0.
The other joint functions work fine, so I feel like I'm using it correctly, but the body segment doesn't spring back no matter what strength or min/max values I use. thoughts?
»
Submitted by Astro21297 on Thu, 2006-07-27 14:52.
- Login to post comments

nevermind
set-joint strength also has to be set for it to work.
Not working for me.
I am having trouble with setting a double spring on a revolute joint. Setting the joint strength makes it go rigid (within the strength limit) so the spring can't work.
shoulder link parent robotbody to-child arm with-normal (1,0,0) with-parent-point (1,0,0) with-child-point (-.5,0,1.5) use-current-relative-rotation 1. shoulder set-strength-limit to 150.problem with double-spring function for revolute joint
Can anyone help me with the problem above? The code above produces a rigid joint. Leaving out the set-strength limit makes it rotate freely, but the double-spring doesn't then work. I have tried a number of work-arounds but none is satisfactory. It sounds pretty simple but I just can't see what to do. :(
problem with double-spring function for revolute joint
Hi Phil,
I'll have a look at the problem and see if I can figure it out. It would help me greatly if you could provide a simple simulation illustrating the problem. Perhaps a modified JointTypeExample demo.
- jon
problem with double-spring function for revolute joint
Here's the code I have been experimenting with. Assuming SI units, the 'arm' is a mass of 1kg at 10m requiring 98.1Nm torque on the joint to support it in position. With shoulder strength 99, the mass is supported. with shoulder strength 97, it drops slowly. With no shoulder strength, it drops rapidly.
The double-spring (commented out as shown) should give a natural droop of about 0.1 radian, but I was expecting the mass to be oscillating undamped around this point.
What do you think?
@use PhysicalControl. @use Link. @use Shape. @use Stationary. @use MultiBody. Controller simcontrol. PhysicalControl : simcontrol { + variables: rr3 (object). + to init: floor (object). floor = new Floor. floor set-eT to .9. rr3 = new robot. rr3 move to (0,3,0). self offset-camera by (25, 0, 0). self watch item rr3. self set-integration-step to 0.1. self set-iteration-step to 0.1. self set-gravity to (0,-9.81,0). print "---------------------------". + to iterate: rr3 debug. super iterate. } MultiBody : robot { + variables: bodyshape, robotbody (object). armshape, arm (object). shoulder (object). + to init: bodyshape = new Cube init-with size (6,6,6). bodyshape set-mass to 10. robotbody = new Link. robotbody set-shape to bodyshape. armshape = new Cube init-with size (1,1,1). armshape set-mass to 1. arm = new Link. arm set-shape to armshape. shoulder = new RevoluteJoint. shoulder link parent robotbody to-child arm with-normal (1,0,0) with-parent-point (0,0,0) with-child-point (0,0,10). # use-current-relative-rotation 1. # shoulder set-double-spring with-strength 981 with-max 0.001 with-min -0.001. shoulder set-strength-limit to 99. # shoulder set-joint-damping to 1. self set-root to robotbody. + to debug: print (shoulder get-torque)::y, ((shoulder get-joint-angle)*57.296). }