[x3d-public] HAnim 1.0, 2.0 joint, segment and featurePoint names implementedinX3DUOM, X3DJSAIL

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Wed Apr 3 17:21:40 PDT 2019


Joe, thanks 1M for another excellent discussion today.

======================================================

1. *HAnim Validation using X3DJSAIL improvements*

References to X3D Specifications documentation
* http://www.web3d.org/specifications/x3d-4.0.xsd
* http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0.html
* http://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml

Here is excerpt of information in schema, allowing each node to test its immediate parent in LOA4:

<xs:enumeration value="pelvis">
     <xs:annotation>
         <xs:appinfo>
             <xs:attribute name="index" type="xs:integer" fixed="2"/>
             <xs:attribute name="loa" type="loaType" fixed="1"/>
             <xs:attribute name="parent" type="jointNameValues" fixed="sacroiliac"/>
         </xs:appinfo>
         <xs:documentation source="https://en.wikipedia.org/wiki/Pelvis"/>
     </xs:annotation>
</xs:enumeration>

Note that index numbers match those in HAnim v2 tables,
* Site numbers: Table 4.7 — Site and Segment relationships
* Feature points: Table B.2 — Feature points
* (I think joint and segment index #s were in order of definition of each)

So validation will occur by each node/segment/site/displacer node checking its unique parent (not by checking multiple children).

Here is example child-parent validation code sent to HAnim list earlier.  I will continue on integrating that design pattern into X3DJSAIL autogeneration of validation tests.

FYI work in progress:

         // test for correct parent
         X3DConcreteElement parent = getParentObject();
         if (getParentObject() != null) // TODO hasParentObject()
         {
             if      (parent.getElementName().equals(HAnimJointObject.NAME))
             {
                 // now test for correct parent-child LOA4 relationship pair
                 if (!hasSegmentNameParent(((HAnimJointObject)parent).getName()))
                 {
                     String errorNotice = ConfigurationProperties.ERROR_ILLEGAL_VALUE +
                         ": illegal parent name found: '" + ((HAnimJointObject)parent).getName() + "' instead of TODO" ;
                     validationResult.append(errorNotice).append("\n");
                     throw new InvalidFieldException(errorNotice); // report error
                 }
             }
             else if (!parent.getElementName().equals(fieldObject.NAME) && !parent.getElementName().equals(fieldValueObject.NAME) &&
                      !parent.getElementName().equals(ProtoBodyObject.NAME))
             {
                 String errorNotice = ConfigurationProperties.ERROR_ILLEGAL_VALUE +
                     ": illegal parent found: '" + parent.getElementName() + "'";
                 validationResult.append(errorNotice).append("\n");
                 throw new InvalidFieldException(errorNotice); // report error
             }
         }

// TODO: if LOA less than 4, modify test to compare whether immediate parent is a legal ancestor.
// Warn at first that it is not 100% test, until someone does the LOA 0..3 algorithms also.

======================================================

2. Your attached text file "HAnimV2JointSegmentSiteHierarchy[20190314].txt" is very helpful.

Thank you for starting with ~80 pre-existing locations (which you say were pretty good) and adding new values for HAnim v2 hands and feet.

Essential all of these values go in

* Table A.11 — LOA‑4: Suggested Site objects (and corresponding translation values)
* screen excerpt image attached

So taking an excerpt from you file, such as block near the top, we see:

humanoid_root  0.0000 0.8240 0.0277                     #Jnn
   sacrum
     [humanoid_root to sacroiliac]
   sacroiliac  0.0000 0.9149 0.0016                      #Jnn
   | pelvis
   |   [sacroiliac to l_hip]
   |   [sacroiliac to r_hip]
   |   [sacroiliac to Vl5]
   |     (r_iliocristale  -0.1525 1.0628 0.0035)         #S36
   |     (r_trochanterion  -0.1689 0.8419 0.0352)        #S46
   |     (l_iliocristale  0.1612 1.0537 0.0008)          #S33
   |     (l_trochanterion  0.1677 0.8336 0.0303)         #S42
   |     (r_asis  -0.0887 1.0021 0.1112)                 #S35
   |     (l_asis  0.0774 1.0190 -0.1151)                 #S32
   |     (r_psis  -0.0716 1.0190 -0.1138)                #S37
   |     (l_psis  0.0774 1.0190 -0.1151)                 #S34
   |     (crotch  0.0034 0.8266 0.0257)                  #S38
   |     (buttocks_standing_wall_contact_point  x y z)   #S93
   | l_hip  0.0961 0.9124 -0.0001                        #Jnn
   | | l_thigh
   | |   [l_hip to l_knee]
   | |     (l_knee_crease  0.0993 0.4881  -0.0309)               #S90
   | |     (l_femoral_medial_epicondyles  0.0398 0.4946 0.0303)  #S39
   | |     (l_femoral_lateral_epicondyles  0.1598 0.4967 0.0297) #S40
   | |     (l_suprapatella  x y z)                               #S41
   | | l_knee  0.1040 0.4867 0.0308                              #Jnn


Focusing on iliocristale (site 33) for example, then I think existing definition

<xs:enumeration value="l_iliocristale">
     <xs:annotation>
         <xs:appinfo>
             <xs:attribute name="index" type="xs:integer" fixed="33"/>
             <xs:attribute name="loa" type="loaType" fixed="1"/>
             <xs:attribute name="parent" type="segmentNameValues" fixed="pelvis"/>
         </xs:appinfo>
         <xs:documentation source="https://www.topendsports.com/testing/skinfold-iliac-crest.htm"/>
     </xs:annotation>
</xs:enumeration>

gets an addition suggestedTranslation:

<xs:enumeration value="l_iliocristale">
     <xs:annotation>
         <xs:appinfo>
             <xs:attribute name="index" type="xs:integer" fixed="33"/>
             <xs:attribute name="loa" type="loaType" fixed="1"/>
             <xs:attribute name="parent" type="segmentNameValues" fixed="pelvis"/>
             <xs:attribute name="suggestedTranslation" type="SFVec3f" fixed="0.1612 1.0537 0.0008"/>
         </xs:appinfo>
         <xs:documentation source="https://www.topendsports.com/testing/skinfold-iliac-crest.htm"/>
     </xs:annotation>
</xs:enumeration>

There is still a heckuva lot of attention to detail we need to follow up with, but it appears like the pattern is emerging nicely and thoroughly.

A few more SMOPs to await us...  8)

