rosbook / effective_robotics_programming_with_ros

Effective Robotics Programming with ROS
https://www.packtpub.com/hardware-and-creative/effective-robotics-programming-ros-third-edition
233 stars 154 forks source link

chapter 6: Waiting on transform from /base_footprint to /map to become available before running costmap, tf error: #15

Open stevealbertwong opened 6 years ago

stevealbertwong commented 6 years ago

I am running roslaunch chapter6_tutorials move_base.launch on kinetic it seems to be a issue happened before but I could not find answer on how it is solved.

https://answers.ros.org/question/224242/tf-transformation-with-move_base/ https://answers.ros.org/question/195175/waiting-on-transform-from-base_footprint-to-map-to-become-available-before-running-costmap-tf-error/ https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition/issues/17

this is my log 2018-04-11 20:02:02 ⌚ steve-ThinkPad-X220 in ~/dev/catkin_ws ± |master ✓| → roslaunch chapter6_tutorials move_base.launch ... logging to /home/steve/.ros/log/9a3117c6-3d7f-11e8-a81a-a088b4e53910/roslaunch-steve-ThinkPad-X220-9931.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://steve-ThinkPad-X220:42859/

SUMMARY

PARAMETERS

NODES / amcl (amcl/amcl) map_server (map_server/map_server) move_base (move_base/move_base)

ROS_MASTER_URI=http://localhost:11311

process[map_server-1]: started with pid [9948] process[amcl-2]: started with pid [9949] process[move_base-3]: started with pid [9951] [ INFO] [1523448893.588287083]: Loading map from image "/home/steve/dev/catkin_ws/src/chapter6_tutorials/maps/map.pgm" [ WARN] [1523448893.680908610]: ignoring NAN in initial pose X position [ WARN] [1523448893.683735113]: ignoring NAN in initial pose Y position [ INFO] [1523448893.732907166]: Requesting the map... [ WARN] [1523448893.733614535]: Request for map failed; trying again... [ INFO] [1523448893.792339989]: Read a 4000 X 4000 map @ 0.050 m/cell [ INFO] [1523448894.253528562]: Sending map [ INFO] [1523448894.286647263]: Received a 4000 X 4000 map @ 0.050 m/pix

[ WARN] [1523448894.837868726]: ignoring NAN in initial pose X position [ WARN] [1523448894.839484492]: ignoring NAN in initial pose Y position [ INFO] [1523448894.852266034]: Initializing likelihood field model; this can take some time on large maps... [ INFO] [1523448895.350413585]: Done initializing likelihood field model. [ WARN] [1523448898.794508792]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.101473 timeout was 0.1. [ WARN] [1523448903.862222936]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.101284 timeout was 0.1. [ WARN] [1523448908.920670194]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.101244 timeout was 0.1. [ WARN] [1523448910.476452149]: No laser scan received (and thus no pose updates have been published) for 1523448910.476290 seconds. Verify that data is being published on the /scan topic. [ WARN] [1523448913.988248548]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.101114 timeout was 0.1.

node graph: screenshot from 2018-04-13 12-31-36

37072361-f42a2b72-21fb-11e8-92ad-836125f6ce8e

I implemented a quick fix which is run the odometry.cpp. The robot does move but in a artificially predefined way by odometry.cpp.

screenshot from 2018-04-12 17-54-23

screenshot from 2018-04-13 12-12-19

I wonder how could implement sendgoals.cpp and make the robot runs with a goal on map according to global and local planning with obstacles avoidance.

stevealbertwong commented 6 years ago

I have fixed the warnning of [ WARN] [1523448910.476452149]: No laser scan received (and thus no pose updates have been published) for 1523448910.476290 seconds. Verify that data is being published on the /scan topic. [ WARN] [1523448913.988248548]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.101114 timeout was 0.1. by adding to launch file static_transform_publisher and mapped map to odom, odom to base_footprint but i still have the issue when i give it a direction/goal, it does not move. i wonder its because of my config if local planner or other files ?

Xunzhaocunzi commented 6 years ago

I have the exactly same issue. Help please.

In addition, when I run "roslaunch chapter6_tutorials chapter6_configuration_gazebo.launch", I got something like this, rather than the contents shown in the book: screenshot from 2018-10-31 00-51-25

For instance, my model did not have "Robot Footprint", "Global Panner", etc.

I guess that was caused by using different "chapter6_configuration_gazebo.launch" file.

Can authors update the files for chapter6? Thank you.

wx0205 commented 5 years ago

I have the exactly same issue. Help please.Could you tell me how to solve it?Thank you! @stevealbertwong