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

Revision history [back]

After an extensive investigation involving adjusting various parameters innav2_params.yaml and experimenting with different positions and orientations of the LiDAR sensor, I discovered that the issue was not related to the sensor's range, pose, FOV, or any other related factors.

The root of the problem lies in the configuration of theslam-toolbox package. For some reason, it was misconfigured and did not work properly with the local costmap and voxel layer.

When running a static transform publisher (map --> odom):

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 map odom

Both local and global costmaps are generated, but the map itself is not produced:

image description

image description

Adjustments were made to the Voxel map range (width, height), and the raytrace range was increased to better suit the robot's dimensions and the environment's size.

However, when running the slam dynamic transform (map --> odom) using :

ros2 launch slam_toolbox online_sync_launch.py

The map and global costmap are generated, but the local costmap is not (even for the TurtleBot3 Waffle tutorial example or for my robot):

image description

A closer examination of the /tf topic reveals differences between the transforms when using the slam-toolbox async node and the static transform.

  1. slam-toolbox async node:

    transforms:

    • header: stamp: sec: 47 nanosec: 381000000 frame_id: map child_frame_id: odom transform: translation: x: 3.4662790218048424e-06 y: -2.2171464780663484e-07 z: -0.400019324960254 rotation: x: -2.7712992106286824e-07 y: -4.332639404341957e-06 z: 1.1986118037611005e-12 w: 0.9999999999905756
  2. static transform:

    transforms:

    • header: stamp: sec: 33 nanosec: 2000000 frame_id: base_link child_frame_id: front_right_wheel_link transform: translation: x: -3.2499989040327493 y: 1.2520667826055543 z: -0.45000779162129184 rotation: x: -0.012252524447226376 y: -0.01215788318895235 z: 0.7069631355290587 w: 0.7070397347560856

There is not aperiodic transform published between the map and odom using static transform, I just infer that probably the local costmap plugin maybe executes this transform (not sure) and when using the slam mapping node, it kind that is overlaid by the periodic transform between from odom to map frame causing conflicts ???....

It's unclear how the Voxel grid plugin code is integrated with the slam-toolbox and how it affects the local costmap generation. Further investigation into the interplay between these components is needed to pinpoint the exact cause of the issue.

In summary, the problem seems to stem from the slam-toolbox configuration and its interaction with the local costmap and voxel layer. A thorough investigation of the relevant components and their interdependencies could potentially reveal the root cause and offer a more permanent solution.

After an extensive investigation involving adjusting various parameters innav2_params.yaml and experimenting with different positions and orientations of the LiDAR sensor, I discovered that the issue was not related to the sensor's range, pose, FOV, or any other related factors.

The root of the problem lies in the configuration of theslam-toolbox package. For some reason, it was misconfigured and did not work properly with the local costmap and voxel layer.

When running a static transform publisher (map --> odom):

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 map odom

Both local and global costmaps are generated, but the map itself is not produced:

image description

image description

Adjustments were made to the Voxel map range (width, height), and the raytrace range was increased to better suit the robot's dimensions and the environment's size.

However, when running the slam dynamic transform (map --> odom) using :

ros2 launch slam_toolbox online_sync_launch.py

The map and global costmap are generated, but the local costmap is not (even for the TurtleBot3 Waffle tutorial example or for my robot):

image description

A closer examination of the /tf topic reveals differences between the transforms when using the slam-toolbox async node and the static transform.

  1. slam-toolbox async node:

    transforms:

    • header: stamp: sec: 47 nanosec: 381000000 frame_id: map child_frame_id: odom transform: translation: x: 3.4662790218048424e-06 y: -2.2171464780663484e-07 z: -0.400019324960254 rotation: x: -2.7712992106286824e-07 y: -4.332639404341957e-06 z: 1.1986118037611005e-12 w: 0.9999999999905756
  2. static transform:


    transforms:

    • header: stamp: sec: 33 nanosec: 2000000 92000000 frame_id: odom child_frame_id: base_link child_frame_id: front_right_wheel_link transform: translation: x: -3.2499989040327493 -0.02042282951343617 y: 1.2520667826055543 -0.014272684253787292 z: -0.45000779162129184 0.8999813856701359 rotation: x: -0.012252524447226376 3.8079219550742497e-08 y: -0.01215788318895235 3.443628320324917e-06 z: 0.7069631355290587 -0.0021973022911122857 w: 0.70703973475608560.9999975859224768

There When using the static transform, there is not aperiodic no periodic transform published between the map and odom using static transform, frames. I just infer suspect that probably the local costmap plugin maybe executes might rely on this transform (not sure) (although I'm not certain), and when using the slam mapping node, it kind that is overlaid by the periodic transform between from the odom to and map frame frames may interfere or overlap with the static transform, potentially causing conflicts ???....conflicts.

It's unclear how the Voxel grid plugin code is integrated with the slam-toolbox and how it affects the local costmap generation. Further investigation into the interplay between these components is needed to pinpoint the exact cause of the issue.

In summary, the problem seems to stem from the slam-toolbox configuration and its interaction with the local costmap and voxel layer. A thorough investigation of the relevant components and their interdependencies could potentially reveal the root cause and offer a more permanent solution.

After an extensive investigation involving adjusting various parameters innav2_params.yaml and experimenting with different positions and orientations of the LiDAR sensor, I discovered that the issue was not related to the sensor's range, pose, FOV, or any other related factors.

The root of the problem lies in the configuration of theslam-toolbox package. For some reason, it was misconfigured and did not work properly with the local costmap and voxel layer.

When running a static transform publisher (map --> odom):

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 map odom

Both local and global costmaps are generated, but the map itself is not produced:

image description

image description

Adjustments were made to the Voxel map range (width, height), and the raytrace range was increased to better suit the robot's dimensions and the environment's size.

However, when running the slam dynamic transform (map --> odom) using :

ros2 launch slam_toolbox online_sync_launch.py

The map and global costmap are generated, but the local costmap is not (even for the TurtleBot3 Waffle tutorial example or for my robot):

image description

A closer examination of the /tf topic reveals differences between the transforms when using the slam-toolbox async node and the static transform.

  1. slam-toolbox async node:

    transforms:

    • header: stamp: sec: 47 nanosec: 381000000 frame_id: map child_frame_id: odom transform: translation: x: 3.4662790218048424e-06 y: -2.2171464780663484e-07 z: -0.400019324960254 rotation: x: -2.7712992106286824e-07 y: -4.332639404341957e-06 z: 1.1986118037611005e-12 w: 0.9999999999905756
  2. static transform:


    transforms:

    • header: stamp: sec: 33 nanosec: 92000000 frame_id: odom child_frame_id: base_link transform: translation: x: -0.02042282951343617 y: -0.014272684253787292 z: 0.8999813856701359 rotation: x: 3.8079219550742497e-08 y: 3.443628320324917e-06 z: -0.0021973022911122857 w: 0.9999975859224768

When using the static transform, transform, there is no periodic transform published between the map and odom frames. I suspect that the local costmap plugin might rely on this transform (although I'm not certain), and when using the slam mapping node, the periodic transform between the odom and map frames may interfere or overlap with the static transform, potentially causing conflicts.

It's unclear how the Voxel grid plugin code is integrated with the slam-toolbox and how it affects the local costmap generation. Further investigation into the interplay between these components is needed to pinpoint the exact cause of the issue.

In summary, the problem seems to stem from the slam-toolbox configuration and its interaction with the local costmap and voxel layer. A thorough investigation of the relevant components and their interdependencies could potentially reveal the root cause and offer a more permanent solution.