= HmiPhysics =
== Quickstart ==
TODO
== !HmiPhysicalHumanoid ==
Example:
{{{
0.159157 0.1367995 0.1083425
-1.1168412E-6 -0.26656365 -0.008797124
...
...
}}}
Collisionmodel describes the collision shape of each segment of the body in [[https://collada.org/|Collada]]. endjoint is the space seperated list of joints that end the segment. Mass is mass in kg. Position is the position of the CoM of the segment in world coordinates. I is the inertia tensor (row-order). type (ball, universal, hinge, fixed) indicates the DoF of the joint. axis1 is the rotation axis of the first dof, loStop1, hiStop1 the rotation limits of the first dof (in radians).
=== XML definition ===
TODO
=== Coordinate systems===
==== !PhysicalJoint ====
{{{joint.addTorque(x,y,z)}}} applies a torque of x on the 1st joint axis (typically its local x axis), y on the 2nd joint axis (typically its local y axis), etc. The torque is applied to the joint that rotates the underlying physical segment. The opposite torque is applied to the physical segment above. So if you add a torque of (10,0,0) on the knee joint, this is transfered to a torque of (10,0,0) on the knee segment and a torque of (-10,0,0) on the hip segment.
{{{joint.getAngle(i)}}} returns the angle around the ith axis of the joint (with i=0 corresponding to axis1 in the !PhysicalHumanoid specification).
==== !PhysicalSegment ====
{{{segment.box.getRotation()/getTranslation()}}} return the rotation/translation of a segment in world coordinates. {{{box.getInertiaTensor()}}} provides the inertiatensor on the center of mass of the segment in world coordinates when it has identity rotation.
==== !PhysicalHumanoid ====
{{{ph.getCOM()/getCOMDiff}}} return the Center of Mass / its velocity in world coordinates.