-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using Odometry data in 2d Cartographer #1569
Comments
the same to me |
What command do you use to play back the rosbag? (do you use --clock or not?) |
Yes, I do use --clock. |
|
I assume you have recorded the clock as well. If you use |
Hi, And indeed it was the issue and so no more warning messages. So everything looks good. The only thing is in order to run the Cartographer I'm using a low value for odometry_sampling_ratio as mentioned earlier. |
@shrijan00 Low value for the odometry sampling ratio is only hiding the problem. That is a bad solution. Guys, sorry for introducing these sampling ratio options, it is partially my fault. I originally introduced it for the lidar (which actually makes a lot of sense, it’s a cheap way to speed things up if slam works okay for you using a fraction of the lidar data). Then, for “completeness” we added the sampling ratios for odometry and also for the imu (which is especially silly, in retrospective). The result is that many people concluded they could “fix” their timing issues by just decimating their odometry or imu data. I propose we remove the odometry and imu sampling ratio options, or print fat warning or require special flags to discourage users from using these options. |
@ojura Yeah Exactly. Even I was not satisfied with the following solution but it made it work so I ignored it. Apart from using odometry sampling ratio, is there no other way to fix this since I do need the odometry data along with LiDAR for my application? |
@shrijan00 |
Hi all,
So I recorded a bag file consisting of 2d lidar scan, tf, tf_static and odometry data(fusing imu and wheel odom).
rosbag record /tf /tf_static /odometry/filtered /scan
So when i try to use the bag file in cartography without the odometry, it works perfectly fine.
In that case I'm using this configuration
`include "map_builder.lua"
include "trajectory_builder.lua"
options = {
map_builder = MAP_BUILDER,
trajectory_builder = TRAJECTORY_BUILDER,
map_frame = "map",
tracking_frame = "base_link",
published_frame = "base_link",
odom_frame = "odom",
provide_odom_frame = true,
publish_frame_projected_to_2d = false,
use_odometry = false,
use_nav_sat = false,
use_landmarks = false,
num_laser_scans = 1,
num_multi_echo_laser_scans = 0,
num_subdivisions_per_laser_scan = 1,
num_point_clouds = 0,
lookup_transform_timeout_sec = 0.2,
submap_publish_period_sec = 0.3,
pose_publish_period_sec = 5e-3,
trajectory_publish_period_sec = 30e-3,
rangefinder_sampling_ratio = 1.,
odometry_sampling_ratio = 1.,
fixed_frame_pose_sampling_ratio = 1.,
imu_sampling_ratio = 1.,
landmarks_sampling_ratio = 1.,
}
MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
TRAJECTORY_BUILDER_2D.use_imu_data = false
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.linear_search_window = 0.15
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.angular_search_window = math.rad(35.)
POSE_GRAPH.optimization_problem.huber_scale = 1e2
return options`
and my launch file is this
and my tf tree is proper in this case
So, the issue comes when I want to use the odometry. For that I just change
use_odometry = true
in the above lua. And using the same launch file when I try to run I get this errorCan anyone please help me how to enable the odometry so that the cartographer can access both lidar and odometry data to build map and localise itself.
The text was updated successfully, but these errors were encountered: