I already found out that I have to set the localization mode to false first.
It still does not work. I get the error messages in rtabmap:
[ INFO] [1633977903.070727874]: Odom: quality=337, std dev=0.015768m|0.068844rad, update time=0.223289s
[ INFO] [1633977903.289025833]: rtabmap (113): Rate=1.00s, Limit=0.000s, Conversion=0.0021s, RTAB-Map=0.2129s, Maps update=0.0008s pub=0.0000s (local map=6, WM=6)
[ WARN] (2021-10-11 20:45:04.121) OdometryF2M.cpp:529::computeTransform() Registration failed: "Not enough inliers 7/20 (matches=141) between -1 and 124" (guess=xyz=0.000173,-0.003361,-0.004406 rpy=-0.000072,-0.001769,0.001053)
[ WARN] (2021-10-11 20:45:04.122) OdometryF2M.cpp:290::computeTransform() Failed to find a transformation with the provided guess (xyz=0.000173,-0.003361,-0.004406 rpy=-0.000072,-0.001769,0.001053), trying again without a guess.
[ WARN] (2021-10-11 20:45:04.441) OdometryF2M.cpp:539::computeTransform() Trial with no guess succeeded!
[ INFO] [1633977904.453612297]: Odom: quality=259, std dev=0.036711m|0.077304rad, update time=0.532540s
[ INFO] [1633977904.675536318]: rtabmap (114): Rate=1.00s, Limit=0.000s, Conversion=0.0020s, RTAB-Map=0.2168s, Maps update=0.0006s pub=0.0000s (local map=6, WM=6)
My r_l ekf.yaml file looks like this:
frequency: 20
silent_tf_failure: false
sensor_timeout: 1.5
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false
permit_corrected_publication: false
map_frame: map # Defaults to "map" if unspecified
odom_frame: odom # Defaults to "odom" if unspecified
base_link_frame: base_link # Defaults to "base_link" if unspecified
world_frame: odom # Defaults to the value of odom_frame if unspecified
odom0: ackermann_odom
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, false,
false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: false #default false
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
odom1: /rtabmap/visual_odom
odom1_config: [false, false, false,
false, false, false,
false, false, false,
false, false, true,
false, false, false]
odom1_differential: false
odom1_relative: false
odom1_queue_size: 2
odom1_pose_rejection_threshold: 2
odom1_twist_rejection_threshold: 0.2
odom1_nodelay: false
use_control: true
stamped_control: false
control_timeout: 0.2
control_config: [true, false, false, false, false, true]
acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]
deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]
acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]
deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
process_noise_covariance: [0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0 ...
(more)
yes, but if covariance in odometry topic is underestimated, it may reject the loop closures. Look at the terminal for possible warnings like "loop closure rejected because...".
thank you matlabbe! but what do you mean with covariance in odometry? do you mean the process_noise_covariance and initial_estimate_covariance? If yes, how can I adjust it?