iMSTK issueshttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues2022-08-30T13:25:25-04:00https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/420SurfaceMesh deepCopy parameter2022-08-30T13:25:25-04:00Connor BowleySurfaceMesh deepCopy parameterNot necessarily a big deal, but it was unexpected to me that I can only deep copy SurfaceMesh's if the one I want to copy is stored in a `shared_ptr`. I would expect the signature to instead be `void deepCopy(const SurfaceMesh& srcMesh)`...Not necessarily a big deal, but it was unexpected to me that I can only deep copy SurfaceMesh's if the one I want to copy is stored in a `shared_ptr`. I would expect the signature to instead be `void deepCopy(const SurfaceMesh& srcMesh)`, as there is no true requirement that one can only copy 1) surface meshes that are specifically stored in shared pointer, and 2) non-const surface meshes (as the current parameter is `shared_ptr<SurfaceMesh>` and not `shared_ptr<const SurfaceMesh>`.
As an aside regarding a comment in the code for deepCopy, `\todo: generalize base classes and implement for every geometry`, please consider using a clone approach rather than a deep copy approach so it will work nicely with class hierarchies. You wouldn't really be able to implement `void PointSet::deepCopy(const PointSet& src)` because I could do something like `surfaceMesh.deepCopy(lineMesh)` and that can't happen (yes, you could detect this at runtime and throw and exception (or do the VTK method and silently ignore it), but ensuring the type safe clone can always happen is better). However, doing `surfaceMesh.clone()` or even `pointSetThatCouldBeASurfaceMesh.clone()` is always well defined.
Also, should you go the clone route, I found this a neat way to fake covariant return types with smart pointers.
https://www.fluentcpp.com/2017/09/12/how-to-return-a-smart-pointer-and-use-covariance/
For reference:
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c130-for-making-deep-copies-of-polymorphic-classes-prefer-a-virtual-clone-function-instead-of-public-copy-constructionassignmenthttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/108investigate Tansel work on shaders to bring back in VTK2019-03-19T15:51:27-04:00Alexis Giraultinvestigate Tansel work on shaders to bring back in VTKLook into work by Tansel and integrate what's missing:
https://gitlab.kitware.com/iMSTK/iMSTK/commit/bc8bb622222ad9c6c83e64323c07274a9fddd3f9
https://gitlab.kitware.com/iMSTK/iMSTK/merge_requests/61Look into work by Tansel and integrate what's missing:
https://gitlab.kitware.com/iMSTK/iMSTK/commit/bc8bb622222ad9c6c83e64323c07274a9fddd3f9
https://gitlab.kitware.com/iMSTK/iMSTK/merge_requests/61https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/107Utility function to compare meshes2019-07-28T15:44:03-04:00mohitTyagiUtility function to compare meshes- and try this utility function to compare `volMeshA` and `volMeshB` in `testMshandVegaIO()` in Sandbox.- and try this utility function to compare `volMeshA` and `volMeshB` in `testMshandVegaIO()` in Sandbox.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/100Place resources for examples online2017-07-03T15:39:10-04:00Sreekanth ArikatlaPlace resources for examples online* The resources (mesh files, texture files, shaders etc.) can be placed online to facilitate easy download
* They can be downloaded automatically through a Cmake script that is part of the example* The resources (mesh files, texture files, shaders etc.) can be placed online to facilitate easy download
* They can be downloaded automatically through a Cmake script that is part of the exampleRelease 1.0.0https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/82Leap Motion Integration2018-09-17T11:17:12-04:00Nicholas MilefLeap Motion Integration* Involves GPU skinning
* This needs to get done (not just for fun :smile: )* Involves GPU skinning
* This needs to get done (not just for fun :smile: )Nicholas MilefNicholas Milefhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/80Mesh movement /scaling2019-03-19T15:51:27-04:00Nicholas MilefMesh movement /scaling* Currently, for all geometry objects, the translate/rotate/scale function only set corresponding variables, which is then taken by the VTK renderer for visual rendering.
* “Real transform” is needed for scenario like collision detection...* Currently, for all geometry objects, the translate/rotate/scale function only set corresponding variables, which is then taken by the VTK renderer for visual rendering.
* “Real transform” is needed for scenario like collision detection and handling. Currently in imstk-ETI, it is done vertex-by-vertex for the laryngoscope mesh.
* Need a function to apply the translate/rotate/scale at geometry/mesh level. Need to figure out how to avoid the renderer re-applying those transformation again.
* Also, GPU only transformations for static mesheshttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/74Customized mapping2019-07-28T15:58:44-04:00Nicholas MilefCustomized mappingAdd interface for customized mapping. This is useful for models loaded with .tet file and for skeleton-skinning mapping.Add interface for customized mapping. This is useful for models loaded with .tet file and for skeleton-skinning mapping.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/73Texture manager2019-03-19T15:51:27-04:00Nicholas MilefTexture manager* In iMSTK textures are loaded on a per-mesh basis. This means that meshes that share textures have redundant texture loading.
* This can reduce drawcalls down the line, but that's not a priority right now.
* The implementation will be...* In iMSTK textures are loaded on a per-mesh basis. This means that meshes that share textures have redundant texture loading.
* This can reduce drawcalls down the line, but that's not a priority right now.
* The implementation will be a hashtable of the file name because it's faster than doing texture compares. This will all be done behind the scenes.Nicholas MilefNicholas Milefhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/470Pbd Rigid Grasping2022-10-06T18:03:24-04:00Andrew WilsonPbd Rigid GraspingWe need to be able to grasp rigid objects. Such as a needle (also other rigids for testing can be nice).
- [x] Pbd Rigid Grasping
- [x] Rigid Analytic on Rigid Analytic grasping w/ Haptics
- [x] Rigid Analytic on Deformable Mesh graspin...We need to be able to grasp rigid objects. Such as a needle (also other rigids for testing can be nice).
- [x] Pbd Rigid Grasping
- [x] Rigid Analytic on Rigid Analytic grasping w/ Haptics
- [x] Rigid Analytic on Deformable Mesh grasping w/ Haptics
- [x] Rigid Mesh on Rigid Analytic grasping (this may be done not sure) w/ Haptics
- [x] Positional/point grasping
- [x] Grasping with rotation
- [x] Multi point grasping
- [x] Lap Tool (capsule stand in) Needle Manipulation Example
Grasping was implemented with PbdRigidBodyPointToPointConstraint which constrains a point on a rigid body to a point on another. It can exert both forces and torques to achieve this. Unfortunately the object can still "spin" around the grasped point. You could, ofc, establish more grasp points but you'd want to in an orthonormal basis to prevent rotation in all directions. I would sooner recommend using a PbdAngularDistanceConstraint (already introduced, but possibly not working), and introduce an optional offset there. So you could maintain the relative angles made when grasping.
Multi point grasping could be tricky to keep stable. I don't think the linear will present huge problems. Maybe a low stiffness on the PbdAngularDistanceConstraint. I would test both with and without haptics. With haptics may be more stable. Since you can't pull one device without also pulling the other. Of course, if you don't have two haptic devices I think testing without is fine. Additionally all our devices don't render torque so if you grab a needle in two locations and rotate in opposite directions there will be conflicts/unsolvable situations.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/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/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/429Pbd Constraint Feature List2022-06-02T01:22:44-04:00Andrew WilsonPbd Constraint Feature ListThis is a list of constraints that could be useful to imstk:
- [ ] Shape Matching and moreso Local Shape Matching (see [A Survey on Position Based Dynamics, 2017](http://mmacklin.com/2017-EG-CourseNotes.pdf))
- [ ] Plasticity with Shap...This is a list of constraints that could be useful to imstk:
- [ ] Shape Matching and moreso Local Shape Matching (see [A Survey on Position Based Dynamics, 2017](http://mmacklin.com/2017-EG-CourseNotes.pdf))
- [ ] Plasticity with Shape Matching
- [ ] Our Pbd Fluids still uses PBD, not XPBD.
- [ ] Inverted Green Strain for FEM Tet constraint using SVD as described [Position-Based Simulation of Continuous Materials](https://animation.rwth-aachen.de/media/papers/2014-CAG-PBER.pdf)https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/421SurfaceMeshToCapsuleCD Uncovered Cases2022-07-26T20:03:04-04:00Andrew WilsonSurfaceMeshToCapsuleCD Uncovered CasesTwo cases I know of aren't covered with triangle to capsule. Documenting that issue here.
1. When the capsule is completely inside the triangle. It does *sometimes* generate data, but it's not the correct/expected manifold that would gi...Two cases I know of aren't covered with triangle to capsule. Documenting that issue here.
1. When the capsule is completely inside the triangle. It does *sometimes* generate data, but it's not the correct/expected manifold that would give good behavior.
2. When the triangles edge is in contact along the lengthwise portion of a capsule, a point contact is produced instead of an edge. This one isn't as critical as a point contact here gives ok behaviour.Jacob MooreJacob Moorehttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/395ViewerVTK & RenderingVTK Module Toggles2022-05-12T22:25:15-04:00Andrew WilsonViewerVTK & RenderingVTK Module TogglesNow that the libraries have been separated we may add a toggle for ViewerVTK & RenderingVTK which will allow one to build without these modules. Ultimately for using iMSTK as a physics backend only (a VTK without vtk rendering or differe...Now that the libraries have been separated we may add a toggle for ViewerVTK & RenderingVTK which will allow one to build without these modules. Ultimately for using iMSTK as a physics backend only (a VTK without vtk rendering or different rendering libs can be provided).https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/388Add/Fix VR Controller Input2021-12-20T15:57:20-05:00Andrew WilsonAdd/Fix VR Controller InputVR controller input doesn't work astoundingly well through older versions of VTK. It reports some buttons with ids but not all work. Mostly just the triggers. With VTK 9.1 comes the introduction of json input files for mapping actions wh...VR controller input doesn't work astoundingly well through older versions of VTK. It reports some buttons with ids but not all work. Mostly just the triggers. With VTK 9.1 comes the introduction of json input files for mapping actions which is useful here. Eventually it'd be nice to have a more generic interface. But for now, this issue is just about getting the other buttons and thumbstick/trackpad of the controllers working.https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/384Entity-Component (ECS) for Scene Object Interface2022-09-26T12:07:35-04:00Andrew WilsonEntity-Component (ECS) for Scene Object InterfaceIntroduction
---
The entity-component architecture is a well known architecture used in many game engines (ECS is more widely used). The motivation behind it is the desire for modularity and extensibility of a scene object interface. The...Introduction
---
The entity-component architecture is a well known architecture used in many game engines (ECS is more widely used). The motivation behind it is the desire for modularity and extensibility of a scene object interface. The idea is to prefer composition over inheritance for the scene object interface. This allows one to add/remove functionality (components) to an object easily. This also allows things like object morphing as you are not tied to a subclass (ex: a PbdObject can become a FemObject by addition of PbdModel and removal of FemModel).
A quick simple psuedo-example for the very unfamiliar (note many ECSs are data oriented and may not have an update, or hybrid and have a subclass that then adds the update):
```
class Component
{
virtual void update() = 0;
}
class Object
{
Component[] components;
void update()
{
for (every comp i in components) { comp.update(); }
}
}
// One should subclass Component to add functionality to Object
```
iMSTK is well suited for this type of architecture due to the large amount of "intra-object customization" required by users. This has been on iMSTK's plate for awhile and it's been lightly moving towards/prepping for it for quite some time now (moving functionality out of the Objects).
Example Use Case
---
Here's an idea of something that could be possible depending on design:
- Ex1: One could construct a ThreadObject which contains PbdModel & AnimatedModel components. Which simulates a line mesh and skins it to a thread geometry.
- Ex2: One could construct a SkinObject which contains multiple PbdModel's, VisualModels, & GeometryMap components.
- Ex3: One could construct a SkinObject which contains one PbdModel but multiple VisualModels + GeometryMap components.
- Ex4: One could construct a all-in-one tool (say arthoscope head) which contains a Camera, Light, RbdModel, & GeometryMap. Possibly even multiple RbdModel's for each piece.
Continued details in documents:
Documents
---
[Notion UML Diagram + Notes](https://www.notion.so/Imstk-ECS-8a00a245e9214ea187d29976e2f02784)Andrew WilsonAndrew Wilsonhttps://gitlab.kitware.com/iMSTK/iMSTK/-/issues/353CDHRefactor Backlog2022-06-02T01:27:13-04:00Andrew WilsonCDHRefactor Backlog- [x] OctreeIntersection OctreeDebugObject Bug
- [x] Fix warnings introduced in MR
- [x] Sign Issues in SphereToCylinderCD (need to make a manual example to check the contacts)
- [ ] GeometryDebugObject as a VisualModel instead of a Scen...- [x] OctreeIntersection OctreeDebugObject Bug
- [x] Fix warnings introduced in MR
- [x] Sign Issues in SphereToCylinderCD (need to make a manual example to check the contacts)
- [ ] GeometryDebugObject as a VisualModel instead of a SceneObject
- [x] CDElementVector was more or less untouched from previous imstk. Some of it's functions need some locks. Also we've experienced a few instances were the locks didn't appear to work when adding data in parallel. (I would do more investigation in the future)https://gitlab.kitware.com/iMSTK/iMSTK/-/issues/344Ability to Add Custom RenderDelegates2022-03-08T14:29:20-05:00Andrew WilsonAbility to Add Custom RenderDelegatesUsers should be able to write their own RenderDelegate's and add them to the renderer. Generally users shouldn't have to use this. But if they need some niche rendering capabilities this is how they would do it.Users should be able to write their own RenderDelegate's and add them to the renderer. Generally users shouldn't have to use this. But if they need some niche rendering capabilities this is how they would do it.Andrew WilsonAndrew Wilson