# ndt_mapping processing only the first message

Hello everyone. I am trying to generate a point cloud map using a lidar recording with ndt_mapping and I have a very weird behavior.

The process seems do do fine but the generated map seems to contain only the first message.

Here's the output map :

But it seems that it randomly works sometimes but I don't find any pattern.

Here you can find the output of ntd_output : https://pastebin.com/FC2wRwyE

Nothing is wrong for me except the number of saved points at the end.

Do you have any idea what could be the problem ? Thanks a lot !

edit retag close merge delete

1

I have recently used ndt_mapping to create a new PCD map. What is the process that you're using? What launch file? What parameters? Did you send the service call to save the PCD file? How are you feeding it the input data?

( 2019-10-10 07:11:28 -0600 )edit

Here's how I proceed :

• I start ROS with rosstart
• I start ndt_mapping with the command roslaunch lidar_localizer ndt_mapping.launch and then the arguments.
• I play the previously recorded bag file.
• To export the map use the command rostopic pub --once /config/ndt_mapping_output autoware_config_msgs/ConfigNDTMappingOutput and then the header

I am not using the GUI as I think it's way simpler to do it with the command line, and my CPU is going crazy because of RViz

I also want to run the mapping on the cloud later

( 2019-10-10 08:03:59 -0600 )edit
1

Sorry I haven't responded recently. We are in the middle of releasing Autoware version 1.13.0 and the maintainers have been very busy. What you are doing seems correct. Do you have some form of additional data for dead-reckoning (like IMU or odometry)? Your log says you were using method 2 for NDT Mapping - have you tried method 0? All of the GPU-based methods are known to have bugs, especially on large maps.

( 2019-10-21 08:38:30 -0600 )edit
1

I totally understand I am already very happy that you take some time to answer me !

No, I recorded a bag file containing only /points_raw as I thought ndt_mapping was only using this topic.

I can try to record another bag file with IMU or odometry topics. I was also thinking about using /initialpose before playing my rosbag.

Thanks a lot for your help !

( 2019-10-21 08:50:18 -0600 )edit
1

@Mackou Is it still not solved? If you can share your rosbag, I may be able to help you.

( 2019-11-08 01:00:21 -0600 )edit

@Yamato Ando Thanks for your answer. I generated one map when it started to suddenly work but it is still totally random... Do you think it's a localization problem and that sending a pos estimate in /initialpose would help ? (I tried but it doesn't seem to help, playing the rosbag quickly to fill the queue appears to make it work more often though)

Thanks a lot for your help, it's greatly appreciated ! :)

( 2019-11-08 01:22:17 -0600 )edit

Sort by » oldest newest most voted

@Mackou Thank you for sharing rosbag.

The same problem occurred on my PC. This rosbag is a simulation environment, right? There is a problem that the simulation environment has too few features compared to the real environment, and matching does not work well.

It may be improved by adjusting the parameters. The following parameters worked well in my environment for reference. (resolution default 1.0 → 3.0)

rostopic pub --once --latch /config/ndt_mapping autoware_config_msgs/ConfigNDTMapping "header:
seq: 0
stamp: {secs: 0, nsecs: 0}
frame_id: ''
resolution: 3.0
step_size: 0.1
trans_epsilon: 0.01
max_iterations: 30
leaf_size: 1.0
min_scan_range: 5.0
max_scan_range: 200.0

more

@Yamato Ando

Yes it is a simulation environnement, and thanks a lot it seems to work !

Do you know where I can find the documentation of lidar_localizer/ndt_mapping to understand exactly what you changed ? Will I need to tune it again when generating a real world PCD map ?

Also, the environment in the simulation is perfectly flat but the generated pcd map is not, do you know how I can improve this ?

Other question, what determines the orientation of the map, because some maps I have generated have different orientations and I don't know why.

Thanks a lot for your time, you've helped me a lot !

 Here's the PCD map colored relative to the Z axis :

( 2019-11-08 03:25:09 -0600 )edit
1

Do you know where I can find the documentation of lidar_localizer/ndt_mapping to understand exactly what you changed ?

Unfortunately, there is no official Autoware documentation. However, the improved version of ndt_mapping I made a year ago has documentation, so it may be helpful. https://github.com/YamatoAndo/autowar...

Will I need to tune it again when generating a real world PCD map ?

Maybe yes. You probably need to tune again.

( 2019-11-08 04:03:22 -0600 )edit
1

the environment in the simulation is perfectly flat but the generated pcd map is not, do you know how I can improve this ?

I think it would be better to tune the params, but it is difficult to reproduce the simulation environment perfectly. There are a few errors in NDT scan matching.

what determines the orientation of the map, because some maps I have generated have different orientations and I don't know why.

The orientation of the map is determined when the first scan is read. If the timing of rosbag playback and ndt_mapping launch is always the same, I think it will be the same direction.

( 2019-11-08 04:06:18 -0600 )edit

@Yamato Ando

You answered all my questions so far

( 2019-11-08 04:10:29 -0600 )edit