Problems while launch Nav2

By ihsumlee , 8 March 2026
content

Problem  — Nav2 is using the wrong base frame (base_link instead of robot_0/base_link)

This part is clear:

Invalid frame ID "base_link" ... frame does not exist

Your Stage TF frames are namespaced, e.g.:

  • robot_0/odom

  • robot_0/base_link

  • robot_0/laser

So your Nav2 params must use robot_0/base_link, not base_link.

Fix B (recommended): edit your Nav2 params file

Open:

nano /home/lee/nav_class_assets/nav2/nav2_stage_robot0.yaml

Search and replace the following key values:

1) AMCL frames

amcl:
  ros__parameters:
    base_frame_id: robot_0/base_link
    odom_frame_id: robot_0/odom
    global_frame_id: map

2) Costmap robot base frame

Find these and set:

robot_base_frame: robot_0/base_link

3) Local costmap global frame

Set local costmap global frame to:

global_frame: robot_0/odom

4) Scan topic (very important)

Your log shows costmaps subscribed to scan (wrong). It must be your laser topic, e.g.:

scan_topic: /robot_0/base_scan

or if you throttle:

scan_topic: /robot_0/base_scan_throttle

In Nav2 costmaps, this is usually inside obstacle_layer: or voxel_layer: under observation_sources.

Example pattern:

observation_sources: scan
scan:
  topic: /robot_0/base_scan
  max_obstacle_height: 2.0
  clearing: true
  marking: true
  data_type: LaserScan

The clean “known-good” launch sequence

  1. Stage:

ros2 launch stage_ros2 demo.launch.py one_tf_tree:=true
  1. (Optional) throttle:

ros2 run topic_tools throttle messages /robot_0/base_scan 10.0 /robot_0/base_scan_throttle
  1. Nav2 bringup (use the correct downloaded map):

ros2 launch nav2_bringup bringup_launch.py \
  map:=/home/lee/nav_class_assets/maps/classroom_map_simple.yaml \
  params_file:=/home/lee/nav_class_assets/nav2/nav2_stage_robot0.yaml \
  use_sim_time:=True \
  autostart:=True

Quick verification after fixes

ros2 topic info /map
ros2 topic echo /map --once
ros2 run tf2_ros tf2_echo robot_0/odom robot_0/base_link

If you want, paste the top of your nav2_stage_robot0.yaml (especially AMCL + local_costmap + global_costmap sections), and I’ll tell you exactly what lines to change so it matches your Stage topics/frames.

Tags