# Enable navigation in the simulator with `navigation2`
`simulation_amr_navigation` is a simulated sample application that demonstrates how to run `navigation2` on Qualcomm robotics platforms within the simulator.
The [QRB ROS Simulation](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation) is a ROS project designed to set up the Qualcomm robotic simulation environment.

## Pipeline flow for `simulation_amr_navigation`
## ROS nodes used in the `simulation_amr_navigation` pipeline
| ROS node | Description |
| --- | --- |
| `qrb_ros_simulation` | `qrb ros simulation` is a ROS package that sets up the Qualcomm robotic simulation environment. For details, see [QRB ROS Simulation](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation). |
| `navigation2 nodes` | `navigation2` is the professionally-supported successor of the ROS Navigation Stack. It allows for mobile robots to navigate through complex environments to complete user-defined application tasks with nearly any class of robot kinematics. |
## ROS topics used in the `simulation_amr_navigation` pipeline
| ROS topic | Type | Published by | Description |
| --- | --- | --- | --- |
| `/map` | `nav_msgs::msg::OccupancyGrid` | `cartographer_occupancy_grid_node` | The 2D occupancy grid map of the environment. |
| `/tf` | `tf2_msgs::msg::TFMessage` | `cartographer_occupancy_grid_node, qrb_ros_simulation` | Spatial relationships between different coordinate frames. |
| `/scan` | `sensor_msg::msg::LaserScan` | `qrb_ros_simulation` | 2D laser scan data. |
| `/goal_pose` | `geometry_msgs::msg::PoseStamped` | `Application to call navigation2` | The target pose for navigation, including position and orientation in the map frame. |
## Prerequisites
You have completed the following settings in [Set up the environment for running sample applications](https://docs.qualcomm.com/doc/80-70033-265/topic/quick_start.html#setup-demo-qs) (Skip the settings of **Set up host docker**).
- Set up the device
- Set up the host computer
Note
Ensure that the board is connected to the simulation host using an Ethernet cable. Otherwise, the sample's performance may degrade due to data transmission issues.
### Set up the simulation environment
1. On your host computer, complete the following actions to build the Qualcomm robotic simulation environment according to the **README** of [QRB ROS Simulation](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation). Ensure that the device and the host are on the same local network and can communicate with each other through ROS communication.
1. Set up development environment on Ubuntu24.04 host.
2. Build from source.
2. Run the QRB Robot Base AMR Mini on the host.
# Set the ROS_DOMAIN_ID
export ROS_DOMAIN_ID=123
ros2 launch qrb_ros_sim_gazebo gazebo_robot_base_mini.launch.py world_model:=ionic
Copy to clipboard
## Run out-of-the-box `navigation2`
1. Configure `navigation2` parameters to use GracefulController.
mount -o remount rw, /usr
sed -i.bak -E 's/^([[:space:]]*)plugin: "nav2_mppi_controller::MPPIController"/\1#plugin: "nav2_mppi_controller::MPPIController"\n\1plugin: "nav2_graceful_controller::GracefulController"/' /usr/share/nav2_bringup/params/nav2_params.yaml
Copy to clipboard
2. Run the 2D lidar SLAM.
source /usr/share/qirp-setup.sh
export ROS_DOMAIN_ID=123
ros2 launch cartographer_ros qrb_2d_lidar_slam_gazebo_sim.launch.py
Copy to clipboard
3. Run the `qrb_slam_service_request` script in a new terminal.
ssh root@[IP address]
source /usr/share/qirp-setup.sh
export ROS_DOMAIN_ID=123
chmod 777 /usr/share/cartographer_ros/scripts/qrb_slam_service_request.sh
bash /usr/share/cartographer_ros/scripts/qrb_slam_service_request.sh
Copy to clipboard
4. Use the keyboard to send `0` control commands to start mapping.

5. Run `navigation2` in a new terminal.
source /usr/share/qirp-setup.sh
export ROS_DOMAIN_ID=123
ros2 launch nav2_bringup navigation_launch.py use_sim_time:=true
Copy to clipboard
6. Send the navigation goal and start navigation in a new terminal.
export ROS_DOMAIN_ID=123
ros2 action send_goal /navigate_to_pose nav2_msgs/action/NavigateToPose "{pose: {header: {stamp: {sec: 0, nanosec: 0},frame_id: 'map'},pose: {position: {x: 1.0,y: 1.0,z: 0.0},orientation: {x: 0.0,y: 0.0,z: 0.0,w: 1.0}}}}"
Copy to clipboard
Last Published: Sep 30, 2026
[Previous Topic
Enable 2D lidar SLAM in the simulator with cartographer\_ros](https://docs.qualcomm.com/bundle/publicresource/80-70033-265/topics/simulation_2d_lidar_slam.md) [Next Topic
Run platform sample applications](https://docs.qualcomm.com/bundle/publicresource/80-70033-265/topics/platform_sample.md)