Code Monkey home page Code Monkey logo

semu.misc.vscode's Introduction

Embedded VS Code for NVIDIA Omniverse

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

semu.misc.vscode's People

Contributors

toni-sm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

semu.misc.vscode's Issues

Zombie TCP server after closing Kit app(s)

It seems like the TCP server within the extension is not being shutdown. This happens to me every time I use the extension. It doesn't seem to be dependent on whether I've crashed or anything like that. This prevents me from starting a new TCP server when I start/restart another Omniverse app.

I've been working around this by finding the process that's still listening on the port and killing the process. It's odd because I do see that you are closing the socket on shutdown in the code. Have you had this happen?

Classes modifications and other modifications not taken in account.

Hello @Toni-SM.
First i want to say a big thank you for the extention you provided. It helped me a lot with my work in the last couple months.
But i'm facing an issue with it. When i instanciate a class, and then modify the contents of the class, those modifications are not taken in account when i reexecute my script. Only way to make those modification work is to restart isaacsim.
Screenshot from 2023-06-02 10-36-35

And after i modify the class :
Screenshot from 2023-06-02 10-41-50

After restarting isaacsim :

Screenshot from 2023-06-02 10-44-44

Provide a way to launch VSCode from Kit

I can help with this one.

If we launch VSCode as a subprocess from Kit, we can pass the PYTHONPATH environment variable so that autocomplete and syntax highlighting will work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.