mesh_module 6dofexternal
Purpose
Command for coupling Aspherix(R) meshes with external tools.
Warning
GPU support for this command has not been tested and may not work as expected.Syntax
mesh_module 6dofexternal id module-ID center_of_mass (cx, cy, cz) coupling_port port
id = obligatory keyword
module-ID = user-defined name for the mesh module
center_of_mass = obligatory keyword
(cx, cy, cz) = position vector of the center of mass
coupling_port = obligatory keyword
port = port used to connect to mesh on master-side
Examples
mesh_module 6dofexternal id my_6dofexternal center_of_mass (0., 0., 0.) coupling_port 0
Description
This mesh module allows to couple meshes within an Aspherix(R) simulation with an external tool via external interfaces like FMI Standard.
On the one hand, an external master provides the position, velocity, orientation and angular velocity at a certain time. This module will adapt the mesh properties (position,…) using linear/spherical interpolation to fulfill the external data. On the other hand, Aspherix(R) provides the forces and torques due to particle interactions.
Note: External forces like gravity are not taken into account by Aspherix(R). The external master must do so.
Additional information
This mesh module stores a global vector with 7 components for access by various output commands. The first 3 components store the position of the center of mass of the body. The next 4 components are the quaternion of the rotation of the body. Furthermore, this module writes the state of the rigid body (translational and rotational) to binary restart files so that a simulation can continue correctly. This module supports modify_command with option 6dofexternal/set_coupling_data (old_style must be set to ‘yes’). For easier use the property values can also be accessed via the property name: for example, id_myMesh.xcm will return the x-position of the center of mass. See the table below for a complete overview of the available properties and how to access them.
Mesh module property |
property name (dot access) |
probable array position |
center of mass |
xcm, ycm, zcm |
10-12 |
quaternion of body rotation |
quat1, quat2, quat3, quat4 |
13-16 |
Restrictions
When using this module, along with scaling or rotate the body, the keyword/value pairs have to represent the state after scaling/rotation. Mesh elements may not be deleted in case due to leaving the simulation box for a fixed boundary. In this case, an error is generated. See boundary_conditions command for details. This module can not be used in conjunction with another command that manipulates mesh geometry, such as a mesh_module motion or the mesh_module servo .
Default
None