You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a geometric model to the model. This is done with two options; option 1 is to model a basic cuboid with width, length, and height. Option 2 is to import an .obj file, and to use the mesh from that.
The outputs of the geometric model are currently planned to be the moments of inertia, and the center of gravity.
What Needs to Be Done
Several functions/classes will be created. Firstly, in the file actor_builder.py there will be a function set_cubiod_geometric_model to add then cuboid geometric model to the actor. There will also be a similar function, set_geometric_model_from_import for the option to import a mesh from the .obj file.
Then a new file is implemented, geometric_model.py, which contains two classes, CuboidGeomtericModel, and ImportGeometricModel. These two classes will each have the function to find the moment of inertia, and the centre of gravity. Additionally, the mass of the satellite is stored in the class.
Depending on what is needed for the disturbances that will be added, more parameters may need to be added to these two classes.
How Can It Be Tested
Lastly, two tests will be added in the file actor_builder_test.py. One to test the cuboid geometric model, and one to test the import. The import test contains the ability to view the imported model in the correct coordinate system.
The text was updated successfully, but these errors were encountered:
Option 2 is to import an .obj file, and to use the mesh from that.
Please avoid files, can just pass a mesh as two lists of vertices and faces as seen in trimesh example (since you added trimesh ;) )
the center of gravity.
You assume uniform density I presume? Just to check
Firstly, in the file actor_builder.py there will be a function set_cubiod_geometric_model to add then cuboid geometric model to the actor. There will also be a similar function, set_geometric_model_from_import for the option to import a mesh from the .obj file.
I would suggest to just have one function set_mesh(vertices,faces,scale=1) which defaults to a cube scaled by scale. It is more intuitive for users if there is exactly one functions that works the same way in both cases.
Then a new file is implemented, geometric_model.py, which contains two classes, CuboidGeomtericModel, and ImportGeometricModel. These two classes will each have the function to find the moment of inertia, and the centre of gravity.
ImportGeometricModel should not be necessary without files. The one I would call ActorGeometricModel and make it generically work for meshes (a cuboid is just a mesh of 8 point).
Additionally, the mass of the satellite is stored in the class.
Should be stored in the actor itself since other models use it too (e.g. thermal)
Feature
This issue covers point 1 of issue #190.
Desired Behavior / Functionality
Adding a geometric model to the model. This is done with two options; option 1 is to model a basic cuboid with width, length, and height. Option 2 is to import an .obj file, and to use the mesh from that.
The outputs of the geometric model are currently planned to be the moments of inertia, and the center of gravity.
What Needs to Be Done
Several functions/classes will be created. Firstly, in the file actor_builder.py there will be a function set_cubiod_geometric_model to add then cuboid geometric model to the actor. There will also be a similar function, set_geometric_model_from_import for the option to import a mesh from the .obj file.
Then a new file is implemented, geometric_model.py, which contains two classes, CuboidGeomtericModel, and ImportGeometricModel. These two classes will each have the function to find the moment of inertia, and the centre of gravity. Additionally, the mass of the satellite is stored in the class.
Depending on what is needed for the disturbances that will be added, more parameters may need to be added to these two classes.
How Can It Be Tested
Lastly, two tests will be added in the file actor_builder_test.py. One to test the cuboid geometric model, and one to test the import. The import test contains the ability to view the imported model in the correct coordinate system.
The text was updated successfully, but these errors were encountered: