Ask Your Question
1

tf transformation for simulated kinect Gazebo (How to publish Gazebo Time?)

asked 2013-07-08 04:20:56 -0600

agonzamart gravatar image

updated 2014-04-20 14:09:43 -0600

ngrennan gravatar image

I have a Gazebo-Ros simulation where I use a range laser to get scans which is working properly and I am able to use the autonomous navigation on a simulated environment. Now I wanted to use a kinect as a sensor to get scans using the depthimage to laserscan node to substitute the range laser. After simulating this kinect, including all the different config files, nodes... I am able to read the scans after the cloudthrottle, so I think I have much of it correctly configured, but I am having problems with the tf's tranformations for this simulated kinect, when I try to read the topic inside rviz I can not get the transform between /map and the kinect frame I publish, I think is only a matter of not publishing the right tf transform for the kinect or maybe I need another I am not aware of. Right now for this kinect I only publish a static transform for the output frame id (depth_cam) to base_link

After remapping the output frame topic to /camera_depth

< node pkg="tf" type="static_transform_publisher" name "depth_cam_tf" args="0 -0.02 0 0 0 0 /base_link /camera_depth >

output from tf tf_monitor

RESULTS: for all Frames

Frames:

Frame: /Pioneer3AT/Sonar_1 published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499152 Max Delay: 0

Frame: /Pioneer3AT/base_link published by /Pioneer3AT_Gazebo Average Delay: -0.0493165 Max Delay: 0

Frame: /Pioneer3AT/camera_depth published by /depth_cam_tf Average Delay: -0.0996457 Max Delay: 0

Frame: /Pioneer3AT/front_left_axle published by /Pioneer3AT_tf_broadcaster Average Delay: -0.0492777 Max Delay: 0

Frame: /Pioneer3AT/front_left_hub published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499125 Max Delay: 0

Frame: /Pioneer3AT/front_left_wheel published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499122 Max Delay: 0

Frame: /Pioneer3AT/front_right_axle published by /Pioneer3AT_tf_broadcaster Average Delay: -0.0492735 Max Delay: 0

Frame: /Pioneer3AT/front_right_hub published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499119 Max Delay: 0

Frame: /Pioneer3AT/front_right_wheel published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499117 Max Delay: 0

Frame: /Pioneer3AT/front_sonar published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499114 Max Delay: 0

Frame: /Pioneer3AT/laserscan published by /Pioneer3AT_laserscan_tf Average Delay: -0.0326276 Max Delay: 0

Frame: /Pioneer3AT/odom published by /Pioneer3AT/amcl Average Delay: -0.494709 Max Delay: 0

Frame: /Pioneer3AT/rear_left_axle published by /Pioneer3AT_tf_broadcaster Average Delay: -0.0492701 Max Delay: 0

Frame: /Pioneer3AT/rear_left_hub published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499111 Max Delay: 0

Frame: /Pioneer3AT/rear_left_wheel published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499108 Max Delay: 0

Frame: /Pioneer3AT/rear_right_axle published by /Pioneer3AT_tf_broadcaster Average Delay: -0.0492668 Max Delay: 0

Frame: /Pioneer3AT/rear_right_hub published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499105 Max Delay: 0

Frame: /Pioneer3AT/rear_right_wheel published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499102 Max Delay: 0

Frame: /Pioneer3AT/rear_sonar published by /Pioneer3AT_tf_broadcaster Average Delay: -0.4991 Max Delay: 0

Frame: /Pioneer3AT/top_plate published by /Pioneer3AT_tf_broadcaster Average Delay: -0.499128 Max Delay: 0

All Broadcasters:

Node: /Pioneer3AT/amcl 18.6052 Hz, Average Delay: -0.494709 Max Delay: 0

Node: /Pioneer3AT_Gazebo 48.0592 Hz, Average Delay: -0.0493165 Max Delay: 0

Node: /Pioneer3AT_laserscan_tf 30.4796 Hz, Average Delay: -0.0326276 Max ... (more)

edit retag flag offensive close merge delete

Comments

I think that you'll be more likely to get answers if you make your question more readable. Use the markdown format, add line breaks to the tf_monitor output, maybe even include a link to an uploaded copy of frames.pdf

lindzey gravatar imagelindzey ( 2013-07-13 09:31:44 -0600 )edit

Gazebo is not publishing in the /clock topic. I have /use_sim_time set to "true". Is there anything else needed to publish Gazebo's clock? Thats the simpler I could thought. I wanted to upload the frames.pdf but I do not have enough Karma to do so, that's why I had to do it that way.

agonzamart gravatar imageagonzamart ( 2013-07-13 13:36:12 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-07-08 05:16:47 -0600

lindzey gravatar image

updated 2013-07-08 08:43:55 -0600

ROS includes some great command-line tools for debugging tf. I suspect that tf's view_frames will help you quickly discover what transforms you're missing. (on groovy, simply run view_frames from the command line. For earlier ROS versions, use rosrun tf view_frames)

If this doesn't allow you to figure it out, you should edit your question with more details about your setup.

edit flag offensive delete link more

Comments

I tried to use tf view_frames, because I am using groovy and seems like view_frames is not implemented. I have had this same problem previously working with Ros, the error seems to be that my messages for the tf transform depth_camera are removed because they are too old.

agonzamart gravatar imageagonzamart ( 2013-07-08 08:33:40 -0600 )edit

I updated the question with the tf_monitor output.

agonzamart gravatar imageagonzamart ( 2013-07-08 08:37:58 -0600 )edit

(I updated my answer to reflect usage of view_frames on different ROS distros)

lindzey gravatar imagelindzey ( 2013-07-08 08:43:37 -0600 )edit

I realized how view_frames worked in groovy, it is not updated in the wiki and I was used to call it as a rosrun as in the older versions. But thank you for your answer. I will update with the output of view_frames but it seems that everything is connected, so I am still searching for what is wrong.

agonzamart gravatar imageagonzamart ( 2013-07-10 01:19:47 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-07-08 04:20:56 -0600

Seen: 1,650 times

Last updated: Jul 13 '13