Ask Your Question

Transforming between openni_depth_frame to a frame in the hierarchy of the kinect driver

asked 2012-02-08 09:35:04 -0500

Nash gravatar image

updated 2012-02-08 09:36:03 -0500

When using the openni_tracker for skeletal tracking, all the skeletal frames being tracked have common parent frame "openni_depth_frame". Since the openni_depth_frame does not have a parent in the tf tree, I cannot transform the tracked joint positions from the "openni_depth_frame" to any other openni frame of the kinect, for instance "openni_rgb_optical_frame". I think the only solution is to link the "openni_depth_frame" to a frame in the hierarchy of the kinect drivers with a static transform publisher. I have looked into the kinect_frames in openni_camera/launch but cannot find a relation between the two. Does anyone know the transform between /openni_depth_frame and any other openni frame?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-02-08 09:58:40 -0500

bit-pirate gravatar image

Hmm, that sounds odd to me. When I'm using the openni_tracker, I first launch the camera node (roslaunch openni_camera openni_node.launch) and then the openni_tracker. The first already includes static transform publishers for /openni_depth_frame, _depth_optical_frame etc. And as you wrote, the later publishes the skeleton frames with respect to openni_depth_frame. Hence, I see no problem, if you want to transform the skeleton frames into another frame of the Kinect. Did I miss something?

edit flag offensive delete link more


Im using the kinect which is mounted on the PR2. I am trying to transform the joint positions to a frame in the robot. Since the openni_tracker creates a new independent tree with openni_depth_optical_frame as the root and openni_depth_frame as its child, I cant transform them to another frame.
Nash gravatar image Nash  ( 2012-02-08 14:40:43 -0500 )edit
..on the robot other than openni_rgb_optical_frame. Additionally, openni_rgb_optical_frame is connected to the main tf tree, so if there was a static transform to relate the depth_frame to the rgb_optical_frame, this would combine the trees. Thanks for the reply!
Nash gravatar image Nash  ( 2012-02-08 14:43:28 -0500 )edit
You are welcome. Another comment: If you like to map something from on tf tree to another, they don't need to be connected. For example, I mapped transform from the skeleton tree onto the robot for teleoperation.
bit-pirate gravatar image bit-pirate  ( 2012-02-08 15:10:48 -0500 )edit
e.g. the transform torso_skeleton -> hand_skeleton is used to define the target position for the robot (torso_robot -> hand_robot). Btw, please mark the replies, if they answer your question.
bit-pirate gravatar image bit-pirate  ( 2012-02-08 15:11:27 -0500 )edit
If I map the transforms like you suggested, I would essentially make the robot mirror the human's movements. But I am interested in obtaining the "torso_skeleton" position with respect to the robot's "torso_lift_link", so that the robot could be aware of where the human is with respect to itself.
Nash gravatar image Nash  ( 2012-02-08 17:26:47 -0500 )edit
I would still need to combine the trees and to do so I would need a relation between openni_rgb_optical_frame to openni_depth_frame
Nash gravatar image Nash  ( 2012-02-08 17:30:55 -0500 )edit
You are correct. I thought that might be your goal. Regarding your real problem, are you not using the launch files in the openni_camera or openni_launch package? Or do the static transform publisher in them not work for you?
bit-pirate gravatar image bit-pirate  ( 2012-02-08 17:54:53 -0500 )edit

answered 2012-04-23 05:06:05 -0500

tayyab gravatar image

updated 2012-04-23 05:06:40 -0500

What you can do is you can modify the openni_tracker.cpp. I have modified it as follows

string frame_id("openni_depth_frame");

pnh.getParam("camera_frame_id", frame_id);


string frame_id("openni_rgb_optical_frame");

pnh.getParam("camera_frame_id", frame_id);

so that you can run camera node and openni tracker together. Hope it helps.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2012-02-08 09:35:04 -0500

Seen: 1,441 times

Last updated: Apr 23 '12