microcosm / ofxKinectV2-OSC

Get KinectV2 skeletons into openFrameworks on your Mac
65 stars 16 forks source link

OSC packets #2

Closed ofZach closed 8 years ago

ofZach commented 9 years ago

is there a reason to send an osc packet for each joint? I'm wondering if batching joints would be more efficient? (for example, sending a full skeleton or full frame scene, etc)

microcosm commented 9 years ago

Essentially the data you want to communicate for each skeleton is a key (bodyId) to a set of key/value pairs, i.e:

{
    bodyId => {
            { jointId => [f, f, f] },
            { jointId => [f, f, f] },
            etc...
    }
}

The best way to fit that to the OSC specification with it's ID => list of keyless values seems to be to munge the bodyId and jointId into the address and then add the values.

Whether you can then group multiple OscMessages together into a single OscPacket I don't know - I don't know the spec / implementations well enough. Would have to dig around in here: https://bitbucket.org/rugcode/rug.osc/src/6f12d2e4d4f6/Rug.Osc/?at=master

Does ofxOSC allow for that?