navgation2 getRobotPose Extrapolation Error looking up robot pose

asked 2022-04-11 10:06:23 -0600

DC pig gravatar image

Hello everyone! Has anyone encountered with that? I run nav2 stack in one terminal and run my node in another terminal. I found something strange. When I get the robot pose in my node, it gave me the error and if I sleep my node for a few seconds the error disappeared. Another unusual thing is my node published a msg of OccupyGird type, and the static layer subscribed the topic. But when I use RCLCPP_INFO to show something, I found the timestamp of pub is later than the sub. How can I synchronize the time of the two processes? 3Q for your effort very much!

edit retag flag offensive close merge delete


add some log here... this is the pub log:

  [clean_node-2] [ERROR] [1649728804.675597110] [getCurrentPose]: Extrapolation Error looking up robot pose: Lookup would require extrapolation into the past.  Requested time 215.724000 but the earliest data is at time 216.404000, when looking up transform from frame [base_link] to frame [map]
[clean_node-2] [INFO] [1649728806.684941601] [clean_node]: 发布新地图...

and this is the sub log:

[planner_server-5] [INFO] [1649728804.185844769] [global_costmap.global_costmap]: StaticLayer: Received a 128 X 89 map at 0.050000 m/pix -1

you can see the sub log timestamp is earlier than the pub log.

DC pig gravatar image DC pig  ( 2022-04-11 21:06:41 -0600 )edit