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

slam_toolbox incomplete mapping

asked 2022-03-24 14:13:26 -0600

nigeno gravatar image

updated 2022-03-24 14:20:43 -0600

Installed slam_toolbox on Foxy, Ubuntu 20.04:

sudo apt install ros-foxy-slam-toolbox

Set up the yaml like:

odom_frame: odom
    map_frame: map
    base_frame: base_link
    scan_topic: /scan

Run

ros2 launch slam_toolbox online_sync_launch.py

Provided transforms:

odom -> base_link - dynamic from odom node (or static for testing - the same result)

base_link -> laser - static

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 base_link laser

I see the /map topic in Rviz.

image description

Rviz has an error but still show the map:

[INFO] [1648148542.387284934] [rviz2]: Trying to create a map of size 299 x 171 using 1 swatches
[ERROR] [1648148542.393145177] [rviz2]: Vertex Program:rviz/glsl120/indexed_8bit_image.vert Fragment Program:rviz/glsl120/indexed_8bit_image.frag GLSL link result : 
active samplers with a different type refer to the same texture image unit

The messages from slam_toolbox node:

INFO] [launch]: All log files can be found below /home/ys/.ros/log/2022-03-24-15-01-57-027859-ys-ubuntu-39307
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sync_slam_toolbox_node-1]: process started with pid [39309]
[sync_slam_toolbox_node-1] [INFO] [1648148517.251239498] [slam_toolbox]: Node using stack size 40000000
[sync_slam_toolbox_node-1] [INFO] [1648148517.343822743] [slam_toolbox]: Using solver plugin solver_plugins::CeresSolver
[sync_slam_toolbox_node-1] [INFO] [1648148517.345019501] [slam_toolbox]: CeresSolver: Using SCHUR_JACOBI preconditioner.
[sync_slam_toolbox_node-1] Registering sensor: [Custom Described Lidar]

Why do I have this weird looking map? With the same input I'm getting a perfect map with gmapping slam.

It's not only Rviz issue BTW. I'm really getting occupancy grid 2D array with this layout.

It appears like the mapping looks good in the area close to the scanner. Could it be that it's the maximum distance issue? My scanner is long range laser and the grid on the pic is 1m.

edit retag flag offensive close merge delete

Comments

Have you tried running slam toolbox in async mode? When I run mine in sync mode, I only get one scan result (similar to what you posted) and with async I get better results.

iangillespie gravatar image iangillespie  ( 2022-03-24 15:23:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-25 15:32:25 -0600

nigeno gravatar image

Thank you. Actually when I moved the scanner, the mapping filled itself, so it appears like the behavior is normal, though was not as expected compared to how gmapping built the same map.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-24 14:13:26 -0600

Seen: 464 times

Last updated: Mar 24 '22