iMSTK issueshttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues2022-07-28T17:21:58-04:00https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/458Text Status Position Not Updated on Scene Pause2022-07-28T17:21:58-04:00Andrew WilsonText Status Position Not Updated on Scene PauseThe status text position is not updated when the scene is paused, it should always update on render. So if a user resizes a window while simulation is paused it will not move.The status text position is not updated when the scene is paused, it should always update on render. So if a user resizes a window while simulation is paused it will not move.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/457CCD On Scene Reset2022-07-28T17:21:31-04:00Andrew WilsonCCD On Scene ResetOn scene reset CCD does not invalidate the previous geometry/clear it/set to nullptr. So if the geometry moves it will see it as a large jump.On scene reset CCD does not invalidate the previous geometry/clear it/set to nullptr. So if the geometry moves it will see it as a large jump.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/456Pbd Rigid Body Haptics/Virtual Coupling2022-08-16T09:44:32-04:00Andrew WilsonPbd Rigid Body Haptics/Virtual CouplingWhilst pbd rigid body wasn't necessarily added for haptics. It is well suited for it provided some issues are worked out.
I tried the naive implementation of pbd haptics with virtual coupling. By using the external force one can sum int...Whilst pbd rigid body wasn't necessarily added for haptics. It is well suited for it provided some issues are worked out.
I tried the naive implementation of pbd haptics with virtual coupling. By using the external force one can sum into the velocity applied before pbd integrations positions at the start of its pipeline.
```
Compute Virtual Coupling Force from difference in positions and with velocity damping
Integrate Positions (apply force to velocity, and velocity to position producing newPos)
Modifying newPos
Compute velocity from change in position prev to newPos
```
For some reason this shows extreme instability compared to the rigid body. Why is not yet clear to me. There's some specific models for damping introduced in some pbd papers. It might be worth investigating those.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/455Needle Component2022-09-26T12:07:27-04:00Andrew WilsonNeedle ComponentWith the component MR we are able to add a needle component. Which can be carried around in a SceneObject without subclassing. This would be a good next step towards a general needle architecture.
ie:
```
class NeedleComponent : public ...With the component MR we are able to add a needle component. Which can be carried around in a SceneObject without subclassing. This would be a good next step towards a general needle architecture.
ie:
```
class NeedleComponent : public Component
{
public:
// Could be stored in component as well
virtual Vec3d getNeedleDirection() { return Vec3d::Zero(); }
virtual Vec3d getNeedleTip() { return Vec3d::Zero(); }
PunctureState punctureState;
};
int main()
{
SceneObject obj0;
auto needleComp0 = obj0.addComponent<NeedleComponent>();
PbdObject obj1;
auto needleComp1 = obj1.addComponent<NeedleComponent>();
RigidObject obj2;
auto needleComp2 = obj2.addComponent<NeedleComponent>();
}
```
This dissolves the need for NeedleObject in every example which is especially annoying when different subclasses are used. One can refactor the examples and leave NeedleObjects in but just have the NeedleObjects add a NeedleComponent. Additionnally interaction will need to use the component now to get things like tip, direction, etc.Andrew WilsonAndrew Wilsonhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/454CapsuleToLineMeshCD and SphereToLineMeshCD2022-08-10T15:41:14-04:00Andrew WilsonCapsuleToLineMeshCD and SphereToLineMeshCDCapsuleToLineMeshCD is important for thread to laparoscopic tool collision. Would be a great addition to imstk. Since SphereToLineMeshCD is so similar, it would also be nice to tackle.
- Thread on laparoscopic capsule collision.
- Line...CapsuleToLineMeshCD is important for thread to laparoscopic tool collision. Would be a great addition to imstk. Since SphereToLineMeshCD is so similar, it would also be nice to tackle.
- Thread on laparoscopic capsule collision.
- LineMesh ligament on tool collision.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/453Boundary Condition Handling Using Constraints2022-08-01T17:08:45-04:00Jacob MooreBoundary Condition Handling Using ConstraintsThe way rigid boundary conditions are handled normally in PBD is to set the inverse mass of a node to zero, making the mass infinite and therefore immoveable. While this works, it has negative side effects on collision, namely the solut...The way rigid boundary conditions are handled normally in PBD is to set the inverse mass of a node to zero, making the mass infinite and therefore immoveable. While this works, it has negative side effects on collision, namely the solution explodes if a user contacts near to or at a boundary point that is fixed. This is because collision constraints are expected to be solved exactly, and a small deformation near a fixed point causes a large deformation far from the fixed point along a constraint axis. This is a feature of the method, not a bug. There is currently a MR for a patch that will allow the solution to stay mostly stable under these conditions by ignoring collision constraints at and near fixed points.
A better long term solution would be to replace the current handling of boundary conditions with (zero inverse mass) with stiff constraints between boundary points and corresponding virtual points. That way the points are allowed to move slightly which *should* alleviate the explosion issue and still allow for contact constraints near a boundary.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/452Create a base class for common example functionality2022-07-22T08:26:24-04:00Harald ScheirichCreate a base class for common example functionalityThere are some basic functionalities that every example needs to to, it would be good if we can encapsulate them in a class or a set of functions, amongst others
- create viewer
- create sim manager
- create haptics interface etc
- sh...There are some basic functionalities that every example needs to to, it would be good if we can encapsulate them in a class or a set of functions, amongst others
- create viewer
- create sim manager
- create haptics interface etc
- show information text #442
and others
the Simulation Class from `osteotomy` can server as basis for thisJacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/451Simplify License in Header2022-07-28T11:11:17-04:00Harald ScheirichSimplify License in HeaderRemove copyright statement from the and add it to separate file, replace all license statements in sources with plain appache licenseRemove copyright statement from the and add it to separate file, replace all license statements in sources with plain appache licenseHarald ScheirichHarald Scheirichhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/450CMake option to build dependency graph (and maybe put it on nightly)2022-07-06T23:37:05-04:00Andrew WilsonCMake option to build dependency graph (and maybe put it on nightly)I find this graph occasionally useful. It is not too difficult to generate automatically with commands. I am documenting that here and suggesting adding it to the nightly CI.
On existing built repo in the build directory run:
```
cmake ...I find this graph occasionally useful. It is not too difficult to generate automatically with commands. I am documenting that here and suggesting adding it to the nightly CI.
On existing built repo in the build directory run:
```
cmake . --graphviz=graph.dot
```
On new build just append the graphviz bit.
Then on machine (ideally linux with graphviz installed, ) run:
```
dot -Tpng -o graph.png graph.dot
```
In the build directory it is useful to have a CMakeGraphVizOptions.cmake file with the following (else its too messy):
```
set(GRAPHVIZ_EXECUTABLES FALSE)
set(GRAPHVIZ_INTERFACE_LIBS FALSE)
set(GRAPHVIZ_MODULE_LIBS FALSE)
set(GRAPHVIZ_OBJECT_LIBS FALSE)
set(GRAPHVIZ_UNKNOWN_LIBS FALSE)
set(GRAPHVIZ_EXTERNAL_LIBS FALSE)
```https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/449Relative Velocity Virtual Coupling2022-08-29T16:03:02-04:00Andrew WilsonRelative Velocity Virtual CouplingThe virtual coupling in Otaduy's paper accounts for device velocity, relative velocity in damping. This doesn't make massively noticeable effects but would improve it.
Unfortunately many devices and APIs don't provide velocity for you m...The virtual coupling in Otaduy's paper accounts for device velocity, relative velocity in damping. This doesn't make massively noticeable effects but would improve it.
Unfortunately many devices and APIs don't provide velocity for you meaning you must compute the velocity yourself. What's more tricky is that it is dependent on dt and the device updates on a separate thread with differing update rates.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/448DeviceControl's as SceneObject2022-07-08T18:14:52-04:00Andrew WilsonDeviceControl's as SceneObjectSimilar to interactions. These should be become SceneObjects which represent function, and later components in an ECS. As of right now it allows intermediate/ordered functions from the controller to be defined in the SceneObject.Similar to interactions. These should be become SceneObjects which represent function, and later components in an ECS. As of right now it allows intermediate/ordered functions from the controller to be defined in the SceneObject.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/447CI Tasks2022-07-01T13:39:36-04:00Harald ScheirichCI TasksIn Order of importance
- [ ] Enable `IMSTK_WRAP_CSHARP` Windows (Linux optional)
- [ ] Enable Coverage Calc and Posting Linux Only
- [ ] Enable `IMSTK_USE_OpenHaptics` Windows Only
- [ ] Enable `IMSTK_USE_VRPN`In Order of importance
- [ ] Enable `IMSTK_WRAP_CSHARP` Windows (Linux optional)
- [ ] Enable Coverage Calc and Posting Linux Only
- [ ] Enable `IMSTK_USE_OpenHaptics` Windows Only
- [ ] Enable `IMSTK_USE_VRPN`https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/446Geometry To Collision Map2022-07-26T11:10:10-04:00Andrew WilsonGeometry To Collision MapNow that geometry inputs for CD is reversible, out of the constructor, you can create CD methods by name with the factory, and a number of more cases added, tested, and fixed. I think it would be a good time to introduce a map for geomet...Now that geometry inputs for CD is reversible, out of the constructor, you can create CD methods by name with the factory, and a number of more cases added, tested, and fixed. I think it would be a good time to introduce a map for geometry to CollisionDetectionAlgorithms applied in PbdObjectCollision such that users need to provide it and get a decent default.
We just need to provide a map of geometry types (ideally not geometry strings) to CD strings. But make sure to provide it as a default parameter such that it can still be replaced since a number of geometries map to multiple CollisionDetection strategies.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/445ConstantDensityConstraint Spatial Grid Policy Freeze2022-06-29T15:02:41-04:00Andrew WilsonConstantDensityConstraint Spatial Grid Policy FreezeThe current spatial grid uses a neighborhood size and resizes the grid when it changes if fluid explodes or gets shot off a bit the grid can increase immensely resulting in massive allocation and freezes. In an ideal stable simulation th...The current spatial grid uses a neighborhood size and resizes the grid when it changes if fluid explodes or gets shot off a bit the grid can increase immensely resulting in massive allocation and freezes. In an ideal stable simulation this wouldn't happen but it can be quite the time sink for a developer trying to figure it out since nan/inf isn't encountered first.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/444Epsilon in PointwiseMapper2022-06-30T09:06:09-04:00Andrew WilsonEpsilon in PointwiseMapperOn numerous occasions now we have run into the issue of importing a double TetrahedralMesh and float SurfaceMesh. Usually the original data was in double, the .msh file format supports double. .vtk supports double. But SurfaceMesh's ofte...On numerous occasions now we have run into the issue of importing a double TetrahedralMesh and float SurfaceMesh. Usually the original data was in double, the .msh file format supports double. .vtk supports double. But SurfaceMesh's often seem to be read in as 32 bit floats.
Then the PointwiseMap is used resulting in a static/unmapped SurfaceMesh. None of the points were found to be on the TetrahedralMesh because of its epsilon.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/443Pbd LineMeshToMeshCCD Handling Cancels Movement2022-09-28T15:52:25-04:00Andrew WilsonPbd LineMeshToMeshCCD Handling Cancels MovementI'm not sure if it's numerically correct or a bug but the current solution in pbdSelfSutureCCD appears to cancel out a lot of side to side movement as if the two lines in contact are frozen in place unaffected by outside things. Could th...I'm not sure if it's numerically correct or a bug but the current solution in pbdSelfSutureCCD appears to cancel out a lot of side to side movement as if the two lines in contact are frozen in place unaffected by outside things. Could this also be an effect more accentuated in PBD than a second order model?
This can be tested by unfixing the right end of the thread in the pbdSelfSutureCCD example and pulling the thread to the left or right.
Luckily for many use cases this is not important.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/442Screen Text Instructions on Examples2022-07-26T08:42:50-04:00Andrew WilsonScreen Text Instructions on ExamplesI've had at least 2 people now ask me if the program they just started was frozen when in reality the program just started paused and they need to press space to start (often nice for haptics). It could be useful and easy to add some tex...I've had at least 2 people now ask me if the program they just started was frozen when in reality the program just started paused and they need to press space to start (often nice for haptics). It could be useful and easy to add some textual info on screen for some examples to avoid this.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/441Change PointSet::getCellIndices() function to return share_ptr in place of ra...2022-07-20T17:43:58-04:00Shreeraj JadhavChange PointSet::getCellIndices() function to return share_ptr in place of raw pointerUpdate `PointSet::getCellIndices()` function and in `PointSet` and derived classes to return a shared pointer in place of a raw pointer.
Related to https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824.
See discussion: https://git...Update `PointSet::getCellIndices()` function and in `PointSet` and derived classes to return a shared pointer in place of a raw pointer.
Related to https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824.
See discussion: https://gitlab.kitware.com/iMSTK/iMSTK/-/merge_requests/824#note_1203524Shreeraj JadhavShreeraj Jadhavhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/440Debug Vertex Labels2022-06-28T17:35:58-04:00Andrew WilsonDebug Vertex LabelsA VisualModel that you could add that would display the numbering of the vertices would be very useful for debug. ie: VertexLabelVisualModelA VisualModel that you could add that would display the numbering of the vertices would be very useful for debug. ie: VertexLabelVisualModelhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/439Pbd Collision Benchmark2022-08-09T11:23:22-04:00Andrew WilsonPbd Collision BenchmarkA pbd collision benchmark could be really useful. I have, at many points, wanted to know if changes to code effected performance. But not all of our examples are representation of full usage as they don't produce many contacts.A pbd collision benchmark could be really useful. I have, at many points, wanted to know if changes to code effected performance. But not all of our examples are representation of full usage as they don't produce many contacts.