Closed JYKimm closed 2 months ago
I gave a namespace to my mobile robot as robot1.
I'm guessing this is the issue, you didn't add the namespace to your configuration file so that it gets the parameters. Without that, it just uses the defaults in the code. The namespace of it shouldn't be slam_toolbox:
(or whatever it is now). It should be robot1/slam_toolbox:
Thank you, problem solved
Required Info:
Steps to reproduce issue
I gave a namespace to my mobile robot as robot1. to do that, I added remapping and namespace parameters to online_sync_launch.py(and async too), and my robot's robot_bringup_launch (including robot_state_publisher) as a result, topics for SLAM got to have namespace like this, /tf->/robot1/tf ... same to /odom, /scan.... etc
But, after that SLAM works well but /map's publishing interval was fixed as 10s (0.1Hz) I checked map_update_interval in mapper_params_online_sync.yaml and it was 5.0 I tried to change the number to 3.0, 15.0, 20.0... but always /map update interval was 10 second. it was all same for online_async_launch, online_sync_launch
Expected behavior
/map topic update interval should be map_update_interval in mapper_params_xxxx.yaml
Actual behavior
/map update interval is fixed 10 second if namespace is given in slam toolbox launcher.
Additional information
this is my launch file
import os
from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.substitutions import LaunchConfiguration from launch_ros.actions import Node from ament_index_python.packages import get_package_share_directory
def generate_launch_description(): use_sim_time = LaunchConfiguration('use_sim_time') slam_params_file = LaunchConfiguration('slam_params_file')