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

Revision history [back]

click to hide/show revision 1
initial version

It sounds like to do what you want, you need to know the desired pose of your viewpoint relative to the current pose of your Kinect (at least approximately depending on how accurate you want this transformation to be). What you want to do is create a new frame that is offset from the camera_link in such a way that it gives the "above" viewpoint of the point cloud that you are looking for. I would recommend trying to estimate where you would want the viewpoint to be and figuring out the offset between that and your current camera_link. Then you could run the following on the command line:

rosrun tf static_transform_publisher x y z yaw pitch roll camera_link new_frame_id 10

This creates a TF frame using the static_transform_publisher. The "x y z yaw pitch roll" arguments are the amounts in each of those dimensions that your desired frame is from your camera_link frame. More details are at that link. It's hard for me to guess at an approximate transform from the image in your question but if you update with an image that has the TF frames shown I might be able to be more specific. Maybe try something like:

rosrun tf static_transform_publisher 0 0 2.0 0 -3.14/4 3.14 camera_link new_frame_id 10

Then change your Fixed Frame in Rviz to the "new_frame_id" and see if you get something similar to the viewpoint you want. If so, then you can take the next step if necessary and transform your point cloud into that frame so that when you access it programmatically it will have the values you want. You can do this using the pcl_ros API.