Code Monkey home page Code Monkey logo

adaptivemerging's People

Contributors

eulaliecoevoet avatar otmanon avatar paulkry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

adaptivemerging's Issues

Bouncy bodies

I have noticed some unwanted occasional bounce effect... (even if the restitution is zero)

RigidBody contactlist

RigidBodies have a BodyContact list, and the body contacts have the contacts, so we don't need a list of contacts in the rigid body. There seems to be a half dozen places or more where this is maintained, and otherwise unused, so an easy candidate for cleaning!

Pinning to the inertial frame might not be such a bad thing after all?

Two options. We can merge everything into one clump if they are connected by the same body... (i.e., in the inertial frame), or we can try to keep them into different merged islands, but in the inertial frame.

I think it is easiest to consider simply merging pinned bodies into the collections and seeing what happens! I think it will simply work!! Just want to make sure that the velocity of the merged body is zero, and perhaps propogate the pinned property up to the RigidCollection. COM doesn't need to be set or changed, while minv and jinv for the collection are simply zero.

How to run src/mergingBodies3D/LCPApp3D on Mac OSX?

I'm looking forward to trying this demo. Thank you for sharing the code.

The README.md mentions running the app src/mergingBodies3D/LCPApp3D. I can't find that file. I do find src/mergingBodies3D/LCPApp3D.java, but it's been a long time since I've compiled/run java code.

I tried issuing javac src/mergingBodies3D/LCPApp3D but I got 100s of errors.

What's the right way to build/run the 3D demo?

Colours for merged collections: different from those that are adjacent

I'd like to see a version of merged body colourings that uses random hues. I'm not sure if it matters so much if the colours randomly change on merging and unmerging... but if we cared to try to make some temporal consistency, then a merge could always preserve the colour of the larger collection, and same for unmerging.

Merging of bodies must be done more than 2 at a time...

See the new jam*.png examples. If two objects merge with a single contact, propped up by a 3rd body, then when they merge, they become rigid, and the external contacts will not stay fixed to keep everything in static equilibrium. I wonder if this can happen in a wider variety of cases? Best initial fix would be to merge anything ready to merge in one go, but perhaps we'll need to walk the graph and detect properties? To discuss!

basic merging critera based on relative velocity?

Two issues here... one is my general uncertainty as to using relative velocity as a merging criteria, or if we can't monitor a relative velocity energy. Should probably look like

v^T (J M^{-1} J^T )^{-1} v

Where J maps the two bodies to a combined COM frame, and v has the relative velocities computed in this frame.

Anyway, the other issue is that in watching the spinner, while the linear velocity was what was keeping the bodies from merging, I was surprised to see that the angular velocity had a fairly large mis-match, on the order of 0.01 rad/sec. Perhaps 1000 PGS iterations is not enough? Might be worth another look to see if this kind of innacuracy is expected, perhaps using a spinner with larger blocks?

Use contacts (in collection) for warm start after unmerge

Contact jacobians for those contacts that live within a collection need to be updated for the single cycle PGS touch-up solve, but likewise, those forces on an unmerge serve as a good warmstart. This needs some careful bookkeeping.

unmerging at contact level instead of body level

When lifting a sub stack in a bigger stack... the contacts that go down to zero force with the single step PGS should become active, and the rigid collection graph should be split in 2 on this "edge".

Or... will this cause a problem in a more complicated jumble, if the top is still rigidly connected to the bottom through different internal constraints!? To discuss!

Merge with pinned body

When we merge with pinned a body, there are still some problems with the jacobian of contact. See example jamTest.png

Clean Spring class

A spring is only between a point in a body and a point in the world. Seems like there are too many members.

Incompatibility between current pruning and contacts in collection update

When you have this configuration:

Capture1

Capture

The contact pruning between the collection and the pinned body makes the update of the contacts in collections wrong.
We are using these contacts as external forces, when updating the contacts in collections.
While in this example, the third contact we just lost is important for the update...

It requires another approach for the pruning. Like doing the actual pruning by looping in the collection bodies?

Threshold / count for merging/sleeping is strange?

Dropping the count to 10 from 50 didn't work. What's going on? I know there was a monotonic portion to the criteria, which might be something we would also want control over (i.e., include or not). Likewise, we might also consider a merge when all contacts in a body pair have had stable contacts with forces within the friction cone over a given time period.

Bodies going airborn on spring platforms

mobile.png and simple7.png show examples where a stack of a few blocks lands on a springy platform. The platform bobs up and down, and perhaps it does achieve near weightlessness at the top of the trajectory, but the springs drawn suggest that the bottom block has never stopped receiving an upward force. Is the behavior correct? Might be based on the symplectic integration and the starting state given no global viscous damping! Worth a closer look.

PGS optimization

Move the diagonal entry computation Dii and Aii in Erleben's paper, called JMinvJt in the code, along with b, outside the iteration loop as they are constant. They should be stored in the contact rather than making an array.

Warm start efficiency

Not a big issue, but I have been thinking about how the warm start check that blocks and bodies match for a contact in the last time step with one identified in this time step involves building a string and a string compare, as opposed to checking the object IDs.

Another thought is that with the BodyContact objects (can this name be refactored / improved) storing information on the contacts between two rigid bodies, it can be a faster map lookup to check only those for the same pair of contacting bodies... Perhaps a silly optimization given that hashmaps and treemaps are so fast. And there are much bigger fish to fry.

lambdas inside contact

Instead of storing lambdas in a vector, allocating these vectors, and keeping contact indices, can we just let these values live inside the contacts? Not a bug, but certainly something that will help prevent bugs!

Impulse testing with shift left click drag?

Mouse springs provide gentle interaction for manipulating simulations, but it might be interesting to test impulses (much like momentary collisions) to see how it influences the unmerging rules.

singleContactMerge.png needs gentle viscous damping?

currently, this example will merge after a long time.. about 200 seconds? Was it just luck? should it really have merged? That said, might be nice to expose some very gentle viscous damping parameters to slow everything down by a small factor (e.g., 0.999 of current linear and rotational speed, or 0.99, or something smaller)

Compliance and stiffness feedback

I'm having a hard time understanding the effect of the compliance and stiffness feedback on the internal contacts resolution. Everything works very well if we set the parameters to zero. Maybe it's a bug, but if so I cannot find it...

Apply results of one iteration PGS to unmerged bodies, all the time?

I think we should come with a strategy for that because, we need this feature to correctly solve
collision/impact, yet it can lead to unstable configuration if we apply these cheap results
all the time?
What about applying these cheap results only if the relative velocity is twice (or something else) the threshold? or if we notice big and fast change?

Cheat sheet in interface...

There are a number of keys in the keyboard interface, and likewise, if the mouse interaction starts to have shift/alt/control or whatever for doing different things for mouse interaction, then we should have a simple help jTextPanel to list what's what... I can drop in some code for this.

Visualize deltaVs in single iteration PGS

Important to understand what's going on with the delta v unmege test. Are we correct to compare the single cycle PGS velocity updates with the current merged collection velocity, or should it be the velocity at the next time step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.