ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ndt_mapping processing only the first message

asked 2019-10-10 04:56:14 -0500

Mackou gravatar image

updated 2021-12-03 09:50:31 -0500

Evgeny gravatar image

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 !

edit retag flag offensive close merge delete

Comments

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?

Josh Whitley gravatar image Josh Whitley  ( 2019-10-10 07:11:28 -0500 )edit

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

Mackou gravatar image Mackou  ( 2019-10-10 08:03:59 -0500 )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.

Josh Whitley gravatar image Josh Whitley  ( 2019-10-21 08:38:30 -0500 )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 !

Mackou gravatar image Mackou  ( 2019-10-21 08:50:18 -0500 )edit
1

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

Yamato Ando gravatar image Yamato Ando  ( 2019-11-08 01:00:21 -0500 )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 ! :)

Mackou gravatar image Mackou  ( 2019-11-08 01:22:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-11-08 03:13:06 -0500

Yamato Ando gravatar image

@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"
edit flag offensive delete link more

Comments

@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

Mackou gravatar image Mackou  ( 2019-11-08 03:25:09 -0500 )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.

Yamato Ando gravatar image Yamato Ando  ( 2019-11-08 04:03:22 -0500 )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.

Yamato Ando gravatar image Yamato Ando  ( 2019-11-08 04:06:18 -0500 )edit

@Yamato Ando

Thanks a lot for your time and your extremely valuable answers ๐Ÿ™

You answered all my questions so far

Mackou gravatar image Mackou  ( 2019-11-08 04:10:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-10 04:56:14 -0500

Seen: 860 times

Last updated: Nov 08 '19