keel-210 / OpenPose-Rig

tf-openpose and unity IK
97 stars 28 forks source link

After i running the unity, it shows this error. can you solve? #4

Closed Jacob12138xieyuan closed 4 years ago

Jacob12138xieyuan commented 5 years ago

FormatException: Input string was not in the correct format System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Double.cs:209) System.Single.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Single.cs:183) BoneController.m3 (System.String f) (at Assets/BoneController.cs:105) System.Linq.Enumerable+cIterator102[System.String,System.Single].MoveNext () System.Collections.Generic.List1[System.Single].AddEnumerable (IEnumerable1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128) System.Collections.Generic.List1[System.Single]..ctor (IEnumerable1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65) System.Linq.Enumerable.ToArray[Single] (IEnumerable1 source) BoneController.PointUpdate () (at Assets/BoneController.cs:105) BoneController.Start () (at Assets/BoneController.cs:37)

keel-210 commented 5 years ago

Hi Jacob12138xieyuan! Apparently it seems to have failed to parse, so make sure to use attitude data like the one below.

[[[ 14.92142874 -108.54245999 -156.17663171 -30.61178154 206.26546395 348.59836261 428.49344141 -23.72729188 -64.59051193 -58.24184023 -71.0524189 155.67588092 356.72214471 328.46601474 -285.61299841 -478.87357764 -628.7609282 ] [ 57.32913884 32.04597062 -243.41472588 -245.64914378 82.61225533 -220.41324492 -186.15566744 118.61493944 103.75314056 -4.63428129 35.24575082 134.54588136 188.1003079 76.72117097 106.81791717 60.89343418 -102.69358523] [-117.75328591 -94.21536506 -355.86725381 -819.16052701 -85.25362693 -371.75525715 -725.28474816 131.9156541 406.68167084 465.84875355 557.83256134 387.5281311 139.77284224 -70.33764487 382.73256996 245.49967563 213.58731629]]]

It is a tensor of 1, 3, and 17 dimensions. This project assumes that the serial number txt data of the above tensor is in data_path.

The latest commit has been confirmed to work in my environment.