Map frame not provided by ndt_map_publisher in Autoware.Auto

asked 2020-04-30 08:02:23 -0500

Lucas Molia gravatar image

updated 2020-06-01 05:18:38 -0500

Hi all,

I'm running ROS Dashing on Ubuntu 18.04 x86_64. I have installed Autoware.Auto following this guide so all my nodes and commands are running under the ade environment.

I am trying to use localization from Autoware, with NDT nodes. The nodes I am running are :

  • ndt_map_publisher_exe which provides the map from my PCD file
  • voxel_grid_cloud_node_exe to downsample it for visualization
  • p2d_ndt_localizer_exe
  • rviz2 for visualization

At this point I have the error : [p2d_ndt_localizer_node]: "map" passed to lookupTransform argument target_frame does not exist.

The map frame should be provided by ndt_map_publisher_exe node so I don't understand why I get this error. I can see the map in Rviz, and the downsampled one too.

Note : I have noticed that when I run ros2 topic echo viz_ndt_map lot of data are printed but nothing when I try on ndt_map topic. I'm not sure this is really a problem, maybe this command just cannot print data coming from this topic.

As map frame seems not to be published by the ndt_map_publisher_exe node, I tried to run ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 earth map to try to "create" this frame.

Then the error becomes : [p2d_ndt_localizer_node]: Could not find a connection between 'map' and 'laser_frame' because they are not part of the same tree.Tf has two or more unconnected trees.

So I tried one last thing to fix it. I gave a static transform between base_link and laser_frame (in which the lidar is publishing its pointcloud), and another one between map and base_link, which doesn't makes sense in my opinion because this transform is not supposed to be static and must be provided by the p2d_ndt_localizer_exe node (it is its exact purpose...).

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 base_link laser_frame

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 map base_link

Now, I get only an warning : Relative localizer has an invalid pose estimate. The result is ignored..

As I could expect, no localization is done. Giving an inital pose with Rviz does not change anything. I also tried to change the static transform between map and base_link that I provide to make the lidar pointcloud and the map overlapping in Rviz, just to help ndt node to match, but I didn't have any result.

Notes :

  • I have a RPLidar A3 which sends Laserscan that I convert into a pointcloud2. I duplicate the scan along the z-axis to obtain a kind of 3D pointcloud, which is relevant regarding the map I use.
  • I am trying to use Autoware.Auto with a Turtlebot, which is obviously much smaller than a car. This difference in scale is probably not the source of the problem here, it can be an issue for localization but I think it is not related to the errors I have
  • I think that no tf data is published at all by the nodes (except static_transform_publisher of course)

Thank you for your help

Lucas

edit retag flag offensive close merge delete