OpenPTrack / open_ptrack_v2

OPT v2 "Gnocchi" - adding object tracking and pose recognition
BSD 3-Clause "New" or "Revised" License
218 stars 64 forks source link

Getting the orientation of the skeleton joints #115

Closed muella91 closed 4 years ago

muella91 commented 4 years ago

Hello,

Is it possible to get the orientation of each skeletal joint? Like in the Kinect v2 skeleton model

Since I need the other skeleton joints, I have to transfer the OPT joints into my skeleton model. So I have to know the orientation of the skeleton joints to add an offset.

Thanks!

muella91 commented 4 years ago

Hey,

I am still struggling with my problem. Is it somehow possible to get the 6D (position+orientation) pose of each joint? It is necessary for me to calculate further points on the body.

Edit:

 "persons":
   [
      {
         "id": 3,
         "height":1.50029,
         "orientation":2.4570,
         "age":29.471,

Orientation is an estimation of where the person being tracked is facing in relation to OpenPTrack's 0,0 coordinate.

Does the value of "orientation" represent the angle in degree around the Z-axis of the OpenPTrack world coordinate system?

bsubbaraman commented 4 years ago

Hi @muella91, For the joints, I don't believe we have any orientation information: rt_pose, which we are using for skeletons, outputs joint positions and confidences. In the past when I have tried to (for example) animate a humanoid character using OpenPTrack, I have computed the vector between the each joint to orient my model. I found this thread from the openpose repo which may also be of use to you. Please let me know if I can provide any more information or if I've misunderstood your question!

muella91 commented 4 years ago

Thank you for your answer. I already guessed so. I still have some small questions.

  1. What does the orientation attribute of the pose estimation JSON tells me? I don't undestand the explanation. (see my post above)
  2. You mentioned in https://github.com/OpenPTrack/open_ptrack_v2/issues/113 that the HEAD joint is located in the center of the head. Is the NECK joint inside the neck or is it located mid back/front in the neck? How about the CHEST joint?

I would post my solution here when I solved my problem. So you can leave the problem open if you want.

bsubbaraman commented 4 years ago
  1. The orientation computation happens here in standardpose.cpp. It returns the rotation around z axis of the OPT reference frame based on the joint data.

  2. In the MPI model (which is what I use), there is no neck joint. I think the best way for you to find the placement is to enable the SimpleImage topic in the left hand RViz sidebar and select the/<sensor_name>/skeleton_image topic, which will overlay the joints on the rgb image. That way you can empirically see where each joint is placed.

I'll keep this thread open for you to post your solution!

mnemllr commented 4 years ago

Okay, here's my solution to my problem. Maybe it will help others with similar problems.

The calculated coordinate system always points with its y-axis from the spine base towards the shoulders and with the x-axis always towards the right hip. The disadvantage of this method is that poses in which the user makes a hump result in a hip movement, although this may did not happen.

bsubbaraman commented 4 years ago

Great, thanks for posting your solution! Closing now.