Skip to content

Conversation

@civerachb-cpr
Copy link
Contributor

Description

Rewrite SLAM parameters using a RewrittenYaml object so that namespaces are applied correctly. This ensures that the slam_toolbox parameters (specifically scan_topic and map_name) show the fully-qualified topic names and eliminates the need for manual remaps in the GroupAction.

Fixes RPSW-2723.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested in-house on cpr-april, a Turtlebot4 Lite.

To launch SLAM: ros2 launch turtlebot4_navigation slam.launch.py namespace:=/cpr_april

Verify parameters: ros2 dump /cpr_april/slam_toolbox:

/cpr_april/slam_toolbox:
  ros__parameters:
    /bond_disable_heartbeat_timeout: true
    angle_variance_penalty: 1.0
    base_frame: base_link
    ceres_dogleg_type: TRADITIONAL_DOGLEG
    ceres_linear_solver: SPARSE_NORMAL_CHOLESKY
    ceres_loss_function: None
    ceres_preconditioner: SCHUR_JACOBI
    ceres_trust_strategy: LEVENBERG_MARQUARDT
    coarse_angle_resolution: 0.0349
    coarse_search_angle_offset: 0.349
    correlation_search_space_dimension: 0.5
    correlation_search_space_resolution: 0.01
    correlation_search_space_smear_deviation: 0.1
    debug_logging: false
    distance_variance_penalty: 0.5
    do_loop_closing: true
    enable_interactive_mode: true
    fine_search_angle_offset: 0.00349
    interactive_mode: false
    link_match_minimum_response_fine: 0.1
    link_scan_maximum_distance: 1.5
    loop_match_maximum_variance_coarse: 3.0
    loop_match_minimum_chain_size: 10
    loop_match_minimum_response_coarse: 0.35
    loop_match_minimum_response_fine: 0.45
    loop_search_maximum_distance: 3.0
    loop_search_space_dimension: 8.0
    loop_search_space_resolution: 0.05
    loop_search_space_smear_deviation: 0.03
    map_file_name: ''
    map_frame: map
    map_name: /cpr_april/map
    map_start_at_dock: false
    map_start_pose: []
    map_update_interval: 1.0
    min_pass_through: 2
    minimum_angle_penalty: 0.9
    minimum_distance_penalty: 0.5
    minimum_time_interval: 0.5
    minimum_travel_distance: 0.1
    minimum_travel_heading: 0.1
    mode: mapping
    occupancy_threshold: 0.1
    odom_frame: odom
    paused_new_measurements: false
    paused_processing: false
    position_covariance_scale: 1.0
    qos_overrides:
      /cpr_april/tf:
        publisher:
          depth: 100
          durability: volatile
          history: keep_last
          reliability: reliable
    resolution: 0.05
    scan_buffer_maximum_scan_distance: 10.0
    scan_buffer_size: 10
    scan_queue_size: 1
    scan_topic: /cpr_april/scan
    solver_plugin: solver_plugins::CeresSolver
    stack_size_to_use: 40000000
    start_type_description_service: true
    tf_buffer_duration: 30.0
    throttle_scans: 1
    transform_publish_period: 0.02
    transform_timeout: 0.2
    use_lifecycle_manager: false
    use_map_saver: true
    use_response_expansion: true
    use_scan_barycenter: true
    use_scan_matching: true
    use_sim_time: false
    yaw_covariance_scale: 1.0

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@civerachb-cpr civerachb-cpr marked this pull request as ready for review September 5, 2025 17:11
@civerachb-cpr civerachb-cpr merged commit 54dbb20 into jazzy Sep 9, 2025
2 checks passed
@civerachb-cpr civerachb-cpr deleted the fix/slam-params branch September 9, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants