0
$\begingroup$

Rosanswers logo

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 :

image description

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 !


Originally posted by Mackou on ROS Answers with karma: 196 on 2019-10-10

Post score: 1


Original comments

Comment by Josh Whitley on 2019-10-10:
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?

Comment by Mackou on 2019-10-10:
Thanks for your answer !

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

Comment by Josh Whitley on 2019-10-21:
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.

Comment by Mackou on 2019-10-21:
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 !

Comment by Yamato Ando on 2019-11-08:
@Mackou Is it still not solved? If you can share your rosbag, I may be able to help you.

Comment by Mackou on 2019-11-08:
@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 ! :)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

@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
min_add_scan_shift: 1.0"

Originally posted by Yamato Ando with karma: 231 on 2019-11-08

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Mackou on 2019-11-08:
@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 !

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

image description

Comment by Yamato Ando on 2019-11-08:\

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/autoware/blob/feature/ndt_slam_for_pr/ros/src/computing/perception/localization/packages/lidar_localizer/nodes/ndt_slam/README.md

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

Maybe yes. You probably need to tune again.

Comment by Yamato Ando on 2019-11-08:\

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.

Comment by Mackou on 2019-11-08:
@Yamato Ando

Thanks a lot for your time and your extremely valuable answers 🙏

You answered all my questions so far

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.