Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Services

Janis Sprenger edited this page Feb 18, 2021 · 1 revision

Services

Services are essential to ease the implementation for the MMU developers, co-simulation, behavior execution and target engine users. Within the MMI framework, a set of fundamental services is available. The interfaces of the specific services are listed below.

In analogy to the Adapters, the services also offer a standardized description format.

Service Description

MServiceDescription
+Name: string
+ID: string
+Language: string
+Addresses: list
+Properties: map<string,string>
+Parameters: list

Detailed description of available parameters:

Parameter Name Required Description
Name x The name of the service.
ID x A unique ID of the service.
Language x The supported programming language of the service.
Addresses x A list of address under which the service is available.
Properties Optional properties of the service.
Parameters A list of optional parameters of the service.

Service Base

Each provided service must implement and extend the MMIServiceBase. In particular, the base service contains a setup and a generic consume method, as outlined below.

<<interface>>
MMIServiceBase
+GetStatus(): map<string,string>
+GetDescription(): MServiceDescription
+Setup(avatar: MAvatarDescription, properties: map<string,string>): MBoolResponse
+Consume(properties: map<string,string>): map<string,string>
+Dispose(properties: map<string,string>): MBoolResponse
+Restart(properties: map<string,string>): MBoolResponse

Detailed description of available parameters:

Function Name Description
GetStatus Returns the present status of the service.
GetDescription Returns the specific MServiceDescription for the service.
Setup Basic method to setup the service. This function can be used to reduce the network traffic. For instance, instead of transferring the full hierarchy, only the posture values can be transmitted if being initialized in before.
Consume Function to consume a service without needing the explicit interface. This can be utilized if new services are added to the framework which signature is not known yet.
Dispose
Restart

Retargeting Service

The MRetargetingService depicts a fundamental service within the proposed MMI framework. In particular, the MMU developers can utilize the service to map between the intermediate and the specific skeleton. Moreover, the target engine developers can further take usage of the proposed service.

<<interface>>
MRetargetingService
+SetupRetargeting(globalTarget: MAvatarPosture): MAvatarDescription
+RetargetToIntermediate(globalTarget: MAvatarPosture): MAvatarPostureValues
+RetargetToTarget(intermediatePostureValues: MAvatarPostureValues): MAvatarPosture

Detailed description of available parameters:

Function Name Description
SetupRetargeting Sets up the retargeting given the different postures.
RetargetToIntermediate Retargets the posture values to the intermediate skeleton.
RetargetToTarget Retargets the posture values from the intermediate skeleton to the specific skeleton.

Path Planning Service

A further service, which is provided by the MMI framework, is the MPathPlanningService. The service allows computing a collision-free path given a start and end-configuration. In particular, the service provides multiple operations modes for computing paths with different dimensionalities and criteria.

<<interface>>
MPathPlanningService
+ComputePath(start: MVector3, goal: MVector, sceneObjects: list, properties: map<string,string>): MPathConstraint

Detailed description of available parameters:

Function Name Description
ComputePath Computes a path using the specified parameters and scene objects.

A more detailed description can be found in the UnityPathPlanning Documentation

Collision Detection Service

An essential service within the framework is the MCollisionDetectionService. The service allows detecting collisions between specified colliders, as frequently required for digital human simulations.

MCollisionDetectionService
+ComputePenetration(colliderA: MCollider, transformA: MTransform, colliderB: MCollider, transformB: MTransform): MVector3
+CausesCollision(colliderA: MCollider, transformA: MTransform, colliderB: MCollider, transformB: MTransform): bool

Detailed description of available parameters:

Function Name Description
ComputePenetration Computes the penetration between two colliders given their hypothetical position/rotation.
CausesCollision Indicates whether the two specified colliders cause a collision given the position/rotation.

Inverse Kinematics Service

Since inverse kinematics is a fundamental aspect of human motion synthesis and used throughout different technologies, the framework also provides a service for computation of inverse kinematics.

MInverseKinematicsService
+ComputeIK(postureValues: MAvatarPostureValues, properties: list):MAvatarPostureValues
+CalculateIKPosture(postureValues: MAvatarPostureValues, constraint: list, properties: map<string, string>): MIKServiceResult

Detailed description of available parameters:

Function Name Description
ComputeIK The method computes a novel posture based on the given MIKProperties. In particular, the posture values of the resulting posture are returned.
CalculateIKPosture

IK Property

The IK service comes with a set of additional structures that simplify the utilization of the service. The provided formats are presented below:

MIKProperty
+Values: list
+Weight: double
+Target: MEndeffectorType
+OperationType: MIKOperationType

Detailed description of available parameters:

Parameter Required Description
Values x The values for the specified MIKOperationType (e.g. positions, rotations).
Weight x The weight of the property ([0; 1]).
Target x The MEndeffectorType, which should be adjusted.
OperationType x The specific operation that should be carried out using the IK.

IK Operation Type

MIKOperationType (enum)
SetPosition
SetRotation

End Effector Type

MEndeffectorType (enum)
LeftHand
LeftFoot
RightHand
RightFoot
Root

IK Service Result

MIKServiceResult
+Posture: MAvatarPostureValues
+Success: bool
+Error: list

Detailed description of available parameters/functions:

Parameter Name Required Description
Posture
Success
Error

Blending Service

