Minimal and practical Nav2 bringup for AMR simulation or hardware integration.
bringup_slam.launch.py: SLAM mapping + Nav2.bringup_localization.launch.py: map-based localization (AMCL) + Nav2.odom_child_frame_fix: republishes/odomto/odometry/filteredand fixeschild_frame_id/optional TF.lifecycle_activator: generic lifecycle activator used for SLAM toolbox and Nav2 fallback activation.robot_description_publisher: publishes URDF string to/robot_descriptionfor RViz RobotModel.cmd_vel_to_diff_wheel: converts/cmd_vel(Twist) to/diff_wheel_cmd(left/right wheel command).goal_bridge(optional): forwards/goal_poseto Nav2NavigateToPoseaction.
amr_nav2_bringup/nodes/orchestration: startup/lifecycle flow control nodes.amr_nav2_bringup/nodes/adapters: topic/action conversion and compatibility nodes.amr_nav2_bringup/nodes/visualization: RViz or model-display support nodes.amr_nav2_bringup/nodes/sensors: sensor communication and preprocessing nodes (for now kept in this package).
- Ubuntu + ROS 2 Jazzy (or compatible distro). Install these ROS 2 packages:
nav2_bringupnav2_amclnav2_map_serverslam_toolboxrobot_localizationrviz2
cd workspace # amr_ws, nav2_ws
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install
source install/setup.bashcd /path/to/amr_ws/src/amr_nav2_bringup/scripts
bash slam_run.shKeep slam_run.sh running, then execute this in another terminal:
cd /path/to/amr_ws/src/amr_nav2_bringup/scripts
mkdir -p ../config/maps
bash ros2_env.sh run nav2_map_server map_saver_cli -f ../config/maps/my_mapGenerated files:
../config/maps/my_map.yaml../config/maps/my_map.pgm
cd /path/to/amr_ws/src/amr_nav2_bringup/scripts
MAP_YAML=../config/maps/my_map.yaml bash localization_run.shcd /path/to/amr_ws/src/amr_nav2_bringup/scripts
bash slam_run.sh use_rviz:=true rviz_config:=../config/amr_nav2_map_only.rvizcd /path/to/amr_ws/src/amr_nav2_bringup/scripts
MAP_YAML=../config/maps/my_map.yaml bash localization_run.sh use_rviz:=false/odom(nav_msgs/Odometry)/imu(sensor_msgs/Imu, frame_id expected:sim_imu)/laser_scan(sensor_msgs/LaserScan, frame_id expected:sim_lidar)
/cmd_vel(geometry_msgs/Twist)/diff_wheel_cmd(std_msgs/Float64MultiArray)/robot_description(std_msgs/String, transient local)
- You can adjust topic names and behavior in
config/*.yaml. - If RViz fails to open in some environments, this launch already sets software OpenGL fallback variables.