* https://en.wikipedia.org/wiki/Small_matter_of_programming

======================================================

3. Future steps once these capabilities are in place:

a. consider writing X3D-Tidy tests that suggest new site names when upgrading from HAnim v1 to v2.

b. convert existing example HAnim models from X3Dv3.3 to X3Dv4.4

	http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation

c. validate them thoroughly, confirming that models/schema/X3DUOM are simultaneously.

d. finish defining default dimensions in X3D XML schema -> X3DUOM -> X3DSAIL implementation.

e. use X3DJSAIL to construct an example skeleton using these default values.  publish that model.

f. visually that model will show us if all the values are correct. Nose out of joint, sore thumbs, twisted ankles will be immediately evident.

g. those improved values and your improved example model will go into future HAnim 2.1 specification.

h. you ask an interesting question: should we have default dimensions for a female also?

i. keep going with BVH capture examples.

======================================================

Good news about these tests: you only have to get them each correct once!  The more tests we have, the more difficult it is for a skeleton bug to hide anywhere.

Also the more examples and tools we build, the less anyone else has to repeat this "heavy lifting" work.

We're having fun with HAnim!  8)

v/r Don


On 4/1/2019 12:30 PM, Joseph D Williams wrote:
> Found it here
> 
> https://github.com/Web3DConsortium/HAnim/blob/master/ISO-IEC19774-combined-FDIS.Web3D.zip
> 
> That top navigation bar works nice.
> 
> Attached is my reference for the loa4 hanim annex A user code. I’m still thinking that if I get this sort of shorthand (basically an elaboration of the Part 1 Concepts joint and segment hierarchy charts and tables) complete enough to show legal hierarchies then use schema and other object model documentation tools to validate before committing to actual user code.
> 
>   * Having fun with HAnim!  8)
> 
> Me too, just these last few v2 details.
> 
> Thanks for all work on this,
> 
> Joe
> 
> *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> *Sent: *Saturday, March 30, 2019 12:00 PM
> *To: *Joseph D Williams <mailto:joedwil at earthlink.net>
> *Cc: *Humanoid Animation (HAnim) Working Group <mailto:h-anim at web3d.org>; X3D Graphics public mailing list <mailto:x3d-public at web3d.org>; Medical working group <mailto:med at web3d.org>
> *Subject: *Re: HAnim 1.0, 2.0 joint, segment and featurePoint names implementedinX3DUOM, X3DJSAIL
> 
> Joe, this looks tremendous.  8)
> 
> Thanks for quick call today, confirming yes let's meet this Wednesday 1500-163 on Web3D teleconference line to discuss.  Am thinking we can then get started on integrating default HAnim values into X3Dv4 schema, X3DUOM and X3DJSAIL.  I've put it on the Web3D calendar in case anyone wants to join us.
> 
> * Web3D Calendar, April 2019
> 
>     http://www.web3d.org/calendar/month/2019-04
> 
> * Web3D Teleconference Information
> 
>     http://www.web3d.org/member/teleconference-information
> 
> Also FYI, Dick and I have together reviewed and prepared a new zip that includes both HAnim Part 1 Architecture and HAnim Part 2 Motion Data Animation.  Attached is a screenshot, notice the selection links on running header across the top.
> 
> https://github.com/Web3DConsortium/HAnim/raw/master/ISO-IEC19774-combined-FDIS.Web3D.zip
> 
> Please advise what you think, we have the option to continue improving this Web3D version over time since it is Web3D Consortium copyrighted version of two ISO standards.  TIA.
> 
> Having fun with HAnim!  8)
> 
> On 3/14/2019 6:56 PM, Joseph D Williams wrote:
> 
>  >   * Joe, thanks for all the excellent work on aliases.  If you want to continue and integrate corresponding values for object centers and site translations, we can update all these assets further.  Starting-point example values are found in
> 
>  >
> 
>  >   * * HAnim 1.0 Annex A (informative) Nominal body dimensions and levels of articulation
> 
>  >
> 
>  >    http://www.web3d.org/documents/specifications/19774/V1.0/HAnim/BodyDimensionsAndLOAs.html
> 
>  >
> 
>  > Yes, I am sorting through the Annex A user code (works for v1) and tables along with the Annex B v2 to find agreement in order to use existing ‘nominal’ joint and site locations where appropriate. As you mentioned, yes, let’s include ‘nominal’ joint and site locations in the schema along with  other v1 and v2 information. Now Annex A is a ‘nominal’ male and of course we need at least two general categories with example ‘nominal’ dimensions. Looking at it that way there are many missing  dimensions in Annex A and maybe leave a space in the schema for ‘nominal’ male and ‘nominal’ female?
> 
>  >
> 
>  > So, attached is what I have as the list of all stuff needed for the LOA4 user code. If I can get this complete, then the user code will be easy.
> 
>  >
> 
>  > Please take a look at this. I really need to walk through this at least once more to check before committing to code.
> 
>  >
> 
>  > Thanks and Best,
> 
>  >
> 
>  > Joe
> 
>  >
> 
>  > *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> 
>  > *Sent: *Sunday, March 3, 2019 11:17 PM
> 
>  > *To: *Humanoid Animation (HAnim) Working Group <mailto:h-anim at web3d.org>; Joe D Williams <mailto:joedwil at earthlink.net>
> 
>  > *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>; Medical working group <mailto:med at web3d.org>
> 
>  > *Subject: *HAnim 1.0, 2.0 joint, segment and featurePoint names implemented inX3DUOM, X3DJSAIL
> 
>  >
> 
>  > Progress report.  Following up on progress with X3Dv4 XML Schema and X3D Unified Object Model (X3DUOM), all of the allowed X3Dv4 / HAnim v2.0 enumerations for jointName, segmentName and featurePointName are now implemented in X3DJSAIL as lists and utility methods.  Accessor methods are also provided for index, Level of Articulation (LOA), alias and parent.
> 
>  >
> 
>  > ===================================================================
> 
>  >
> 
>  > X3D Java Scene Access Interface Library (X3DJSAIL)
> 
>  >
> 
>  > http://www.web3d.org/specifications/java/X3DJSAIL.html
> 
>  >
> 
>  > X3D Java Scene Access Interface Library (X3DJSAIL) supports programmers with standards-based X3D Java interfaces and objects, all as open source.
> 
>  >
> 
>  > ===================================================================
> 
>  >
> 
>  > Example documentation:
> 
>  >
> 
>  > http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/HAnim/HAnimJointObject.html
> 
>  >
> 
>  > http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/HAnim/HAnimJointObject.html#jointNameValues
> 
>  >
> 
>  > http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/HAnim/HAnimJointObject.html#getName--
> 
>  >
> 
>  > http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/HAnim/HAnimJointObject.html#setName-java.lang.String-
> 
>  >
> 
>  > static boolean               hasJointNameAlias(java.lang.String jointName)
> 
>  >
> 
>  >                             Whether a alias exists for this jointName
> 
>  >
> 
>  > static boolean               hasJointNameIndex(java.lang.String jointName)
> 
>  >
> 
>  >                             Whether an index exists for this jointName
> 
>  >
> 
>  > static boolean               hasJointNameLoa(java.lang.String jointName)
> 
>  >
> 
>  >                             Whether an loa exists for this jointName
> 
>  >
> 
>  > static boolean               hasJointNameParent(java.lang.String jointName)
> 
>  >
> 
>  >                             Whether a parent exists for this jointName
> 
>  >
> 
>  > static java.lang.String  getJointNameAlias(java.lang.String jointName)
> 
>  >
> 
>  >                                           Get alias for this jointName
> 
>  >
> 
>  > static int                         getJointNameIndex(java.lang.String jointName)
> 
>  >
> 
>  >                                           Get index for this jointName
> 
>  >
> 
>  > static int                         getJointNameLoa(java.lang.String jointName)
> 
>  >
> 
>  >                                           Get Level of Articulation (loa) for this jointName
> 
>  >
> 
>  > static java.lang.String  getJointNameParent(java.lang.String jointName)
> 
>  >
> 
>  >                                           Get parent for this jointName
> 
>  >
> 
>  > etc. etc.  Similar enumeration lists can be found in HAnimSegment and HAnimSite.
> 
>  >
> 
>  > Joe, thanks for all the excellent work on aliases.  If you want to continue and integrate corresponding values for object centers and site translations, we can update all these assets further.  Starting-point example values are found in
> 
>  >
> 
>  > * HAnim 1.0 Annex A (informative) Nominal body dimensions and levels of articulation
> 
>  >
> 
>  >     http://www.web3d.org/documents/specifications/19774/V1.0/HAnim/BodyDimensionsAndLOAs.html
> 
>  >
> 
>  > Looking ahead: next round of X3DJSAIL implementation work will add parent-child validation checks for HAnimJoint, HAnimSegment and HAnimSite nodes.  Might possibly skeleton-tree serialization output as well.  The alias values will allow backwards validation of HAnim 1.0 (X3Dv3) models.  Such capabilities will significantly improve our Quality Assurance (QA) of HAnim models.
> 
>  >
> 
>  > We will then work on upgrading X3D Schematron rules and HAnim example scenes to X3Dv4 / HAnim2.0 specifications.
> 
>  >
> 
>  >                X3D Example Archives: Basic, Humanoid Animation
> 
>  >
> 
>  >                http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation
> 
>  >
> 
>  > It remains our hope that HAnimsupport v2.0 representations for full anatomical fidelity of skeleton models and BVH-style motion animation will eventually lead to better support for accurate human modeling in medical tools and electronic health records.
> 
>  >
> 
>  > Onward we go.  Have fun with Humanoid Animation (HAnim)!   8)
> 
>  >
> 
>  > all the best, Don
> 
>  >
> 
>  > --
> 
>  >
> 
>  > Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> 
>  >
> 
>  > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> 
>  >
> 
>  > X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
> 
>  >
> 
> all the best, Don
> 
> -- 
> 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> 
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> 
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
> 


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HanimV2TableA-11Excerpt.png
Type: image/png
Size: 126883 bytes
Desc: HanimV2TableA-11Excerpt.png
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190404/3d86c770/attachment-0001.png>


More information about the x3d-public mailing list