To blend between consecutive posture for motion synthesis or transition modeling, the so-called MBlendingService is provided in the framework.

MBlendingService
+SetBlendingMask(mask: map<MJointType, double>, avatarID: string) MBoolResponse
+Blend(startPosture: MAvatarPostureValues, targetPosture: MAvatarPostureValues, weight: double): MAvatarPostureValues

Detailed description of available parameters:

Function Name Description
SetBlendingMask Method sets the blending mask for the given avatar id.
Blend Method performs a blend from the start to the target posture using the specified blend weight.

Service Access

To access all services, the MServiceAccess interface is provided. It is accessible from the MMUs and co-simulation. It contains all defined interfaces of the previously described services. Since Apache Thrift does not allow using services as class members, the specific MServiceAccess must be manually provided for each Adapter implementation.

<<interface>>
MServiceAccess
+InverseKinematics: MInverseKinematicsService
+Retargeting: MRetargetingService
+PathPlanning: MPathPlanningService
+CollisionDetection: MCollisionDetectionService
+MotionBlending: MMotionBlendingService

Detailed description of available parameters:

Function Name Description
InverseKinematics Access to the InverseKinematics service
Retargeting Access to the retargeting service
PathPlanning Access to the path planning service
CollisionDetection Access to the collision detection service
MotionBlending Access to the motion blending service
Note
Deprecated: Couldn't find MServiceAccess in the thrift files

Posture Blending Service

<<interface>>
MPostureBlendingService
+Blend(startPosture: MAvatarPostureValues, targetPosture: MAvatarPostureValues, weight: double, mask: map<MJointType, double>, properties: map<string,string>): MAvatarPostureValues
+BlendMany(startPosture: MAvatarPostureValues, targetPosture: MAvatarPostureValues, weight: list, mask: map<MJointType, double>, properties: map<string,string>): list

Detailed description of available parameters:

Function Name Description
Blend
BlendMany

A more detailed description can be found in the PostureBlending Documentation

Grasp Pose Service

<<interface>>
MGraspPoseService
+GetGraspPoses(posture: MAvatarPostureValues, handType: MJointType, sceneObject: MSceneObject, repositionHand: bool): list

Detailed description of available parameters:

Function Name Description
GetGraspPoses

A more detailed description can be found in the GraspPointService Documentation

Note
The following interfaces is not used by the grasp pose service anymore and probably can be removed savely.
MHandPose
+Joints: list
+Properties: map<string, string>

Detailed description of available parameters/functions:

Parameter Name Required Description
Joints
Properties

Walk Point Estimation Service

<<interface>>
MWalkPointEstimationService
+EstimateWalkPoints(sceneObjects: list, target: MSceneObject, amount: i32, properties: map<string, string>): list

Detailed description of available parameters:

Function Name Description
EstimateWalkPoints

A more detailed description can be found in the WalkPointEstimation Documentation

MWalkPoint
+PositionConstraint: MGeometryConstraint
+Suitability: double

Detailed description of available parameters/functions:

Parameter Name Required Description
PositionConstraint
Suitability

Coordinate System Mapper

<<interface>>
MCoordinateSystemMapper
+TransformToMMI_L(transform: MTransform, coordinateSystem: list): MTransform
+TransformToMMI(transform: MTransform, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MTransform
+TransformFromMMI_L(transform: MTransform, coordinateSystem: list): MTransform
+TransformFromMMI(transform: MTransform, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MTransform
+QuaternionToMMI_L(quat: MQuaternion, coordinateSystem: list): MQuaternion
+QuaternionToMMI(quat: MQuaternion, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MQuaternion
+QuaternionFromMMI_L(quat: MQuaternion, coordinateSystem: list): MQuaternion
+QuaternionFromMMI(quat: MQuaternion, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MQuaternion
+VectorToMMI_L(quat: MVector3, coordinateSystem: list): MVector3
+VectorToMMI(quat: MVector3, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MVector3
+VectorFromMMI_L(quat: MVector3, coordinateSystem: list): MVector3
+VectorFromMMI(quat: MVector3, firstAxis: MDirection, secondAxis: MDirection, thirdAxis: MDirection): MVector3

Detailed description of available parameters:

Function Name Description
TransformToMMI_L
TransformToMMI
TransformFromMMI_L
TransformFromMMI
QuaternionToMMI_L
QuaternionToMMI
QuaternionFromMMI_L
QuaternionFromMMI
VectorToMMI_L
VectorToMMI
VectorFromMMI_L
VectorFromMMI

A more detailed description can be found in the CoordinateSystemMapper Documentation

MDirection
+Right
+Left
+Up
+Down
+Forward
+Backward

Detailed description of available parameters/functions:

Parameter Name Required Description
Right
Left
Up
Down
Forward
Backward

AJAN Service

<<interface>>
MAJANService
+CreateAgent(name: string, template: string, knowledge: MRDFGraph): string
+DeleteAgent(agentName: string): bool
+ExecuteAgent(agentName: string, endpoint: string, content: MRDFGraph): string
+ReceiveAsync(actionID: string, answer: i32)

Detailed description of available parameters:

Function Name Description
CreateAgent
DeleteAgent
ExecuteAgent
ReceiveAsync
Note
Deprecated: Couldn't find this in the thrift files

MOSIM Documentation

Introduction

Documentation

Known Issues

Clone this wiki locally