On 05/17/2013 02:22 PM, 杨洋 wrote:
> Hello guys!
> Long time no see. I used a model showed in SimCrane.png to make a Crane
> showed in Crane.png. When I made the arm go up and rotate,the box lagged
> behind the arm appreciably**while this would not happen in real crane.
> What will be the problem? And how can I fix it? I used a lot of bodies
> linked by slider joints to simulate the rope, is that a possible problem?
Yes it probably is. The problem is that the slider joint has a certain
tolerance, defined by its CFM and ERP parameters. There are two sets of
parameters. One is inherited by the world as set with dWorldSetCFM/ERP
and affects the tolerance of the slider itself, that is the tolerance in
axial misalignment of the attached bodies. You can perhaps treat this
as how much the slider itself can flex. The other set of parameters are
set on the joint and concern the stops and how much they can be
violated. These also initially inherit the world values I believe. I
assume you set both stops to the same value (zero probably) to make the
sliders which simulate the rope segments totally rigid but since the
load is rather large each slider stop is violated by a bit and the cable
stretches. Whether you can sufficiently deal with this problem depends
on the stability of your system but the first things to do would be to:
a) make sure you've compiled with double precision.
b) set either the stop ERP and CFM or the world ERP and CFM (depending
on whether slider flex would be a concern with you (I suppose not since
the slider simulate flexible cables anyway) to stiffer values. You can
use the formulas given in the manual to convert between spring stiffness
and damping and CFM and ERP. You can get specific ERP and CFM values
for some cable stretch stiffness and damping which would be more
intuitive to estimate. Try to fiddle with these until you can get
reasonable stretch without having the system explode.
D.
PS: Upon re-reading your question I wonder why you have a lot of bodies
linked by slider joints and not just one. Do you also use ball joints
to simulate a rope structure? In any case instead of using sliders
which are designed to allow extension along an axis you could look into
the double ball joint which was recently introduced into the trunk.
There's no documentation but you don't need much. It essentially
simulates a rigid rod with a couple of ball joints on its ends. Sounds
like exactly what you need, (assuming the never is any slack in the cable).