Giter Site home page Giter Site logo

nvidia-omniverse / kit-extension-template-cpp Goto Github PK

View Code? Open in Web Editor NEW
41.0 5.0 10.0 3.1 MB

Omniverse Kit C++ Extension Template

License: Apache License 2.0

Batchfile 5.60% Shell 3.14% Lua 8.06% Kit 1.98% PowerShell 10.25% Python 31.45% C++ 38.53% C 0.99%

kit-extension-template-cpp's Introduction

Omniverse Kit C++ Extension Template

This project contains everything necessary to develop extensions that contain C++ code, along with a number of examples demonstrating best practices for creating them.

What Are Extensions?

While an extension can consist of a single extension.toml file, most contain Python code, C++ code, or a mixture of both:

                                                     Kit
                                                      |
                   ___________________________________|___________________________________
                  |                                   |                                   |
             Python Only                            C++ Only                            Mixed
(eg. omni.example.python.hello_world)  (eg. omni.example.cpp.hello_world)  (eg. omni.example.cpp.pybind)

Extensive documentation detailing what extensions are and how they work can be found here.

Getting Started

  1. Clone the GitHub repo to your local machine.
  2. Open a command prompt and navigate to the root of your cloned repo.
  3. Run build.bat to bootstrap your dev environment and build the example extensions.
  4. Run _build\{platform}\release\omni.app.example.extension_browser.bat to open an example kit application.
    • Run omni.app.example.viewport.bat instead if you want the renderer and main viewport to be enabled.
    • Run omni.app.kit.dev.bat instead if you want the full kit developer experience to be enabled.
  5. From the menu, select Window->Extensions to open the extension browser window.
  6. Enter omni.example.cpp in the search bar at the top of the extension browser window to view the example extensions included with this repo.

Extension Browser

Debugging C++ Extensions

  1. Run build.bat (if you haven't already) to generate the solution file.
  2. Open _compiler\vs2019\kit-extension-template-cpp.sln using Visual Studio 2019.
  3. Select omni.app.example.extension_browser as the startup project (if it isn't already).
    • Select omni.app.example.viewport instead if you want the renderer and main viewport to be enabled.
    • Select omni.app.kit.dev instead if you want the full kit developer experience to be enabled.
  4. Run/debug the example kit application, using the extension browser window to enable/disable extensions.

Visual Studio Solution

Creating New C++ Extensions

  1. Copy one of the existing extension examples to a new folder within the source/extensions folder.
    • The name of the new folder will be the name of your new extension.
    • The omni prefix is reserved for NVIDIA applications and extensions.
  2. Update the fields in your new extension's config/extension.toml file as necessary.
  3. Update your new extension's premake5.lua file as necessary.
  4. Update your new extension's C++ code in the plugins folder as necessary.
  5. Update your new extension's Python code in the python folder as necessary.
  6. Update your new extension's Python bindings in the bindings folder as necessary.
  7. Update your new extension's documentation in the docs folder as necessary.
  8. Run build.bat to build your new extension.
  9. Refer to the Getting Started section above to open the example kit application and extension browser window.
  10. Enter the name of your new extension in the search bar at the top of the extension browser window to view it.

Generating Documentation

  1. Run repo.bat docs to generate the documentation for the repo, including all extensions it contains.
    • You can generate the documentation for a single extension by running repo.bat docs -p {extension_name}
  2. Open _build/docs/kit-extension-template-cpp/latest/index.html to view the generated documentation.

Contributing

The source code for this repository is provided as-is and we are not accepting outside contributions.

kit-extension-template-cpp's People

Contributors

dbosnich-nvidia avatar erwincoumans avatar kevin-picott-nv avatar kshivakumar-nvidia avatar novoselov-ab avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

kit-extension-template-cpp's Issues

Main funcitons in TestOgnExampleNoed.py didn't get called during testing process (does it mean that the node isn't tested?)

Hey,

I built the extension omni.example.cpp.omnigraph_node successfully and tried to test it by directly calling the tests-omni.example.cpp.omnigrapg_node.sh with a generated coverage file.

However, I noticed that the coverage was low(23%). Then I found out the main part of TestExampleNode.py didn't get executed, which means the functionality of this example ogn wasn't tested.. Here is the test report: file:///home/yaoying/Desktop/kit-extension-template-cpp/_testoutput/test_report/index.html

It would very nice if you could give me some hints about how to test an ogn. Thanks in advance!

External dependencies for C++ extensions in Isaac Sim

Hello!
I am able to build and source the example extensions. However, I am having trouble with importing dependencies using the Premake build system. Could please you give us an example on how to add an external dependency like OpenCV to the extension?

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.