karlkurzer / path_planner

Hybrid A* Path Planner for the KTH Research Concept Vehicle
http://karlkurzer.github.io/path_planner/
BSD 3-Clause "New" or "Revised" License
1.49k stars 526 forks source link

Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "map" from authority "unknown_publisher" because of a nan value in the transform (nan 0.000000 0.500000) (0.000000 0.000000 0.000000 1.000000) #37

Closed JokerWhy233 closed 3 years ago

JokerWhy233 commented 3 years ago

Hi,sometimes,this error will happen, what should i do to change this? thanks Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "map" from authority "unknown_publisher" because of a nan value in the transform (nan 0.000000 0.500000) (0.000000 0.000000 0.000000 1.000000)

karlkurzer commented 3 years ago

I think this would be related to http://wiki.ros.org/map_server

xinkai-z commented 3 years ago

In the default "manual" mode, the map topic name is "/map" instead of "/occ_map". So any subscribers that subscribe to the "/occ_map" topic could not be initialized properly, which could lead to nan values.

To fix this specific problem, you can change line 24 in "/path_planner/src/tf_broadcaster.cpp" to: ros::Subscriber sub_map = n.subscribe("/map", 1, setMap);