> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.stereolabs.com/docs/integrations/isaac-sim/using-the-zed-with-ros-2-in-isaac-sim/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server. # Using the ZED with ROS 2 in Isaac™ Sim This tutorial guides you through configuring the [*Isaac™ Sim ROS 2 Bridge*](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/install_ros.html#enabling-the-ros-bridge-extension) to send simulated information to a [*ZED ROS 2 Wrapper*](https://github.com/stereolabs/zed-ros2-wrapper) node. ## Install the dependencies > **Note** > > This installation guide is valid only for Ubuntu. For other operating systems, please refer to the [official NVIDIA® documentation](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/install_ros.html). Some ROS 2 message types used by the *Isaac™ Sim ROS 2 Bridge* (such as `Detection2DArray` and `Detection3DArray`) depend on the *Vision Messages* ROS 2 package. We recommend installing it so that all message types are available: ```bash sudo apt install ros-humble-vision-msgs ``` **IMPORTANT**: do **not** permanently append the bridge's internal ROS 2 libraries to `LD_LIBRARY_PATH` in your `~/.bashrc`. Doing so creates conflicts between libraries that prevent `rviz2` and other ROS 2 tools from starting. Source your ROS 2 workspace once per terminal instead, as shown below. For additional details, we recommend reading the [official NVIDIA® documentation](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/install_ros.html). ## Set up the environment variables for ROS 2 Ensure that the ROS 2 environment is sourced in the terminal before starting *Isaac™ Sim*: ```bash source /opt/ros/humble/setup.bash ``` > **Note** > > You must run this command in the same terminal before launching *Isaac™ Sim* with `./isaac-sim.sh` (located in the `_build/linux-x86_64/release` folder of your Isaac™ Sim build). Alternatively, add the line to your `~/.bashrc` so the ROS 2 environment is configured automatically each time you open a terminal. ## Enable the ROS 2 Bridge Extension When Isaac™ Sim is ready, you must enable the `isaacsim.ros2.bridge` extension. * Open the Extensions view from the menu, **Window -> Extensions**. * Search for `isaacsim.ros2.bridge` using the search form in the top left. * Toggle the switch to enable the extension. * \[Optional] Enable the `AUTOLOAD` option to skip this step each time you start Isaac™ Sim. ![image](/_fern-img/06c02725fe8e43f2797182a212f3cc51dd205100a35ce4011d84c278f1cce52f.webp) ## Enable the ZED Camera Extension The ZED Camera extension is required to send the simulated ZED images to the [ZED ROS 2 Wrapper](https://github.com/stereolabs/zed-ros2-wrapper). * Open the Extensions view from the menu, **Window -> Extensions**. * Search for `ZED` using the search form in the top left. * Select the `THIRD PARTY` tab if you installed the extension from the GitHub repository (see the [installation instructions](/docs/integrations/isaac-sim/get-started-with-isaac-sim#install-the-zed-camera-extension) for adding the extension if it is not available). * Toggle the switch to enable the extension. * \[Optional] Enable the `AUTOLOAD` option to skip this step each time you start Isaac™ Sim. ![image](/_fern-img/6e5a8100ec7a953623e5877422c56a4216e8475ad0498bc0baf75ebd68a4aa91.webp) ## Add a scenario to the Stage The ZED camera is a visual sensor, so it's important to add an environment that is rich in visual features for a good simulation experience. Isaac™ Sim provides ready-made environments to use. From **Create -> Isaac -> Environments**, you can select, for example, the environment named `Small Warehouse with Multiple Shelves`. Wait for the simulator to load the environment. This task can take a while, depending on the size of the environment that you selected. Once all the objects in the scene are finally loaded, the simulator will display the selected environment from the default point of view of the viewport camera. ![image](/_fern-img/22ace0dbdf6052138507d827ae1c5cd03f781c1b0e2dab6223dd58ef0c21a7a1.webp) ## Add a ZED camera to the scene The USD files for the ZED camera models are bundled with the ZED Camera extension, in the `exts/sl.sensor.camera/data/usd` folder. If you don't already have the extension locally, clone the [GitHub repository](https://github.com/stereolabs/zed-isaac-sim): ```bash cd git clone https://github.com/stereolabs/zed-isaac-sim.git ``` ![image](/_fern-img/f8a0f9b1d25380cf7370ebd98f791d94fde196db8b01744653c260a08d72259e.webp) Select the model **ZED\_X.usdc** and drag it into the *Viewport* to place it in the position that you prefer. A new prim named `ZED_X` will appear in the `Stage` view as a child of `World`. ![image](/_fern-img/f8db54934640c7965c05fc239fb4ecc70950a5fc4e66d8d203c997f82d566017.webp) The `ZED_X` prim has an important XForm named `base_link`; this is the reference frame of the mounting point on the bottom of the camera. ### Enable the ZED camera The data streaming is activated using the OmniGraph node **ZED Camera Helper**. * Create a new `Action Graph`, **Create -> Visual Scripting -> Action Graph**. * Add a new node of type `On Playback Tick` to the graph. You can easily search for it by writing `Tick` in the search form. * Type `ZED` in the search form and drag the `ZED Camera Helper` node into the graph. * Connect the `ExecIn` input of `ZED Camera Helper` to the `Tick` output of the `On Playback Tick` node. > **Note** > > The ZED Camera extension also includes a lower-level *ZED Stream* node. For most use cases, make sure to use the **ZED Camera Helper** node (or the **ZED Camera One Helper** node for monocular ZED X One cameras). ![image](/_fern-img/73859b10b4716fecbab2ae8889283920a47a8424a87ad30746095f42853d18a3.webp) * Click on the `ZED Camera Helper` in the graph and select the `Property` tab on the right. * Click `+ Add Target` near `ZED Camera prim`. * Select the root XForm named `ZED_X` and hit `Select`. ![image](/_fern-img/613cbf1f7b4cbd8224bae0b2f2aafd98644681309219f45f20b7c91123cbd4f0.webp) ## Publish simulation time to ROS 2 When working with simulated data, the ROS 2 nodes cannot rely on the system clock to timestamp the data accurately. Instead, they have to use the simulation time, which can be faster or slower than real time. To handle this behavior, the Isaac™ Sim ROS 2 Bridge provides a method to publish messages to the `/clock` topic with simulation time data. All the ROS 2 nodes have a parameter named `use_sim_time`. When this parameter is set to `true`, each ROS 2 node subscribes to the `/clock` topic, and uses the simulation time as the reference for time instead of the system time. * Select the `Action Graph` tab in the bottom panel. * Add a new node of type `Isaac Read Simulation Time`. * \[Optional] Click on the `Isaac Read Simulation Time`. * \[Optional] Select the `Properties` tab in the right panel. * \[Optional] Check the `Reset on stop` option to reset the simulation time to zero each time the simulation is stopped and restarted. * Add a new node of type `ROS2 Publish Clock`. * Connect the `Tick` output of the `On Playback Tick` node to the `ExecIn` input of `ROS2 Publish Clock`. * Connect the `Simulation Time` output of the `Isaac Read Simulation Time` node to the `Time Stamp` input of `ROS2 Publish Clock`. ![image](/_fern-img/083099316c319a41fcf78c3acd592bfa9c07d456e59911d2120b96b819a84020.webp) * Start the simulation by hitting the Play button on the left panel. ![image](/_fern-img/98ca4e2568546feab14912accd42d8b04573ea62150d436aac5bb9d1659e338a.webp) Now you can verify that the configuration is valid: * Open a Terminal console (`Ctrl + Alt + t`). * Enter the command `ros2 topic echo /clock`. * Verify that the `/clock` topic is correctly published: ```bash ros2 topic echo /clock clock: sec: 6 nanosec: 900000359 --- clock: sec: 6 nanosec: 916667027 --- clock: sec: 6 nanosec: 933333694 --- clock: sec: 6 nanosec: 950000362 --- [...] ``` * Stop listening to the `/clock` topic with `Ctrl+c`. ## Start the ZED ROS 2 Wrapper node with simulated data The ZED ROS 2 Wrapper enables connection to the ZED Camera extension, publishing ZED data in ROS 2 as if a real camera were present. ### Prerequisites The "ZED ROS 2 Wrapper" and the "ZED ROS 2 Examples" packages must be installed on the system. Follow the relevant guides to install them if you have not already done so: * [Install the ZED ROS 2 Wrapper package](https://github.com/stereolabs/zed-ros2-wrapper#build-the-package) * [Install the ZED ROS 2 Examples package](https://github.com/stereolabs/zed-ros2-examples#build-the-package) ### Launch the ZED ROS 2 node Launch a standalone ZED ROS 2 node with simulated ZED data as input: ```bash ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx sim_mode:=true use_sim_time:=true ``` Launch options: * \[Mandatory] `sim_mode`: start the ZED node in simulation mode if `true`. * \[Mandatory] `use_sim_time`: force the node to wait for valid messages on the topic `/clock`, and use the simulation time as the reference. * \[Optional] `sim_address`: set the address of the simulation server. Default is `127.0.0.1` and it's valid if the node runs on the same machine as the simulator. * \[Optional] `sim_port`: set the port of the simulation server. It must match the value of the field `Streaming Port` of the properties of the `ZED Camera Helper` Action Graph node. A different `Streaming Port` value for each camera is required in multi-camera simulations. > Set `camera_model` to match the camera placed in the simulation. The ZED Camera extension supports the ZED X stereo family (`zedx`, `zedxm`, `zedxnano`), with `zedx` being the most thoroughly tested. > **Note** > > Starting from v5.5.0 of the ROS 2 Wrapper the monocular node supports simulation as well. Launch it with a ZED X One camera model, and pair it with a `ZED Camera One Helper` Action Graph node in the simulation, to publish images and IMU data from the simulated camera: > > ```bash > ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedxonegs sim_mode:=true use_sim_time:=true > ``` > > A simulated Virtual Stereo Camera (`camera_model:=virtual`) no longer requires `serial_numbers` or `camera_ids`, since the simulator streams the already paired stereo images. > **Note** > > The grab resolution and the frame rate are no longer forced to `HD1080` @ 60 Hz: since v5.5.0 of the ROS 2 Wrapper they are read from the simulated camera, so a simulation running at the extension default of 30 FPS is reported and published correctly. This also removes the spurious `general.grab_frame_rate value is not valid` warning printed at every start-up. `general.pub_frame_rate: 0` ("no limit") now follows the real grab rate even when that rate is known only once the input is open. You can also start a preconfigured instance of `rviz2` to visualize all the information available in simulation by using the command: ```bash ros2 launch zed_display_rviz2 display_zed_cam.launch.py camera_model:=zedx sim_mode:=true use_sim_time:=true ``` The `display_zed_cam.launch.py` launch file includes the `zed_camera.launch.py` launch file, so it provides the same parameters. You can get the list of all the available launch parameters by using the `-s` launch option: ```bash ros2 launch zed_wrapper zed_camera.launch.py -s ros2 launch zed_display_rviz2 display_zed_cam.launch.py -s ``` Here's an example of `rviz2` running with the simulated information obtained by placing the ZED camera on a shelf in a simulated warehouse: ![image](/_fern-img/100639ac86a2e31ea9727cbc24fe804cf15160c6d6ceee2b39825de28ab80f91.webp) ![image](/_fern-img/d69a1178b74abf3d49b8ec00a46b8772572558031672e177957bf866789b7e19.webp) ## See also * **[Setting up the ZED in Isaac™ Sim](/docs/integrations/isaac-sim/setting-up-the-zed-in-isaac-sim)**: the full reference for adding a ZED camera, building the Action Graph, and configuring the ZED Camera Helper node. * **[Getting Started with ROS 2 and ZED](/docs/integrations/ros-2/)**: the full ZED ROS 2 Wrapper documentation, covering parameters, topics, and available tools. * **[Using the ZED in Isaac™ Lab](/docs/integrations/isaac-sim/using-the-zed-in-isaac-lab)**: an alternative, SDK-free path to read stereo RGB and depth as in-process tensors for reinforcement learning and imitation learning. * **[SDK-free depth capture](/docs/integrations/isaac-sim/sdk-free-depth-capture)**: capture RGB and renderer depth directly in Isaac™ Sim, with no ZED SDK and no streaming.