Example in Posa et. a. 2013: A direct method..... #531
Replies: 5 comments 2 replies
-
|
That should be a nice test problem. Isn't there only one set of c1 and c2 where the distance is minimal? I am curious how you found the function If you derived it only from the condition of parallel tangents, you could also be getting the maximal distance. Perhaps it is easy to see which one is the minimum. |
Beta Was this translation helpful? Give feedback.
-
|
Actually, I found it by discussing with chatGPT; I made a plot to see if it did give the minimum distance, and found that it does, depending on the initial guess for scypy.root. With a bad initial guess it would give some other distance. The minimum distance depends continuously on the locations of the ellipses, so I thought this would work. I do not know, whether this is the problem, I just do not know what else it might be. NB: |
Beta Was this translation helpful? Give feedback.
-
|
I finally managed to get it to converge for certain initial conditions. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! :-) I doubt it for these reasons:
NB: I am thinking about a similar taks for opy, but using discs instead of ellipses, then the distance function is trivial. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, they say so, but they give no details. My doubt comes from this: Here even the ''tanh version'' did not converge for most initial guesses I tried. I think in my simulation the problem is what they call They do not say, how to get the force when the two ellipse collide. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am playing around with the example of two link fingers as shown as figure 3 on page 12 of the a.m. paper.
I simply cannot get it to converge, and I use the 'smooth function' approach, not the slack variable one.
I model the impact as a strong linear spring, I guess o.k. if the bodies are made from e.g. steel.
Central to the problem is what they call$\phi(q)$ the closest distance between the finger ellipse and the (green) target ellipse.
$\phi(q)$ is some complicated nonlinear equation with at least two solutions. (if c1, c2 are the points of the ellipses where the distance is minimal, then a necessary condition is that the tangents at c1, c2 be parallel. There are therefore at least tow possible solutions).
Call this equation distance. So I add distance to the equations of motion : eom = eom.col_join(sm.Matrix(distance)
My question:
Could it be that the non-uniqueness of the solution of distance could cause the problem with convergence?
(it is so simple mechanically that I cannot come up with another reason)
NB: to make sure, my eoms are correct I simply integrated them, The motion looks as per expectation.
Beta Was this translation helpful? Give feedback.
All reactions