Help with joint springs
Thanks! =D
Thanks! =D
You want a joint that has no degrees of freedom. In this case, the two entities that it joins are welded together as if they were one object with no springing or wobbling.
You can use the joints created in entities.cs for the KukaLBR3 arm as an example. These joints have a single degree of freedom unlocked (Twistmode). Create a joint in a similar way but leave the Twistmode locked.
JointAngularProperties commonAngular = newJointAngularProperties();
/* remove these lines to create a fixed joint
commonAngular.TwistMode = JointDOFMode.Free;
commonAngular.TwistDrive = newJointDriveProperties(
JointDriveMode.Position,
newSpringProperties(500000, 100000, 0),
1000000);
*/
jointInstance = PhysicsJoint.Create(newJointProperties(commonAngular, null, null));
-Kyle
* - joint connection point If I apply upward (Y) force to box1 then box2 wobbles. I want box2 to be perfectly rigid and level with box1 at all times (i.e. no dipping), but I also want box2 to be able to slide along the linear joint if I apply a drive velocity to it (via the PhysicsJoint.SetDriveVelocity() function). So, imagine a completely unbendable metal rod connecting box1 and box2 that box2 can slide across. This is what I meant in my question, and I apologize for the confusion. Is what you suggest going to do this for me? Thanks! =)
_ _
| 1|*-| 2| ^
- - |
Y
X->
Thanks! =)
Eric, for a linear joint all twist degrees of freedom must be locked. Then unlock one linear degree of freedom (one translation axis). Then set the LinearDrive properties, and specify spring properties etc. The Kuka entity uses Angular properties, you need to use Linear properties.
The JointProperties data structure is documented (you should be able to find its documentation in VS, if you installed CTP2, with the VS help).
Let me know if you need more specifics.
When I say it "wobbles," I mean that it actually briefly dips below the linear joint when I move the connected object up. It move slightly below where the linear joint is. I can see the yellow line denoting the spring of the joint.
I want to make that spring completely rigid, unable to "wobble" at all, ever, under any condition.
Thanks for being patient with me =).
Eric, you are doing everything fine then. We have noticed this "wobbliness" with ageia joints as well. Not much we can do beyond the following workarounds:
1) set SolverIterationCount on all the entities involved to 255
2) Increase the relative mass of the objects. If the "anchor" is really heavy (or better yet IsKinematic == true) things will be less wobbly
3) set the spring coefficient high, which will ofcourse have other sideeffects but they might be ok to live with
4) avoid stacking the joint objects on surfaces that themselves are dynamic (mass != 0)
thanx
g
SolverIterationCount = 128 seems to be the best solution for me at the moment, it helped a bit, increasing it from 64.
It's strange, though. No matter what I do, one joint seems to act strangely every time.
So, this is a 3D view of something I'm making: * - where the joints are connected from box1 Box 1 connects to boxes 2 and 3 via two different joints (1->2, 1->3). Each of the joints are linear and the motion is limited to the X axis only. Also, they can only travel 1 meter along the joint in either direction. Now, if I set the SolverIterationCount too high, the box2(right) begins to shift to the right while box3(left) remains stationary. So, I easily just don't set SIC too high. But, when box1 is going up and down, box2 shifts along the joint a little while it's moving up with box1, and then pops back into its original spot when box1 stops moving. box3 remains stationary the whole time. It's really goofy. This also affects how fast the objects move along the joint when I set the drive velocity. It's almost as if box1 were slanting slightly, causing the joints to go crooked. I think this has to do with the springy joints that AEGIA loves, but I just thought I'd check if anyone else noticed this behavior and if anyone has any work arounds. Thanks! =)
__
| 1 |
-- ^
|
Y
__ __ X->
| * | | * |
-- --
The robot entity i'm working on involve many angular joints and I cant seem to stop the passive DoF "free pins" (only twistmode freed, no drive) from wobbling. The yellow line connecting two joint points on the entities keeps appearing.
I'm wondering: given that a joint is like a constraint, and given that I have freed only its twist-mode, how can it become unstable in other modes (coming apart). Note that coming apart doesn't mean 2 entities get disconnected, it's like they're wobbling trying to get back in contact but they can't.
I have tried to set either of Maximum Force or Maximum Torque to "0" as Kyle suggested before but nothing worked.
I'm sorry for bringing up this problem again but my project may not proceed if I cant fix this angular joint-wobbling problem. I really need help.
The simulation in MSRS looks fantastic with all the features, so I dont want to abandon my project with just this small problem.
Isn't there a way to just keep a 2 joint's entity-connectors together, when the masses of my joint connectors are not that unreasonable.