ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

pi_tracker/Skeleton.msg message interpretation

asked 2013-03-24 18:02:45 -0500

Tariq gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2013-03-24 23:29:50 -0500

updated 2013-03-24 23:30:49 -0500

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-24 18:02:45 -0500

Seen: 559 times

Last updated: Mar 24 '13