Skip to content

Toni-SM/semu.misc.vscode

Repository files navigation

Embedded VS Code for NVIDIA Omniverse


This extension is deprecated in favor of Isaac Sim VS Code Edition

See more details in Isaac Sim docs.


This extension can be described as the VS Code version of Omniverse's Script Editor. It allows to execute Python code, embedded in the current NVIDIA Omniverse application scope, from the VS Code editor and displays the results in the OUTPUT panel (under Embedded VS Code for NVIDIA Omniverse) of the VS Code editor


Target applications: Any NVIDIA Omniverse app

Supported OS: Windows and Linux

Changelog: CHANGELOG.md

Table of Contents:


showcase


Requirements

This extension requires its VS Code pair extension Embedded VS Code for NVIDIA Omniverse to be installed and enabled in the VS Code editor instance to be able to execute code in the current NVIDIA Omniverse application scope


vscode_ext


Extension setup

  1. Add the extension using the Extension Manager or by following the steps in Extension Search Paths

    • Git url (git+https) as extension search path

      ⚠️ There seems to be a bug when installing extensions using the git url (git+https) as extension search path in Isaac Sim 2022.1.0. In this case, it is recommended to install the extension by importing the .zip file

      git+https://github.com/Toni-SM/semu.misc.vscode.git?branch=main&dir=exts
      
    • Compressed (.zip) file for import

      semu.misc.vscode.zip

  2. Enable the extension using the Extension Manager or by following the steps in Extension Enabling/Disabling


Extension usage

Enabling the extension starts a TCP socket server that executes the code sent to it from the VS Code Embedded VS Code for NVIDIA Omniverse pair extension according to the VS Code settings and commands shown in the image below


preview1

The VS Code extension communicates via the configured address (WORKSTATION_IP:PORT), which is also indicated inside the Omniverse application in the Windows > Embedded VS Code menu


Disabling the extension shutdowns the TCP socket server


VS Code interface


preview2


Configuring the extension

The extension can be configured by editing the config.toml file under [settings] section. The following parameters are available:


Extension settings

Parameter Value Description
socket_ip 0.0.0.0 The IP address on which the TCP socket server will be listening for incoming requests
socket_port 8224 The port on which the TCP socket server will be listening for incoming requests. In addition, the same port is used by a UDP socket to send carb logs (carb logging)
carb_logging true Whether to send carb logging to be displayed in the *Embedded VS Code for NVIDIA Omniverse (carb logging)* output panel in the VS Code editor

Limitations

  • Print output will only be available in the VS Code OUTPUT panel after complete execution of the entire or selected code. Very large prints may not be displayed in the output panel

  • Print output, inside callbacks (such as events), is not displayed in the VS Code OUTPUT panel but in the Omniverse application terminal. For that propose, use the following carb logging functions: carb.log_info, carb.log_warn or carb.log_error. If the carb logging is enabled, the output will be displayed in the Embedded VS Code for NVIDIA Omniverse (carb logging) output panel

  • Carb log displaying is only available from Python calls. Logs generated by NVIDIA Omniverse applications/extensions implemented with another programming language (e.g. C/C++) are not displayed in the output panel

  • The kit commands snippets (with their parameters, default values and annotations) are automatically generated from the list of commands available from Create, Code and Isaac Sim on Linux. Some commands may not be available in some Omniverse applications

Contributing

The source code for both the NVIDIA Omniverse application and VS Code editor extensions are located in the same repository (https://github.com/Toni-SM/semu.misc.vscode):

  • NVIDIA Omniverse extension: exts/semu.misc.vscode
  • VS Code extension: exts-vscode/embedded-vscode-for-nvidia-omniverse