Hi everyone,
I am completely stuck on a tf problem.
What I try to do is slam with a laser sensor and an imu with cartographer_ros.
According to the related tutorial, I define my physical layout of the robot in a urdf file:
>> > >>>> >> > > > >>>> >> > > > >>>> type="fixed">> > > >> type="fixed">> > > >>
This file clearly defines the transformation between base_link and imu_link as well as base_link with base_laser_link.
Than I call cartographer to do slam which is calling state_publisher.
However, cartographer shows an error that it cannot relate the imu_link to the base_link.
Also in tf viewer in rqt it is visible, that imu_link and base_link are not connected via a transformation, while base_link and base_laser_link are connected without problems. Did anyone of you have a similar issue?
Why doe the state_publisher not relate the imu_link with the base_link?
***Update***
The TF tree appears to be constructed correctly just using the robot state publisher.
This means the base_link is parent to imu_link and base_laser_link.
However, as soon as I start cartographer_ros node the tf tree is ripped appart.
Then it shows the new topic odom (which shall be generated by the slam)
which is parent to imu_link. Separatly (unconnected) to this also we still have the base_link topic which is parent to "base_laser_link".
The error the cartographer is throwing is:
"Could not find a connection between 'imu_link' and 'base_laser_link' because they are not part of the same tree.Tf has two or more unconnected trees.
The related cartographer config file is:
include "map_builder.lua"
include "trajectory_builder.lua"
options = {
map_builder = MAP_BUILDER,
trajectory_builder = TRAJECTORY_BUILDER,
map_frame = "map",
tracking_frame = "imu_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.,
}
TRAJECTORY_BUILDER_3D.num_accumulated_range_data = 160
MAP_BUILDER.use_trajectory_builder_3d = true
MAP_BUILDER.num_background_threads = 7
POSE_GRAPH.optimization_problem.huber_scale = 5e2
POSE_GRAPH.optimize_every_n_nodes = 320
POSE_GRAPH.constraint_builder.sampling_ratio = 0.03
POSE_GRAPH.optimization_problem.ceres_solver_options.max_num_iterations = 10
POSE_GRAPH.constraint_builder.min_score = 0.62
POSE_GRAPH.constraint_builder.global_localization_min_score = 0.66
return options
The idea is that the cartographer should fuse the imu and lidar data for localization (published as odom) and mapping. Do you have any clues?
Before starting cartographer

After starting cartographer:

Thanks a lot in advance!
↧