0
$\begingroup$

Rosanswers logo

Hello all,

I am using using ROS Electric, and pi_tracker package for skeletal tracking. The launch file "skeleton.launch" publishes "/skeleton" topic, which is a "pi_tracker/Skeleton.msg" message. Using "rosbag -record", I recorded the "/skeleton" topic. The message definition is:

Header header
int32 user_id
string[] name
float32[] confidence
geometry_msgs/Vector3[] position
geometry_msgs/Quaternion[] orientation

And dumping the /skeleton topic to a txt file, the output is like:

------------------------------------------
header: 
  seq: 1
  stamp: 
    secs: 1363464929
    nsecs: 445623850
  frame_id: openni_depth_frame
user_id: 1
name: ['head', 'neck', 'torso', 'left_shoulder', 'left_elbow', 'left_hand', 'right_shoulder', 'right_elbow', 'right_hand', 'left_hip', 'left_knee', 'left_foot', 'right_hip', 'right_knee', 'right_foot']
confidence: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0]
position: 
  - 
    x: -0.377875793457
    y: 0.0851003723145
    z: 2.09605566406
  - 
    SIMILAR FOR OTHER 14 JOINTS
orientation: 
  - 
    x: 0.213657463007
    y: 0.188112339353
    z: 0.0245842250896
    w: 0.958310941594
  - 
    SIMILAR FOR OTHER 14 JOINTS
------------------------------------------

Now, my question is, if I want to know the position of the joint 'HEAD',

  1. How can I get the position? Means, what is the relation between 'position' and 'orientation' field?
  2. What is the unit of (x,y,z)?
  3. And, if I only want the (x,y) co-ordination in the image coordinate, how can I convert it to only 2-D (x,y) coordinate?

Thanks in advance.


Originally posted by Tariq on ROS Answers with karma: 3 on 2013-03-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi,

The position of the joint head is the "position" field. The orientation gives the orientation of the coordinate frame associated with the point. It means that for example I turn my head to the right, the orientation will change, but the position will remain the same.

In order to only take the x,y coordinate, you have to project the 3D data into a 2D. You can find the projection matrix of the kinect on the internet, see this topic for more information...

EDIT : this link is also very useful for understanding

Have a good day,

Bests,

Stéphane


Originally posted by Stephane.M with karma: 1304 on 2013-03-24

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.