# Control AMR in the simulator with `simulation_sample_amr_simple_motion`
`simulation_sample_amr_simple_motion` is a simulated sample application that uses a Python-based ROS node to control the movements of QRB autonomous moving robots (AMRs) within the simulator.
The [QRB ROS Simulation](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation) package provides the simulation environment. It allows you to control the movement of QRB AMRs through publishing the ROS messages to the `/qrb_robot_base/cmd_vel` topic.
Note
For more information, see [simulation_sample_amr_simple_motion](https://github.com/qualcomm-qrb-ros/qrb_ros_samples/tree/main/robotics/simulation_sample_amr_simple_motion) on GitHub.

## Pipeline flow for `simulation_sample_amr_simple_motion`
## ROS nodes used in the `simulation_sample_amr_simple_motion` 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). |
## ROS topics used in the `simulation_sample_amr_simple_motion` pipeline
| ROS Topic | Type | Published by | Description |
| --- | --- | --- | --- |
| `/qrb_robot_base/cmd_vel` | `geometry_msgs::msg::Twist` | `simulation_sample_amr_simple_motion` | Indicates the velocity commands for robot movement. |
## 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
### Set up the simulation environment
1. On your host computer, complete the following 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 or Docker.
2. Build from source.
2. Run the QRB Robot Base AMR on the host.
# Set the ROS_DOMAIN_ID
export ROS_DOMAIN_ID=123
ros2 launch qrb_ros_sim_gazebo gazebo_robot_base.launch.py namespace:=qrb_robot_base enable_laser:=false
Copy to clipboard
## Run out-of-the-box `simulation_sample_amr_simple_motion`
On the development kit, run the following commands:
>
>
> # setup runtime environment
> (ssh) source /usr/share/qirp-setup.sh
>
> # Set the ROS_DOMAIN_ID
> (ssh) export ROS_DOMAIN_ID=123
>
> ros2 run simulation_sample_amr_simple_motion simple_motion
> Copy to clipboard
**Result**
If the ROS node launches successfully, the log starting from `=== AMR Simple Motion Control Usage: ===` appears.
Then, you can input the motion control commands and check the movement status of the QRB AMR within the simulator on the host computer.
## Build and run `simulation_sample_amr_simple_motion`
1. In a terminal of the host computer, run the following commands:
>
>
> Note
>
> - ``: Version of the QIR SDK, see [QIR SDK 2.0 Release Notes](https://docs.qualcomm.com/doc/80-70033-260).
> - ``: The path where the QIR SDK is decompressed.
>
> 1. Build the sample application project.
>
>
>
> >
> >
> > # Set up the QIR SDK environment
> > cd /target/qcs9075-iq-9075-evk/qirpsdk_artifacts/qcs9075-iq-9075-evk
> > tar -zxf qirp-sdk_.tar.gz
> > cd /qirp-sdk
> > source setup.sh
> >
> > # build sample
> > cd /qirp-sdk/qirp-samples/robotics/simulation_sample_amr_simple_motion
> > colcon build
> > Copy to clipboard
> 2. Package and push the sample application to the device.
>
>
>
> >
> >
> > # package and push build result of sample
> > cd /qirp-sdk/qirp-samples/robotics/simulation_sample_amr_simple_motion/install/simulation_sample_amr_simple_motion
> > tar -czf simulation_sample_amr_simple_motion.tar.gz lib share
> > scp simulation_sample_amr_simple_motion.tar.gz root@[ip-addr]:/opt/
> > Copy to clipboard
2. On the development kit, run the following commands:
>
>
> 1. Install the sample application.
>
>
>
> >
> >
> > # Remount the /usr directory with read-write permissions
> > (ssh) mount -o remount rw /usr
> >
> > # Install sample package
> > (ssh) tar --no-overwrite-dir --no-same-owner -zxf /opt/simulation_sample_amr_simple_motion.tar.gz -C /usr/
> > Copy to clipboard
> 2. Run the sample application with the steps in [Run out-of-the-box simulation\_sample\_amr\_simple\_motion](https://docs.qualcomm.com/doc/80-70033-265/topic/simulation_sample_amr_simple_motion.html#run-amr-simple-motion).
Last Published: Sep 30, 2026
[Previous Topic
Run robotics sample applications](https://docs.qualcomm.com/bundle/publicresource/80-70033-265/topics/robotics_sample.md) [Next Topic
Enable 2D lidar SLAM with cartographer\_ros](https://docs.qualcomm.com/bundle/publicresource/80-70033-265/topics/2d_lidar_slam.md)