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

Frame id /generic_camera_link, with Kinect

asked 2012-09-20 23:05:02 -0600

webrot gravatar image

updated 2016-10-24 09:04:19 -0600

ngrennan gravatar image

Hello, I'm using tf to transform Point Cloud coords which I receive from kinect (image coords) to real world (gazebo coords). First of all, I had to create a publisher for the /world frame, because launching tf tf_monitor no frame was published. I thought this was enough and I believed that, receiving a coordinate frame from the cloud, this was automatically published somewhere in the kinect controller. However, it seems I was wrong, in fact I'm receiving this error:

Frame id /generic_camera_link does not exist! Frames (3): Frame /odom exists with parent /world. Frame /world exists with parent NO_PARENT.

EDIT: I'm using gazebo_ros_openni_kinect controller for Kinect

EDIT 2: Are there other faster methods to obtain the same results?

How can I solve it?

edit retag flag offensive close merge delete

Comments

What do you mean faster? You can either add a call to static_transform_publisher to a .launch file or do the same thing programmatically. Please see tf Tutorials.

Boris gravatar image Boris  ( 2012-09-22 19:08:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-09-20 23:52:08 -0600

updated 2013-02-23 21:51:38 -0600

You can use static_transform_publisher to create a link between /world frame and whatever you need.

To make it easier to understand interconnections between frames use

$ rosrun tf2_visualization frame_viewer.py

It will produce a graph with all available frames and their links.


EDIT #1:

Run above mentioned command in terminal and check if there any disconnected nodes (single or a group) on the graph.


EDIT #2:

Run the following on terminal but substitute <point_cloud_topic> with appropriate topic name:

$ rostopic echo -n 1 <point_cloud_topic>/header/frame_id

Use frame ID from output of this command to create a new tf frame linked to /odom:

$ rosrun tf static_transform_publisher 0 0 0 0 0 0 /odom <point_cloud_frame_id> 100

This command will add your Kinect frame as a child to /odom frame and will publish it every 100ms.

You might need to substitute zeros there with appropriate XYZ displacement and YPR orientation. See static_tranform_publisher documentation for more details (link provided at the beginning of the answer).

If you run frame_viewer.py after that you should see three nodes connected in line from /world to /odom to <point_cloud_frame_id>.


EDIT #3:

Question about transformation of point cloud coordinates to fixed frame was already answered here.

edit flag offensive delete link more

Comments

Thanks for the clear explanation.

harsha gravatar image harsha  ( 2012-09-21 19:21:15 -0600 )edit
0

answered 2012-09-21 01:10:09 -0600

webrot gravatar image

So, I should do it in the .xacro file of the kinect? Thanks

edit flag offensive delete link more

Comments

Please use comments for clarification instead of creating new answers.

Boris gravatar image Boris  ( 2012-09-21 01:45:53 -0600 )edit

Ok... sorry. No there aren't disconnected nodes. There are only the two (world and odom) which I created.

webrot gravatar image webrot  ( 2012-09-21 02:43:50 -0600 )edit

I'm trying, but this will not convert image coords to real coords unless i create a static_trasform_publisher which uses camera parameters, isn't it?

webrot gravatar image webrot  ( 2012-09-21 13:01:28 -0600 )edit

have you figured out the problem? I cant transform point cloud in camera frame to world frame. I tried adding a parent frame to camera link but the point cloud topic is still in camera frame

dmngu9 gravatar image dmngu9  ( 2015-04-27 07:07:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-09-20 23:05:02 -0600

Seen: 1,941 times

Last updated: Feb 23 '13