diff --git a/data_only_viz/smplx_osc_sender.py b/data_only_viz/smplx_osc_sender.py index 68a9be4..86070c5 100644 --- a/data_only_viz/smplx_osc_sender.py +++ b/data_only_viz/smplx_osc_sender.py @@ -76,6 +76,16 @@ class SMPLXTCPSender: pass self._sock = None + @staticmethod + def _pad10(arr: "np.ndarray") -> "np.ndarray": + """Return a contiguous float32 array of length 10, zero-padded if shorter.""" + flat = np.ascontiguousarray(arr, dtype="= 10: + return flat[:10] + out = np.zeros(10, dtype=" bytes: buf = bytearray() @@ -84,16 +94,15 @@ class SMPLXTCPSender: for p in persons: buf += struct.pack(" None: