Depacketizing with Python

NatNet, VRPN, TrackD, and Plugins
Post Reply
jawo
Posts: 1
Joined: Mon Jun 19, 2017 5:45 am

Depacketizing with Python

Post by jawo » Mon Jun 19, 2017 6:00 am

Hi,

I just started looking at the python example and playing around a bit and stumbled upon the following:

When streaming a skeleton, at first when you get the Skeleton Description all looks fine regarding the IDs, one could easily resolve the entire skeleton by IDs and parent IDs. But here is already the first question: Obviously the timestamp as you can see in the output below is not really a timestamp. But this is how it is named in the code. I guess that it is the initial pose of the skeleton? The relation between the joints in the T-pose!?

Code: Select all

	Skeleton Marker Name:skeleton_1
		ID: 11
		rigidBodyCount: 21
	Marker Name:skeleton_1_Hip
		ID: 1
		parentID: 0
		timestamp: (0.0, 0.8773769736289978, 0.0)
	Marker Name:skeleton_1_Ab
		ID: 2
		parentID: 1
		timestamp: (0.0, 0.07777828723192215, 0.0)
	Marker Name:skeleton_1_Chest
		ID: 3
		parentID: 2
		timestamp: (0.0, 0.20554523169994354, 0.0)
	Marker Name:skeleton_1_Neck
		ID: 4
		parentID: 3
		timestamp: (0.0, 0.20470111072063446, 0.018609190359711647)
	Marker Name:skeleton_1_Head
		ID: 5
		parentID: 4
		timestamp: (0.0, 0.13279218971729279, -0.018970312550663948)
	Marker Name:skeleton_1_LShoulder
		ID: 6
		parentID: 3
		timestamp: (-0.03803586959838867, 0.18674999475479126, -0.0023206472396850586)
	Marker Name:skeleton_1_LUArm
		ID: 7
		parentID: 6
		timestamp: (-0.11442847549915314, 0.0, 0.0)
	Marker Name:skeleton_1_LFArm
		ID: 8
		parentID: 7
		timestamp: (-0.31669461727142334, 0.0, 0.0)
	Marker Name:skeleton_1_LHand
		ID: 9
		parentID: 8
		timestamp: (-0.1928965300321579, 0.0, 0.0)
	Marker Name:skeleton_1_RShoulder
		ID: 10
		parentID: 3
		timestamp: (0.03753983974456787, 0.18674999475479126, -0.0023206472396850586)
	Marker Name:skeleton_1_RUArm
		ID: 11
		parentID: 10
		timestamp: (0.11442847549915314, 0.0, 0.0)
	Marker Name:skeleton_1_RFArm
		ID: 12
		parentID: 11
		timestamp: (0.31669461727142334, 0.0, 0.0)
	Marker Name:skeleton_1_RHand
		ID: 13
		parentID: 12
		timestamp: (0.1928965300321579, 0.0, 0.0)
	Marker Name:skeleton_1_LThigh
		ID: 14
		parentID: 1
		timestamp: (-0.09485156834125519, 0.0, 0.0)
	Marker Name:skeleton_1_LShin
		ID: 15
		parentID: 14
		timestamp: (0.0, -0.39837655425071716, 0.0)
	Marker Name:skeleton_1_LFoot
		ID: 16
		parentID: 15
		timestamp: (0.0, -0.39837655425071716, 0.0)
	Marker Name:skeleton_1_RThigh
		ID: 18
		parentID: 1
		timestamp: (0.09485156834125519, 0.0, 0.0)
	Marker Name:skeleton_1_RShin
		ID: 19
		parentID: 18
		timestamp: (0.0, -0.39837655425071716, 0.0)
	Marker Name:skeleton_1_RFoot
		ID: 20
		parentID: 19
		timestamp: (0.0, -0.39837655425071716, 0.0)
	Marker Name:skeleton_1_LToe
		ID: 17
		parentID: 16
		timestamp: (0.0, -0.061653513461351395, 0.14227735996246338)
	Marker Name:skeleton_1_RToe
		ID: 21
		parentID: 20
		timestamp: (0.0, -0.061653513461351395, 0.14227735996246338)
And now here is the more difficult part: As soon as one looks at the MoCap data the IDs are totally different. You cannot find the same IDs as found in the skeleton description in the output above. Neither you are able to retrieve the names. So, how am I supposed to retrieve the structure of the skeleton again as it would be possible when getting the names or the IDs or parent IDs as above.

Code: Select all

Skeleton Count:1
receiveRigidBodyFrame: Id: 720897 
receiveRigidBodyFrame: Id: 720898 
receiveRigidBodyFrame: Id: 720899 
receiveRigidBodyFrame: Id: 720900 
receiveRigidBodyFrame: Id: 720901 
receiveRigidBodyFrame: Id: 720902 
receiveRigidBodyFrame: Id: 720903 
receiveRigidBodyFrame: Id: 720904 
receiveRigidBodyFrame: Id: 720905 
receiveRigidBodyFrame: Id: 720906 
receiveRigidBodyFrame: Id: 720907 
receiveRigidBodyFrame: Id: 720908 
receiveRigidBodyFrame: Id: 720909 
receiveRigidBodyFrame: Id: 720910 
receiveRigidBodyFrame: Id: 720911 
receiveRigidBodyFrame: Id: 720912 
receiveRigidBodyFrame: Id: 720914 
receiveRigidBodyFrame: Id: 720915 
receiveRigidBodyFrame: Id: 720916 
receiveRigidBodyFrame: Id: 720913 
receiveRigidBodyFrame: Id: 720917 
Any help is appreciated.

Post Reply