Closed Rak-r closed 1 year ago
Also, I want to use slam toolbox for mapping and localization. I am not having a pre-built map. So using online async slam toolbox launch file. Setting he global and local frames in global and local costmap params should be according to this slam_toolbox setting? how to configure slam_toolbox to do both mapping and localization? without pre-built map? Althouugh I am not having any error from salm toolbox async node but I feel that it might be not rightly done, that's why. My slam_toolbox params:
`slam_toolbox: ros__parameters:
# Plugin params
solver_plugin: solver_plugins::CeresSolver
ceres_linear_solver: SPARSE_NORMAL_CHOLESKY
ceres_preconditioner: SCHUR_JACOBI
ceres_trust_strategy: LEVENBERG_MARQUARDT
ceres_dogleg_type: TRADITIONAL_DOGLEG
ceres_loss_function: None
# ROS Parameters
odom_frame: odom
map_frame: map
base_frame: base_link
scan_topic: /scan
mode: localization #mapping
# if you'd like to immediately start continuing a map at a given pose
# or at the dock, but they are mutually exclusive, if pose is given
# will use pose
#map_file_name: test_steve
#map_start_pose: [0.0, 0.0, 0.0]
#map_start_at_dock: true
debug_logging: false
throttle_scans: 1
transform_publish_period: 0.02 #if 0 never publishes odometry
map_update_interval: 5.0
resolution: 0.05
max_laser_range: 20.0 #for rastering images
minimum_time_interval: 0.5
transform_timeout: 1.0
tf_buffer_duration: 30.
stack_size_to_use: 40000000 #// program needs a larger stack size to serialize large maps
enable_interactive_mode: true
# General Parameters
use_scan_matching: true
use_scan_barycenter: true
minimum_travel_distance: 0.5
minimum_travel_heading: 0.5
scan_buffer_size: 10
scan_buffer_maximum_scan_distance: 10.0
link_match_minimum_response_fine: 0.1
link_scan_maximum_distance: 1.5
loop_search_maximum_distance: 3.0
do_loop_closing: true
loop_match_minimum_chain_size: 10
loop_match_maximum_variance_coarse: 3.0
loop_match_minimum_response_coarse: 0.35
loop_match_minimum_response_fine: 0.45
# Correlation Parameters - Correlation Parameters
correlation_search_space_dimension: 0.5
correlation_search_space_resolution: 0.01
correlation_search_space_smear_deviation: 0.1
# Correlation Parameters - Loop Closure Parameters
loop_search_space_dimension: 8.0
loop_search_space_resolution: 0.05
loop_search_space_smear_deviation: 0.03
# Scan Matcher Parameters
distance_variance_penalty: 0.5
angle_variance_penalty: 1.0
fine_search_angle_offset: 0.00349
coarse_search_angle_offset: 0.349
coarse_angle_resolution: 0.0349
minimum_angle_penalty: 0.9
minimum_distance_penalty: 0.5
use_response_expansion: true
`
What is your actual problem? The ticket never explains what your concern or issue is, just a set of (long) longs and configs with a title saying ‘its not working’. Please provide a detailed description of what’s not working and what you’ve tried.
how to configure slam_toolbox to do both mapping and localization? without pre-built map?
Read the docs and on the basics of SLAM. Respectfully, there is a litany of documentation on this that I shouldn’t need to repeat individually 🙂.
What is your actual problem? The ticket never explains what your concern or issue is, just a set of (long) longs and configs with a title saying ‘its not working’. Please provide a detailed description of what’s not working and what you’ve tried.
Apology for providing incomplete info. I changed the title as well. After launching the above launch file and hitting the 2DPoseEstimate in rviz its sets the estimate which I can see in terminal but not able to visualize and when I do Nav2Goal it throws the above provided error and robot do not move.
I looked at the topics and nodes using ros2 param get use_sim_time and it shows True (same with other nodes) However, the error seems that transforms are not getting published on using simulation time.
I tried to provided all error and info so that it might be easier to debug.
See our default launch files where sim time works fine as a launch configuration -- you might find your error by comparing them. Since our simulation launch files work properly to set sim time, its something to do with your config / launch files, not Nav2 related. As such with a user setup error, closing. Unfortunately, I don't have the cycles to personally debug every user's errors, but there are many clear examples in place of working systems you can base off of or reference.
I have closed a large volume of tickets from you with this exact same comment - please do take this advice. We're not here to fix all your configuration or misunderstanding issues. There is a wide body of documentation at navigation.ros.org and in the community available that you should look into first before filing here (let alone trying to fix an issue yourself, knowing that the default system is working fine).
Please do try to stop and think and spend some time to fix your own issue before filing a ticket of this type. Please don't abuse the issue tracker. If you have this many issues and need professional support, you're welcome to email us at info@opennav.org and we could discuss there. Though, most of your issues are really trivial solutions if you read the documentation and set things up // googled your issues.
See our default launch files where sim time works fine as a launch configuration -- you might find your error by comparing them. Since our simulation launch files work properly to set sim time, its something to do with your config / launch files, not Nav2 related. As such with a user setup error, closing. Unfortunately, I don't have the cycles to personally debug every user's errors, but there are many clear examples in place of working systems you can base off of or reference.
I have looked for similar errors and tried their solutions but still the issue persists. Infact, I tried the default nav2_bringup bringup.launch.py unfortunately it also outputd the same error as mine after Nav2goal button in rviz.
I have been googling these issues from past days and no clear solution found only after that I tried to ask here. But thanks for the advice.
Hello
No clue if someone still cares.
Ran into the same issue. "requested time 1691424773.212782 but the latest data is at time 3617.600000" requested time is current time while latest data is sim_time. Solution: run rviz with "use_sim_time" set to true, not just your nodes...
I have closed a large volume of tickets from you with this exact same comment - please do take this advice. We're not here to fix all your configuration or misunderstanding issues. There is a wide body of documentation at navigation.ros.org and in the community available that you should look into first before filing here (let alone trying to fix an issue yourself, knowing that the default system is working fine).
Please do try to stop and think and spend some time to fix your own issue before filing a ticket of this type. Please don't abuse the issue tracker. If you have this many issues and need professional support, you're welcome to email us at info@opennav.org and we could discuss there. Though, most of your issues are really trivial solutions if you read the documentation and set things up // googled your issues.
Yes. Otherwise I just made gazebo to work on wall time. Better to have all physical and simulation robot to work on same time @Combinatrix
thanks @Combinatrix $ ros2 run rviz2 rviz2 --ros-args -p use_sim_time:=true instead of just $ rviz2 worked for me
Bug report
Required Info:
Operating System: Ubuntu 22.04
ROS2 Version: ROS2 Humble Binary
DDS implementation:
Expected behavior
Should run NAV2
Actual behavior
**The launch file seems ok because the last output I am getting is [lifecycle_manager-5] [INFO] [1691409212.195861492] [lifecycle_manager_navigation]: Creating bond timer...
I have provided use_sim_time true everywhere but I don't why it is coming.**
`[bt_navigator-4] [INFO] [1691424773.213829933] [bt_navigator]: Begin navigating from current location to (-3.35, 2.02) [planner_server-2] [ERROR] [1691424774.006121032] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3617.600000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424774.006158189] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424774.006191148] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [planner_server-2] [INFO] [1691424774.024193653] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424774.864641914] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3618.100000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424774.864672393] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424774.864695616] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [controller_server-1] [INFO] [1691424774.884121835] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap [planner_server-2] [INFO] [1691424774.884386162] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424775.871126413] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3618.700000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424775.871156354] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424775.871178511] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [planner_server-2] [INFO] [1691424775.885008689] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424776.872278416] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3619.400000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424776.872311456] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424776.872334640] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [behavior_server-3] [INFO] [1691424776.884494541] [behavior_server]: Running spin [behavior_server-3] [INFO] [1691424776.884605657] [behavior_server]: Turning 1.57 for spin behavior. [behavior_server-3] [WARN] [1691424786.884706643] [behavior_server]: Exceeded time allowance before reaching the Spin goal - Exiting Spin [behavior_server-3] [WARN] [1691424786.884743251] [behavior_server]: spin failed [behavior_server-3] [WARN] [1691424786.884756924] [behavior_server]: [spin] [ActionServer] Aborting handle. [behavior_server-3] [INFO] [1691424786.904300441] [behavior_server]: Running wait [behavior_server-3] [INFO] [1691424791.904446638] [behavior_server]: wait completed successfully [planner_server-2] [ERROR] [1691424792.730907641] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3629.300000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424792.730940504] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424792.730967524] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [planner_server-2] [INFO] [1691424792.744965117] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424793.884840781] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3630.100000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424793.884876311] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424793.884901487] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [behavior_server-3] [INFO] [1691424793.904321399] [behavior_server]: Running backup [behavior_server-3] [WARN] [1691424803.904854927] [behavior_server]: Exceeded time allowance before reaching the DriveOnHeading goal - Exiting DriveOnHeading [behavior_server-3] [WARN] [1691424803.904900950] [behavior_server]: backup failed [behavior_server-3] [WARN] [1691424803.904915892] [behavior_server]: [backup] [ActionServer] Aborting handle. [controller_server-1] [INFO] [1691424803.924166316] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap [planner_server-2] [INFO] [1691424803.925834499] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424804.953690738] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3636.800000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424804.953725100] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424804.953756433] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [planner_server-2] [INFO] [1691424804.974156585] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap [planner_server-2] [ERROR] [1691424805.873393475] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1691424773.212782 but the latest data is at time 3637.400000, when looking up transform from frame [map] to frame [odom] [planner_server-2] [planner_server-2] [WARN] [1691424805.873427951] [planner_server]: Could not transform the start or goal pose in the costmap frame [planner_server-2] [WARN] [1691424805.873451366] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. [behavior_server-3] [INFO] [1691424805.886282248] [behavior_server]: Running spin [behavior_server-3] [INFO] [1691424805.886342571] [behavior_server]: Turning 1.57 for spin behavior. [behavior_server-3] [WARN] [1691424815.886495257] [behavior_server]: Exceeded time allowance before reaching the Spin goal - Exiting Spin [behavior_server-3] [WARN] [1691424815.886531813] [behavior_server]: spin failed [behavior_server-3] [WARN] [1691424815.886543222] [behavior_server]: [spin] [ActionServer] Aborting handle. [behavior_server-3] [INFO] [1691424815.904248890] [behavior_server]: Running wait ^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[behavior_server-3] [WARN] [1691424820.013017797] [behavior_server]: [wait] [ActionServer] Current goal was not completed successfully. [behavior_server-3] [WARN] [1691424820.013030629] [behavior_server]: [wait] [ActionServer] Aborting handle.
[bt_navigator-4] [ERROR] [1691424820.015943750] [bt_navigator_navigate_to_pose_rclcpp_node]: Failed to cancel action server for wait [bt_navigator-4] [ERROR] [1691424820.015972266] [bt_navigator]: Goal failed [bt_navigator-4] [WARN] [1691424820.015978480] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle. ` Rviz terminal
INFO] [1691424593.162180817] [rviz2]: Stereo is NOT SUPPORTED [INFO] [1691424593.162263645] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [INFO] [1691424593.245426436] [rviz2]: Stereo is NOT SUPPORTED [INFO] [1691424594.202458378] [rviz2]: Trying to create a map of size 497 x 690 using 1 swatches [INFO] [1691424595.576636466] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.400 for reason 'discarding message because the queue is full' [INFO] [1691424595.578249360] [rviz2]: Trying to create a map of size 40 x 72 using 1 swatches [INFO] [1691424608.497790289] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.340 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424608.638460499] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.420 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424608.797992462] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.520 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424608.958005021] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.660 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.138368467] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.792 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.138433644] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.780 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.437795833] [rviz]: Message Filter dropping message: frame 'odom' at time 3503.900 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.598690495] [rviz]: Message Filter dropping message: frame 'odom' at time 3504.040 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.757843284] [rviz]: Message Filter dropping message: frame 'odom' at time 3504.160 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.757930649] [rviz]: Message Filter dropping message: frame 'odom' at time 3504.108 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424609.917779096] [rviz]: Message Filter dropping message: frame 'odom' at time 3504.280 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424610.264886326] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.500 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424610.419989745] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.600 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424610.578142275] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.700 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424610.734351666] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.800 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424610.892626986] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3503.900 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424611.053671294] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3504.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424611.210692273] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3504.100 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424611.376196048] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3504.200 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424611.535705311] [rviz]: Message Filter dropping message: frame 'velodyne_link' at time 3504.300 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [INFO] [1691424760.451556865] [rviz2]: Setting estimate pose: Frame:map, Position(6.09147, 2.47838, 0), Orientation(0, 0, -0.502147, 0.864782) = Angle: -1.05216 Start navigation [INFO] [1691424773.213060000] [_]: NavigateToPose will be called using the BT Navigator's default behavior tree.
One change I made is remapped the odometry topic coming from gazebo to /odom topic so that it can publish the transform odom to base_link.
This looks similar : [(https://github.com/https://github.com/ros-planning/navigation2/issues/3352#issue-1522875908)] But I have already switched to Cyclone DDS Could you advice me something from the given information?
I have set the fixed frame to map and tried setting and then Nav2goal in rviz. Seems it is recieving the commands but the issue reminas same as above.
My nav2 params
`amcl: rosparameters: alpha1: 0.2 alpha2: 0.2 alpha3: 0.2 alpha4: 0.2 alpha5: 0.1 base_frame_id: "base_link" beam_skip_distance: 0.5 beam_skip_error_threshold: 0.9 beam_skip_threshold: 0.3 do_beamskip: false global_frame_id: "map" lambda_short: 0.1 laser_likelihood_max_dist: 2.0 laser_max_range: 50.0 laser_min_range: -1.0 laser_model_type: "likelihood_field" max_beams: 60 max_particles: 1000 min_particles: 10000 odom_frame_id: "odom" pf_err: 0.05 pf_z: 0.99 recovery_alpha_fast: 0.0 recovery_alpha_slow: 0.0 resample_interval: 1 robot_model_type: "nav2_amcl::DifferentialMotionModel" save_pose_rate: 0.5 sigma_hit: 0.2 tf_broadcast: true transform_tolerance: 1.0 update_min_a: 0.2 update_min_d: 0.25 z_hit: 0.5 z_max: 0.05 z_rand: 0.5 z_short: 0.05 scan_topic: scan map_topic: map set_initial_pose: false always_reset_initial_pose: false first_map_only: false initial_pose: x: 0.0 y: 0.0 z: 0.0 yaw: 0.0 amcl_map_client: rosparameters: use_sim_time: True
amcl_rclcpp_node: ros__parameters: use_sim_time: True
bt_navigator: ros__parameters: use_sim_time: True global_frame: map robot_base_frame: base_link odom_topic: /odom bt_loop_duration: 10 plugin_lib_names:
bt_navigator_navigate_through_poses_rclcpp_node: ros__parameters: use_sim_time: True
bt_navigator_navigate_to_pose_rclcpp_node: ros__parameters: use_sim_time: True controller_server: ros__parameters:
controller server parameters (see Controller Server for more info)
controller_server_rclcpp_node: ros__parameters: use_sim_time: True
local costmap configurations
local_costmap: local_costmap: rosparameters: update_frequency: 5.0 publish_frequency: 2.0 global_frame: odom robot_base_frame: base_link use_sim_time: True rolling_window: true width: 10 height: 18 resolution: 0.25 footprint_padding: 0.01 plugins: ["obstacle_layer", "inflation_layer"] inflation_layer: plugin: "nav2_costmap_2d::InflationLayer" inflation_radius: 0.2 cost_scaling_factor: 30.0 obstacle_layer: plugin: "nav2_costmap_2d::ObstacleLayer" enabled: True observation_sources: scan scan: topic: /scan max_obstacle_height: 2.5 clearing: True marking: True data_type: "LaserScan" static_layer: map_subscribe_transient_local: True always_send_full_costmap: True local_costmap_client: rosparameters: use_sim_time: True local_costmap_rclcpp_node: ros__parameters: use_sim_time: True
global costmap configurations
global_costmap: global_costmap: ros__parameters: footprint_padding: 0.05 update_frequency: 1.0 publish_frequency: 1.0 global_frame: odom robot_base_frame: base_link use_sim_time: True robot_radius: 0.5 # radius set and used, so no footprint points resolution: 0.05 transform_tolerance: 0.5 plugins: ["static_layer", "obstacle_layer", "inflation_layer"] obstacle_layer: plugin: "nav2_costmap_2d::ObstacleLayer" enabled: True observation_sources: scan footprint_clearing_enabled: true max_obstacle_height: 2.0 combination_method: 1 scan: topic: /scan obstacle_max_range: 5.0 obstacle_min_range: 0.0 raytrace_max_range: 3.0 raytrace_min_range: 0.0 max_obstacle_height: 2.0 min_obstacle_height: 0.0 clearing: True marking: True data_type: "LaserScan" inf_is_valid: false
global_costmap_client: rosparameters: use_sim_time: True global_costmap_rclcpp_node: ros__parameters: use_sim_time: True planner_server: rosparameters: planner_plugins: ["GridBased"] use_sim_time: True
planner_server_rclcpp_node: ros__parameters: use_sim_time: True map_server: ros__parameters: use_sim_time: True yaml_filename: "map.yaml"
map_saver: ros__parameters: use_sim_time: True save_map_timeout: 100.0 free_thresh_default: 0.25 occupied_thresh_default: 0.65 map_subscribe_transient_local: True
behavior server configurations
behavior_server: ros__parameters: use_sim_time: True local_costmap_topic: local_costmap/costmap_raw local_footprint_topic: local_costmap/published_footprint global_costmap_topic: global_costmap/costmap_raw global_footprint_topic: global_costmap/published_footprint cycle_frequency: 10.0 behavior_plugins: ["spin", "backup", "wait"] spin: plugin: "nav2_behaviors/Spin" backup: plugin: "nav2_behaviors/BackUp"
robot_state_publisher: ros__parameters: use_sim_time: True`
Launch file
`import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable from launch.substitutions import LaunchConfiguration from launch_ros.actions import Node from nav2_common.launch import RewrittenYaml
def generate_launch_description():
Get the launch directory
Also, in rviz, localization shows inactive. But I launched Slam_toolbox prior to launching NAV2. I want to create map and localize simulatneously, that's why I have not provided pre-build map. Do I have to provide pre-built map for slam as well? I am bit new to this, any suggestions how to resolve this issue.