Skip to content

Commit d577468

Browse files
authored
[doc] Add a documentation file for this repository (#111)
* [doc] Created a documentation * [doc] Remove assist documentation * [doc] Small review * [doc] Update README * [doc] Review doc * [doc] Some explanation on the layers * [doc] Remove slop * [doc] Add UML diagrams * [doc] Suggestions from review
1 parent 1199e64 commit d577468

10 files changed

Lines changed: 1468 additions & 265 deletions

File tree

README.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,76 +9,81 @@
99
This SOFA plugin (https://github.com/sofa-framework/sofa) provides a customized collision
1010
pipeline, designed specifically for needle insertion simulations.
1111

12-
When used together with SOFA haptic device plugins, the system offers tactile feedback
12+
Coupled with SOFA haptic device plugins, the system offers tactile feedback
1313
for puncture resistance, release and friction during insertion and retraction.
1414

15-
This plugin has also been integrated in Unity via the [`SOFAUnity`](https://github.com/InfinyTech3D/SofaUnity)
15+
Unity Engine integration is offered via the [`SOFAUnity`](https://github.com/InfinyTech3D/SofaUnity)
1616
plugin by InfinyTech3D for an enhanced simulation experience. Contact us for more information!
1717

1818
## Features
1919

2020
- Proximity detection between the needle and tissue mesh primitives
21-
- Needle simulation phases: puncture, insertion, retraction
22-
- Constraint-based needle simulation during the 3 phases
21+
- Needle insertion is simulated in phases: puncture, insertion, retraction
22+
- Needle-tissue coupling is done using Lagrangian constraints
2323
- Support for haptic feedback such as resistance during puncture and friction during insertion
2424
- Compatible with SOFA-Unity integration for real-time interactive applications
2525

2626
## Installation and Setup
2727

28-
First review the official SOFA documentation for building and registering SOFA plugins
28+
This plugin can be installed by following the official SOFA documentation for building and registering SOFA plugins
2929
https://sofa-framework.github.io/doc/plugins/build-a-plugin-from-sources/
3030

31+
3132
### Build Steps
3233

33-
- Set up your `external_directories` directory (described in the SOFA documentation link above)
34-
- Clone this repository into your `external_directories` directory:
35-
- git clone https://github.com/InfinyTech3D/CollisionAlgorithm.git
36-
- Register the path to your local `CollisionAlgorithm` repository in the CMakeLists.txt file located inside your `external_directories` directory
37-
```sofa_add_subdirectory(plugin CollisionAlgorithm CollisionAlgorithm)```
38-
- Set `SOFA_EXTERNAL_DIRECTORIES` variable (preferably using CMake GUI) to point to your `external_directories` directory
34+
- Set up the `external_directories` directory
35+
- Clone into `external_directories`:
36+
```
37+
git clone https://github.com/InfinyTech3D/CollisionAlgorithm.git
38+
```
39+
- Register plugin path in the `external_directories` CMakeLists.txt.
40+
```
41+
sofa_add_subdirectory(plugin CollisionAlgorithm CollisionAlgorithm)
42+
```
43+
- Set the `SOFA_EXTERNAL_DIRECTORIES` variable pointing to `external_directories`
3944
- Configure and generate the SOFA solution using CMake
4045
- Compile SOFA solution (the plugin will be compiled as well)
4146

4247
> [!IMPORTANT]
43-
> In order to use the plugin, make sure that you have also built the downstream
48+
> In order to use it, this plugin must be build alongside the downstream
4449
[`ConstraintGeometry`](https://github.com/InfinyTech3D/ConstraintGeometry) plugin.
4550

4651
Supported SOFA version: v25.06 and above
4752

4853
## Architecture
4954

5055
- doc:
51-
- Documentation and screenshots of the examples
56+
- Code documentation
5257
- scenes:
5358
- Various simple demo scenes
5459
- src/CollisionAlgorithm:
55-
- source code of the insertion algorithm SOFA component and supporting collision pipeline classes
60+
- SOFA components implementing the insertion algorithm and the supporting collision pipeline
5661
- regression:
57-
- Files for automated regression testing in alignment with SOFA's testing framework
62+
- Reference files for automated non-regression tests based on SOFA's testing framework
5863

59-
## Usage
64+
## Get Started
6065

61-
- To use the plugin, include the `CollisionAlgorithm` plugin in your SOFA .xml scene file.
66+
- Include the `CollisionAlgorithm` plugin in a scene file.
6267

63-
``` <RequiredPlugin name=`CollisionAlgorithm`/> ```
64-
- Add the `CollisionLoop` component in the root node of your scene.
68+
``` <RequiredPlugin pluginName=`CollisionAlgorithm`/> ```
69+
- Add the `CollisionLoop` component at the root node of your scene.
6570

6671
```
6772
<FreeMotionAnimationLoop/>
6873
<ProjectedGaussSeidelConstraintSolver tolerance='<your tolerance>' maxIt='<maximum solver iterations>' />
69-
<CollisionLoop/>
74+
**<CollisionLoop/>**
7075
7176
<CollisionPipeline/>
7277
<BruteForceBroadPhase/>
7378
<BVHNarrowPhase/>
7479
<CollisionResponse name='response' response='FrictionContactConstraint'/>
7580
<LocalMinDistance name='proximity' alarmDistance='0.2' contactDistance='0.08'/>
7681
```
77-
This component substitutes the default `CollisionPipeline` and manages the needle insertion algorithm.
78-
However, the two components can co-exist, allowing users to mix the standard collision detection/constraint resolution pipelines of SOFA.
82+
This component manages the needle insertion algorithm. It can work simultaneously with the existing SOFA `CollisionPipeline`
83+
and can thus be added incrementally in existing SOFA scenes where contacts and collisions are modelled.
7984

80-
- Create a node to represent the needle and additional nodes for the needle tip and shaft geometries
81-
Refer to the `scenes/NeedleInsertion.xml` example scene for guidance.
85+
- Create a node to represent the needle and additional nodes for the needle tip and shaft geometries.
86+
This step is more detailed, so refer to the examples in `scenes/NeedleInsertion.xml` for guidance.
8287

8388
- Add an `InsertionAlgorithm` component inside the needle node as shown below.
8489
```

doc/assist_doc.md

Lines changed: 0 additions & 241 deletions
This file was deleted.

0 commit comments

Comments
 (0)