cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.17k stars 2.25k forks source link

Trajectories organization #1233

Open andrea-pallini opened 6 years ago

andrea-pallini commented 6 years ago

I am currently working on the visualization of the 3D map point cloud in real time (for reference about my project: #1134).

I want to publish two point clouds:

In order to complete this task, I would like to ask you more about the data organization and in particular about the "trajectories".

1) When a trajectory is finished calling the service "/finish_trajectory", how do I start a new trajectory? I tried to use the "/start_trajectory" service call but it gives me always errors. such as: a)

Check failed: options.num_subdivisions_per_laser_scan >= 1 (0 vs. 1)

service message:

rosservice call /start_trajectory "options: {tracking_frame: '', published_frame: '', odom_frame: '', provide_odom_frame: false, use_odometry: false, use_nav_sat: false, use_landmarks: false, publish_frame_projected_to_2d: false, num_laser_scans: 0, num_multi_echo_laser_scans: 0, num_subdivisions_per_laser_scan: 0, num_point_clouds: 0, rangefinder_sampling_ratio: 0.0, odometry_sampling_ratio: 0.0, fixed_frame_pose_sampling_ratio: 0.0, imu_sampling_ratio: 0.0, landmarks_sampling_ratio: 0.0, trajectory_builder_options_proto: ''} topics: {laser_scan_topic: '', multi_echo_laser_scan_topic: '', point_cloud2_topic: '', imu_topic: '', odometry_topic: '', nav_sat_fix_topic: '', landmark_topic: ''}"

b)

expected <'block end'>, but found '<'scalar'>' in "<'string'>", line 1, column 516: ... ory_builder_options_proto: 'a'} topics: {laser_scan_topic: 'a', ...

service message:

rosservice call /start_trajectory "options: {tracking_frame: 'base_link', published_frame: 'odom', odom_frame: 'odom', provide_odom_frame: false, use_odometry: true, use_nav_sat: false, use_landmarks: false, publish_frame_projected_to_2d: false, num_laser_scans: 0, num_multi_echo_laser_scans: 0, num_subdivisions_per_laser_scan: 1, num_point_clouds: 1, rangefinder_sampling_ratio: 1.0, odometry_sampling_ratio: 1.0, fixed_frame_pose_sampling_ratio: 1.0, imu_sampling_ratio: 1.0, landmarks_sampling_ratio: 1.0, trajectory_builder_options_proto: 'a'} topics: {laser_scan_topic: 'a', multi_echo_laser_scan_topic: 'b', point_cloud2_topic: 'c', imu_topic: 'd', odometry_topic: 'e', nav_sat_fix_topic: 'f', landmark_topic: 'g'}"

  1. Every new trajectory has its own origin or there is a "global origin" where all the trajectories refer to (maybe: 0,0,0 in trajectory 0)?

  2. Does Trajectory 1 use the information in Trajectory 0 for loop closure detection and optimization?

  3. When is it necessary to finish a trajectory? Any suggestions?

These are some of the doubts that I have in my mind at the moment and I didn't find any specific information regarding trajectories in the documentation (https://media.readthedocs.org/pdf/google-cartographer/latest/google-cartographer.pdf). I read Chapter 2 and it explains the evaluation between multiple trajectories but it did not solve my doubts.

nijilong1224 commented 3 years ago

https://github.com/cartographer-project/cartographer_ros/issues/1225#issue-421339161 might this would help