Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Autoware NDT_Matching not matching


I am currently attempting to run Autoware’s ndt_matching process with little success. I have gotten the ndt_matching to work in the ROSBAG Demo provided on the gitlab with the suggested/preset settings and with changing it from starting with GNSS to starting at an initial position of [0,0,0,0,0,0] and changing the type of matching (pcl_generic, pcl_anh, and pcl_openmp).

So far I have built a few .pcd map files with the ndt_mapping process and have attempted to use that to localize off of using a similar process to what is described in the example launch files:

  • my_mapping.launch with tf_launch (with the world to map transform set to 0,0,0 instead of the default values in the usual tf.launch) and the points_map_loader node with the .pcd file I created previously.
  • my_sensing.launch with a driver for a 64-plane Ouster LiDAR that outputs a topic /os1_cloud_node/points in PointCloud2 format and a driver for a Microstrain IMU that outputs /gps/fix and translates that into the /fix topic required by ndt_matching (of msg type NavSatFix)
  • my_localization.launch:

    • setup_tf.launch of base_link to os1_lidar
    • vehicle_model.launch that loads the urdf file for my vehicle and starts the joint_state_publisher and robot_state_publisher nodes
    • points_downsample.launch where it looks at the /os1_cloud_node/points topic (remaped from the /points_raw topic) for point values and I have tried multiple values for the voxel_grid_filter
    • fix2tfpose.launch

    I then go in manually to add the ndt_matching from the Runtime Manager (and have started also using ndt_matching_monitor from there as well).

Since the ndt_mapping process does not seem to include gnss data from the bag file, I initialize the position with [0,0,0,0,0,0]. Predict Pose is ON. I have increased and decreased the following values individually and in combination: Error Threshold, Resolution, Step Size, Transformation Epsilon, and Maximum Iterations for three of the four Method Types (pcl_generic, pcl_anh, and pcl_openmp) {did not use the pcl_anh_gpu due to memory errors on my computer related to the gpu} I am not using Odometry nor IMU but I do have Get Height checked because that was what the original ndt_matching had as its option on the original my_localization.launch. I have started with the preset settings (the ones that are used and work on the ROSBAG demo) of Error Threshold=1, Resolution=1, Step Size=0.1, Transformation Epsilon=0.01, and Maximum Iterations=30, but again have increased/decreased those values and tested the results.

I have created 3 .pcd maps: two of the area surrounding my building, with a different [0,0,0] for both, and one inside my lab. Initially, when using the outside maps, I was having the problem (mostly with pcl_openmp) of the ndt_matching initially checking around the start point but then eventually zooming off the map unable to recover. However, now even when I run the map inside my lab and the vehicle has not moved from the position where the map was recorded, the ndt_matching still fails, or rather fails successfully.

What I mean by that: the ndt_matching_monitor reports success despite the ndt_matching point cloud not being correctly matched to the pcd map (visualized in Rviz). I tried it first with the initial position being in the same orientation as the map, and also have it rotated 90deg and 180deg, all three reporting NDT OK despite that not being the case. (voxel grid size 0.5 for the /filtered_points) [these photos are in the following google drive link)

After messing with the ROSBAG demo some more I figured it might be that the vehicle needed to move so that the input point cloud would change and make the ndt_matching realize it was incorrect, but after taking it outside again with the outside maps, this was not the case as far as I could tell.

I have attached the two outside map I created, and their associated bag file. The bag files only contains the /fix topic and the /os1_cloud_node/points topic because those were the only topics in the bag file for the ROSBAG demo, along with /tf and /tf_static.

My current specs are: Ubuntu 18.04 Kernel 5.0 ROS Melodic Autoware 1.12 Installation Method: Docker

Any help on this would be greatly appreciated as I am lost and new to most of this. Thank you!