AaronMR / Learning_ROS_for_Robotics_Programming_2nd_edition

Code and examples for Learning ROS for Robotics Programming - 2nd Edition
450 stars 307 forks source link

chapter 9 TF Timed out waiting for transform #17

Closed nag92 closed 8 years ago

nag92 commented 8 years ago

I am trying to run the code in chapter 9. But I am getting the following errors. I am using Indigo on Ubuntu 14.04

[ INFO] [1452889196.329134059]: Requesting the map... [ WARN] [1452889196.329791899]: Request for map failed; trying again... [ INFO] [1452889196.441411551]: Read a 4000 X 4000 map @ 0.050 m/cell [ WARN] [1452889196.513920976, 167.303000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 167.303 timeout was 0.1. [ INFO] [1452889197.088506301, 167.799000000]: Sending map [ INFO] [1452889197.105394529, 167.809000000]: Received a 4000 X 4000 map @ 0.050 m/pix

[ INFO] [1452889197.234685739, 167.922000000]: Initializing likelihood field model; this can take some time on large maps... [ INFO] [1452889197.352058306, 168.024000000]: Done initializing likelihood field model. [ WARN] [1452889202.426361433, 172.332000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1. [ WARN] [1452889208.360313058, 177.365000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1. [ WARN] [1452889214.357923367, 182.402000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.102 timeout was 0.1. [ WARN] [1452889215.167080648, 183.076000000]: No laser scan received (and thus no pose updates have been published) for 183.076000 seconds. Verify that data is being published on the /scan topic. [ WARN] [1452889215.167129518, 183.076000000]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.amcl.message_notifier] rosconsole logger to DEBUG for more information. [ WARN] [1452889220.303655183, 187.428000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1. [ WARN] [1452889226.212108443, 192.457000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1.

efernandez commented 8 years ago

@nag92 Could you please post the exact command you're running, so we can reproduce your problem?

kfbixc commented 8 years ago

@efernandez :hello,I met the same problem with nag92.I hope you could answer this question in the follow url: http://answers.ros.org/question/224242/tf-transformation-with-move_base/
I'm very thankful for your answer,thank you.

kfbixc commented 8 years ago

@efernandez :hello,I met other error when I run $ roslaunch chapter8_tutorials gazebo_mapping_robot.launch model:="rospack find robot1_description/urdf/robot1_base_04.xacro" $ rosrun teleop_twist_keyboard teleop_twist_keyboard.py in chapter8_tutorials.I chose fixed frame as odom,but Map LaserScan and RobotModel were error.It points out NO transform.

I run the next command -$ roslaunchchapter8_tutorials gazebo_map_robot.launch model:="rospack findchapter8_tutorials/urdf/robot1_base_04.xacro" . It points out Global Status error:Fixed Frame [odom] does not exist.Map and RobotModel are error.I am looking forward to your reply,thank you.

efernandez commented 8 years ago

@KFBIT Thanks for the link to ros answers, I'm working on a fix for it. Then I'll look into the other issue.

Thanks all for your feedback.

efernandez commented 8 years ago

@nag92 @KFBIT I've solved this issue in #18

Could you git pull && git checkout fix_chapter9_launch and try again (from 2 terminals):

roslaunch chapter9_tutorials chapter9_configuration_gazebo.launch
roslaunch chapter9_tutorials move_base.launch
efernandez commented 8 years ago

@AaronMR @LuisSC @Anilm3 do any of you know if we have similar issues to this one somewhere else?

efernandez commented 8 years ago

Closing since I could reproduce and fix the issue... Please create a new issue if you still have the same or a similar issue, thanks.

I've also cherry-pick'd the changes into hydro and jade -devel

kfbixc commented 8 years ago

efernandez: hello,I download the code,but I find it is the same error for me .Could you check out it when you are in the spare time.I will appreciate your help, thank you.

kfbixc commented 8 years ago

hello,I copy the chapter7_tutorials chapter8_tutorials and chapter9_tutorials to my workspace and it succeed.I'm very appreciateful for your reply.I copied the chapter9_tutorials to my workspace and copied the urdf and meshes to chapter9_tutorials. I think it has error when I only changed path. I will check out other issues ,thank you . I find the error. Your chapter8_tutorials/urdf/robot1_base_04.xacro is different with chapter7_tutorials/robot1_description/urdf/robot1_base_04.xacro.I copied the chapter8_tutorials/urdf/robot1_base_04.xacro.Now I change it to chapter7_tutorials/robot1_description/urdf/robot1_base_04.xacro.It is OK. I remerbered when I launched the chapter9_tutorials/launch/chapter9_configuration_gazebo.launch,the gazebo would appear.But it doesn't appear this time.I will find this issuse.Thank you for your help.

kfbixc commented 8 years ago

hello,I found that Learning ROS for Robotics Programming Second Edition had some minor error.for example,a state_publisher.cpp in chapter7_tutorials is error in CMakeLists.txt(add_executable(state_publisher_tutorials ...)should be add_executable(state_publisher...) target_link_libraries()has the same error).But I don't know how to inform you when I find simlar minor error.I'm from China,My English is not too good.your book is very helpful for ros beginner.Thank you for taking the time to reply.

efernandez commented 8 years ago

@KFBIT First of all, thanks for your feedback, it's really appreciated.

I'm going to fix (or check if they're actually bugs/issues) the two errors you're mentioning:

  1. robot1_base_04.xacro discrepancy between chapter7 and 8
  2. chapter7 compilation issue for state_publisher

Gazebo is not supposed to appear when you run the chapter9 launch file. If you want it to appear put true in this line: https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition/blob/hydro-devel/chapter9_tutorials/launch/chapter9_configuration_gazebo.launch#L19

Don't worry for your English, I can follow you. But I'd appreciate if you could format your comments in a better way, because it's hard to read them when everything is in a single line. Simply at paragraph breaks and use the Markdown syntax.

You can report each issue/error you find as separate issues here, so I have a centralized place to see and solve them. Thanks!

efernandez commented 8 years ago

Regarding the error 2 that you're mentioning, there's no error. The executable target is called state_publisher_tutorials. You can give it any name you want actually. In the state_xacro.launch it's used with that name indeed.

efernandez commented 8 years ago

Regarding the error 1, this is the difference between them:

diff chapter7_tutorials/robot1_description/urdf/robot1_base_04.xacro chapter8_tutorials/urdf/robot1_base_04.xacro 
238c238
<     <robotNamespace></robotNamespace>
---
>     <robotNamespace>/</robotNamespace>
245,248c245
<     <commandTopic>cmd_vel</commandTopic>
<     <odometryTopic>odom</odometryTopic>
<     <robotBaseFrame>base_footprint</robotBaseFrame>
<     <odometryFrame>odom</odometryFrame>
---
>     <robotBaseFrame>base_link</robotBaseFrame>
251c248
<     <broadcastTF>1</broadcastTF>
---
>     <broadcastTF>0</broadcastTF>

I don't know if this is actually a problem or something intended on the book. @AaronMR @LuisSC Do you know?

Could you please tell me what are you running and what's the error that you see?

Please note that you need all the chapters, that is, all the code from the repo on the same workspace to work, because some chapters/packages depend on others. I'd appreciate if you create a new/clean workspace and simply git clone the repo, catkin build and then try. Thanks in advance. If you have an error, please create a new issue.

kfbixc commented 8 years ago

I'm sorry to my format,because I write comments in English at the first time. I will find the issues and write them down in a centralized way. Thank you for your help and encourage.

Thank you.

kfbixc commented 8 years ago

efernandez: hello,I'm sorry to bother you again. I want to run $roslaunch chatpter8_tutorials display_xacro.launch model:"rospack find chapter8_tutorials/urdf/robot1_base_04.xacro" in P287 of Chapter 8. But I can't find display_xacro.launch in chapter8_tutorials. Could you add it in your spare time? Thank you.

kfbixc commented 8 years ago

efernandez: hello,I'm sorry to bother you again. I change four wheels to three wheels and want to simulate in gazebo. I use libgazebo_ros_diff_drive.so instead of libgazebo_ros_skid_steer_drive.so in plugin. But it don't work. It is similar with @nag92.So I wonder where is wrong? Thank you.

efernandez commented 8 years ago

@KFBIT This issue is closed. Please, for new errors or questions create a new issues, one for each, and include the exact command you're running and the terminal output. Thanks.