-
Notifications
You must be signed in to change notification settings - Fork 8
Simulation State
The so-called MSimulationState class is an important format for calling MMUs. The class contains the actual simulation state in terms of posture of the avatar, presently active constraints, desired scene manipulations and events created by the MMUs in the current frame.
MSimulationState |
---|
+Initial: MAvatarPostureValues +Current: MAvatarPostureValues +Constraints: list +SceneManipulations: list +Events: list |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Initial | x | Values, which represent the approved and merged posture of the last frame. The variable describes a single posture. |
Current | x | Values, which represent the generated posture of the previously executed MMU in hierarchy in current frame. The variable describes a single posture. Depending on the co-simulation, this variable can contain either a merged posture or just the plain result of the previous MMU. |
Constraints | A list of currently active constraints (e.g. left foot should stay at ground). | |
Scene Manipulations | A list of desired manipulations of the scene that can be optionally specified by the MMU. Using this approach contradicting scene manipulations can be avoided. | |
Events | A list of all events raised within the current frame. This also includes the MMUs raised by previous MMUs in the present frame (e.g. MMU:end). A detailed overview of the available events is given in the MSimulationEvent section. |
Another essential class for MMU handling is the so-called MSimulationResult. The class contains the computed information returned by a MMU. In particular, information about the posture, constraints, events and scene-manipulations are provided. Given the format, it is furthermore possible to specify intended drawing calls being visualized in the target engine, as well as providing debug information using the LogData.
MSimulationResult |
---|
+Posture: MAvatarPostureValues +Constraints: list +Events: list +SceneManipulations: list +DrawingCalls: list +LogData: list |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Posture | x | Values, which represent the computed posture of the MMU for the current frame. Instead of the full hierarchy, only the root transformation and the local joint rotations are transferred (see MAvatarPostureValues). |
Constraints | The list of constraints which should be handled by consecutive MMUs/co-simulation (e.g. left foot should stay at ground). | |
Events | A list of status messages (called events) of the MMU. The framework comprises default events such as End, Start, and Abort similar to BML. The events are processed by the co-simulation. | |
Scene Manipulations | A list of desired manipulations of the scene that can be optionally specified by the MMU. Using this approach contradicting scene manipulations can be avoided. | |
Drawing Calls | Optional parameter to send visualization instructions to the target engine (e.g. draw the path [{1,2},[1,3]]. | |
Log Data | Optional list of strings for providing debugging information. |
The so-called MSimulationEvent is an important class for the scheduling and orchestration of multiple MMUs. Similar to BML, an event is always referred to a MInstruction. This means, that each MSimulationEvent needs a corresponding MInstruction. Moreover, within the framework predefined MSimulationEvent Types are provided (again see bml). Each event can have an additional name, as well as further properties.
MSimulationEvent |
---|
+Name: string +Type: string +Reference: string +Properties: map<string,string> |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Name | x | A descriptive name of the Event. Can be specified by the MMU internally. |
Type | x | The type of the Event. The framework provides basic types such as End and Start. However, MMU developers can define their own events such as (Foot contact, Grasp contact) |
Reference | x | The unique ID of the corresponding MInstruction. |
Properties | Optional properties, which can be transmitted additionally. |
Within the framework a basic set of events, inspired by the bml approach is provided. However, each MMU developer can furthermore specify custom events. The default list of available simulation events is illustrated below.
Default events provided in the framework:
Name (case sensitive) | Description |
---|---|
start | Event is automatically provided by the co-simulation if a MMU is started (see bml). |
ready | Optional event (see bml). |
stroke_start | Optional event (see bml). |
stroke_end | Optional event (see bml). |
end | Event must be provided by the MMU if the MMU is finished (see bml). |
abort | Event if the present MMU is aborted. |
warning | An optional warning event. |
exception | Event should be raised if an exception occurred within the MMU. |
An important format for expressing manipulations of the scene is the MSceneManipulation class. The format is utilized by the MMUs to express intended scene manipulations (e.g. object is at position (x,y) and for the synchronization of the scene within the adapters. A detailed overview of the individual classes MTransform and MSceneObject is provided within the scene section.
MSceneManipulation |
---|
+Transforms: list +PhysicsInteractions: list +Properties: list +Attachments: list |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Transforms | List of intended manipulations of the transforms of specific object (e.g. change location of object 1). | |
PhysicsInteractions | List of intended physics interactions of given objects. | |
Properties | List of intended property changed (e.g. set flag of MSceneObject). | |
Attachments |
The MTransformManipulation class allows specifying manipulations of the location/transformation a specific object in the scene. The target of the transform manipulation must be always set, whereas the position, rotation and parenting can be optionally set.
MTransformManipulation |
---|
+Target: string +Position: MVector3 +Rotation: MQuaternion +Parent: string |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Target | x | The id of the target object/Avatar, where the manipulation should be carried out. |
Position | The changed position. The values represent the new absolute position. If undefined it will be ignored. | |
Rotation | The changed rotation. The values represent the new absolute rotation. If undefined it will be ignored. | |
Parent | The new parent value. If undefined it will be ignored. The present parent is removed if flag Remove:id is used. |
The MPhysicsInteraction class can be utilized to express intended physical interactions with the scene. In particular, a specific target (referenced by the ID) can be affected. The set of physical interaction types is specified by the MPhysicsInteractionType enum as shown below.
MPhysicsInteraction |
---|
+Target: string +Type: MPhysicsInteractionType +Values: list +Properties: map<string,string> |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Target | x | The target object at which the physics interaction should be applied (unique id). |
Type | x | The specified MPhysicsInteractionType enum. |
Values | x | The values which express the physics interaction (e.g. force, torque) |
Properties | Optional properties which can be specified. |
For describing the specific type of a physics interaction, the MPhysicsInteractionType enum is provided in the framework.
MPhysicsInteractionType (enum) |
---|
AddForce AddTorque ChangeVelocity ChangeAngularVelocity ChangeMass ChangeCenterOfMass ChangeInertia |
The MPropertyManipulation class can be utilized to adjust given properties of an MSceneObject or MAvatar.
MPropertyManipulation |
---|
+Target: string +Key: string +AddRemove: bool +Value: string |
Detailed description of available parameters:
Parameter Name | Required | Description |
---|---|---|
Target | x | The id of the target object/Avatar, where the manipulation should be carried out. |
Key | x | The key of the property. |
AddRemove | ||
Value | The new value of the property. |
- What is the MOSIM Framework?
- Components of the Framework
- Repository Structure
- RPCs with Apache Thrift
- Setting up the MMI-Environment
- MMU Development
- Target Engine Integration
- Integration in Unity
- Integration in UE4
- Integration in 3rd Party Engines
- Service Development
-
Intermediate Skeleton & Retargeting
- Concept of the Intermediate Skeleton
- Retargeting Service and Configurator
- Retargeting in Unity
- Retargeting in UE4
- Constraints