Nav2 local_costmap not created. Possible problem with transformations.

asked 2022-07-04 06:32:55 -0500

marpeja gravatar image

Hello!

I am trying to navigate a robot using Nav2 through a map I built with Rtabmap. I had no problem at all with the global costamp built, however, the local costmap doesn't appear. My first idea is that it has to do with the transform between the base_link and my camera_frame, as I am using a depth camera to build the local costmap. The Pointcloud2 detected with the camera, and published through the /camera/points topic is my observation source of the voxel layer I am trying to build in the local costmap. Sadly, this pointcloud can't be seen in Rviz where my fixed_frame is map. If I change the fixed_frame to camera_frame, I do see it, that's why I think that it has to do with transformations.

One of the solutions I found on the internet was to set all my nodes with use_sim_time:=True, so that they all have the same clock. I had my simulation node with that value set to True by default, my RtabMap node with it set to False by default, and my Nav2 node set to True by default. Firstly I changed the Rtabmap node's parameter to True, but it stopped working. Secondly, I set them all to False, but again it didn't work properly.

With the first configuration mentioned, I keep getting these traces:

In RTABMAP:

[ WARN] (2022-07-04 12:20:00.935) MsgConversion.cpp:1729::getTransform() (can transform world -> base_link?) Lookup would require extrapolation into the past.  Requested time
282.400000 but the earliest data is at time 1656929991.930751, when looking up transform from frame [base_link] to frame [world]. canTransform returned after 0.200662 timeout was 0.2. (wait_for_transform=0.200000) [rtabmapviz-2] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 282.900000 according to authority Authority undetectable [rtabmapviz-2] Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained [rtabmapviz-2]          at line 332 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp

In Nav2:

[planner_server-2] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 50.670000 according to authority Authority undetectable
[planner_server-2] Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
[planner_server-2]          at line 332 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp
[controller_server-1] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 50.670000 according to authority Authority undetectable
[bt_navigator-4] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 50.670000 according to authority Authority undetectable
[rviz2-7] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 50.720000 according to authority Authority undetectable
[recoveries_server-3] Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 50.720000 according to authority Authority undetectable

Does anyone know where the problem might be?

Pd: I am only using a bt_navigator, controller_server, planner_server, local_costmap, global_costmap and recovery_server in my Nav2 config file as I don't need ACML to localize the robot (RtabMap does it ... (more)

edit retag flag offensive close merge delete

Comments

use_sim_time should be used only if you are in a simulated environment or a rosbag is used. You said "Firstly I changed the Rtabmap node's parameter to True, but it stopped working", were there warnings?

matlabbe gravatar image matlabbe  ( 2022-10-09 21:50:41 -0500 )edit