From ff5960c3345199e12839adcd502e9cc8a9b5b313 Mon Sep 17 00:00:00 2001 From: Yinoussa Adagolodjo Date: Wed, 25 Oct 2023 16:33:38 +0200 Subject: [PATCH] change folder doc name to docs --- README.md | 2 +- .../images/actuationConstraint_1.png | Bin .../images/actuationConstraint_2.png | Bin .../images/circleActuationConstraint.png | Bin {doc => docs}/images/cosseratgripper_2.png | Bin {doc => docs}/images/example1.gif | Bin {doc => docs}/images/example2.gif | Bin .../images/multiSectionWithColorMap1.png | Bin .../images/multiSectionWithColorMap2.png | Bin .../images/multiSectionWithColorMap3.png | Bin {doc => docs}/images/tenCossseratSections.png | Bin {doc => docs}/images/tenSections.png | Bin examples/python3/tutorial/tutorial.md | 105 ++++++++++++++++++ 13 files changed, 106 insertions(+), 1 deletion(-) rename {doc => docs}/images/actuationConstraint_1.png (100%) rename {doc => docs}/images/actuationConstraint_2.png (100%) rename {doc => docs}/images/circleActuationConstraint.png (100%) rename {doc => docs}/images/cosseratgripper_2.png (100%) rename {doc => docs}/images/example1.gif (100%) rename {doc => docs}/images/example2.gif (100%) rename {doc => docs}/images/multiSectionWithColorMap1.png (100%) rename {doc => docs}/images/multiSectionWithColorMap2.png (100%) rename {doc => docs}/images/multiSectionWithColorMap3.png (100%) rename {doc => docs}/images/tenCossseratSections.png (100%) rename {doc => docs}/images/tenSections.png (100%) create mode 100644 examples/python3/tutorial/tutorial.md diff --git a/README.md b/README.md index efcb05b0..63725184 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i | Direct simulation of a soft gripper | The study of the model convergence | |-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| -| ![400](docs/images/cosseratgripper_2.png) | ![400](docs/images/tenCossseratSections.png) | +| ![400](docs/images/cosseratgripper_2.png) | ![400](../../../../Templater/images/tenCossseratSections.png.md) | --- diff --git a/doc/images/actuationConstraint_1.png b/docs/images/actuationConstraint_1.png similarity index 100% rename from doc/images/actuationConstraint_1.png rename to docs/images/actuationConstraint_1.png diff --git a/doc/images/actuationConstraint_2.png b/docs/images/actuationConstraint_2.png similarity index 100% rename from doc/images/actuationConstraint_2.png rename to docs/images/actuationConstraint_2.png diff --git a/doc/images/circleActuationConstraint.png b/docs/images/circleActuationConstraint.png similarity index 100% rename from doc/images/circleActuationConstraint.png rename to docs/images/circleActuationConstraint.png diff --git a/doc/images/cosseratgripper_2.png b/docs/images/cosseratgripper_2.png similarity index 100% rename from doc/images/cosseratgripper_2.png rename to docs/images/cosseratgripper_2.png diff --git a/doc/images/example1.gif b/docs/images/example1.gif similarity index 100% rename from doc/images/example1.gif rename to docs/images/example1.gif diff --git a/doc/images/example2.gif b/docs/images/example2.gif similarity index 100% rename from doc/images/example2.gif rename to docs/images/example2.gif diff --git a/doc/images/multiSectionWithColorMap1.png b/docs/images/multiSectionWithColorMap1.png similarity index 100% rename from doc/images/multiSectionWithColorMap1.png rename to docs/images/multiSectionWithColorMap1.png diff --git a/doc/images/multiSectionWithColorMap2.png b/docs/images/multiSectionWithColorMap2.png similarity index 100% rename from doc/images/multiSectionWithColorMap2.png rename to docs/images/multiSectionWithColorMap2.png diff --git a/doc/images/multiSectionWithColorMap3.png b/docs/images/multiSectionWithColorMap3.png similarity index 100% rename from doc/images/multiSectionWithColorMap3.png rename to docs/images/multiSectionWithColorMap3.png diff --git a/doc/images/tenCossseratSections.png b/docs/images/tenCossseratSections.png similarity index 100% rename from doc/images/tenCossseratSections.png rename to docs/images/tenCossseratSections.png diff --git a/doc/images/tenSections.png b/docs/images/tenSections.png similarity index 100% rename from doc/images/tenSections.png rename to docs/images/tenSections.png diff --git a/examples/python3/tutorial/tutorial.md b/examples/python3/tutorial/tutorial.md new file mode 100644 index 00000000..80b5897c --- /dev/null +++ b/examples/python3/tutorial/tutorial.md @@ -0,0 +1,105 @@ + +### Mathematical Description of Cosserat Rods + + +### Reference Frames + +### Conservation of Momentum + +### Linear Elasticity + + +## Numerics + +### Spatial Discretization + +### Time Discretization + +### Reduce to Global State + +### Global to Reduce State + +### Boundary conditions and interaction forces + + + + + +A step-by-step tutorial for understanding how to model a 1D object using the Cosserat plugin within the SOFA framework. + +# Modeling 1D Objects with Cosserat Theory in SOFA** + + **Introduction:** +In this tutorial, we will learn how to create a 1D object model using Cosserat Theory within the SOFA framework. This model is useful for simulating various physical systems, such as beams or rods. We'll cover the essential components and parameters needed to set up the model. + + **Prerequisites:** +Before you begin, make sure you have SOFA installed. If not, follow the installation instructions on the SOFA website. + +### **Section 1: Setting up the Environment** +1.1. Import necessary libraries: + - Import the required libraries, including SOFA and custom utility modules. + +1.2. Define the class: + - Begin by defining the `CosseratBase` class, which represents our 1D object model. + +### **Section 2: Class Initialization** +2.1. Constructor: + - Create the `__init__` method to initialize the class. + - Define the parameters and attributes used in the class, such as mass, geometry, and nodes. + +### **Section 3: Beam Physics Parameters** +3.1. Mass and Radius: + - Set the mass and radius of the beam using parameters. + +3.2. Use Inertia Parameters: + - Choose whether to use inertia parameters and set them accordingly. + +### **Section 4: Adding Rigid Base Node** +4.1. Create a Rigid Base Node: + - Add a rigid base node to represent the base of the 1D object. + - Specify its position and rotation. + +4.2. Attach the Base: + - Choose whether to attach the base to a link or allow it to follow arm position. + - Add a rest shape force field if needed. + +### **Section 5: Cosserat Coordinate Node** +5.1. Create a Cosserat Coordinate Node: + - Add a node to represent the Cosserat coordinates. + - Specify the parameters needed for the beam physics. + +### **Section 6: Cosserat Frame** +6.1. Create a Cosserat Frame Node: + - Add a node to represent the Cosserat frame. + - Include mechanical objects, mappings, and other necessary components. + +### **Section 7: Collision Models** +7.1. Add Collision Model: + - Implement collision models for interactions with other objects, if required. + +7.2. Sliding Points (Optional): + - Include sliding points or containers for specific scenarios. + +### **Section 8: Setting up the Scene** +8.1. Configure the Scene: + - Initialize the SOFA scene with necessary parameters and components. + - Define gravity, time step, and solver settings. + +8.2. Create the Object: + - Instantiate the `CosseratBase` class within the scene. + +**Conclusion:** +In this tutorial, we've learned how to create a 1D object model using Cosserat Theory in SOFA. We covered class initialization, beam physics parameters, rigid base nodes, Cosserat coordinates, collision models, and setting up the scene. With this knowledge, you can create and simulate various 1D objects for your specific applications. + +**Note:** This tutorial provides a high-level overview of the class structure and its components. For more detailed code explanations and demonstrations, please refer to the actual Python class code and comments. + + +## Applications + +### Build a simple cosserat Scene + +### Cosserat as cable for finger actuation + +### Cosserat as + +### Cosserat as