Carb.livestream-rtc.plugin

sudo docker run --name isaac-sim-new --entrypoint bash -it --gpus device=0 -e “ACCEPT_EULA=Y” --rm --network=host -e “PRIVACY_CONSENT=Y”
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw
-v ~/docker/isaac-sim/documents:/root/Documents:rw
-v ~/docker/isaac-sim/config:/root/.nvidia-omniverse/config:rw
nvcr.io/nvidia/isaac-sim:2023.1.1

++++++++++++
sudo docker ps -a

++++++++++++++++++++++++++++++++++

mkdir -p /isaac-sim/config
echo ‘{
“webrtc”: {
“enabled”: true,
“use_builtin_turn”: true,
“use_builtin_stun”: true,
“turn_uri”: “turn:173.208.162.74:3478”,
“turn_username”: “admin”,
“turn_password”: “securepassword123”
}
}’ > /isaac-sim/config/webrtc_config.json

+++++++++++++++++++++++++++++++++++++++++++

echo ‘#!/bin/bash
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/isaac-sim/exts/omni.isaac.ros2_bridge/humble/lib
./isaac-sim.headless.webrtc.sh --allow-root --/isaac-sim/config/webrtc_config.json’ > /isaac-sim/launchwebrtc.sh

chmod +x /isaac-sim/launchwebrtc.sh

./launchwebrtc.sh

2 Likes

Certainly! Here is a comprehensive summary of the steps we’ve taken so far to set up and run the omni.services.streamclient.webrtc extension with NVIDIA Omniverse Kit App Template. This summary includes the configuration and verification steps, as well as the Docker image details.


Setting Up and Running omni.services.streamclient.webrtc Extension with NVIDIA Omniverse Kit App Template

Overview

In this guide, we configured and ran the omni.services.streamclient.webrtc extension using the NVIDIA Omniverse Kit App Template. The steps included downloading and installing the necessary software, setting up the environment, opening required ports, verifying services, and running the WebRTC server.

Steps

1. Download and Install Omniverse Launcher

  1. Visit the NVIDIA Omniverse website.
  2. Download the Omniverse Launcher for your operating system.
  3. Install the Omniverse Launcher by following the on-screen instructions.

2. Install Omniverse Create

  1. Open the Omniverse Launcher.
  2. Sign in with your NVIDIA account.
  3. Navigate to the “Exchange” tab.
  4. Search for “Omniverse Create” and click “Install”.
  5. Follow the prompts to complete the installation.

3. Set Up the Kit App Template

  1. Clone the Kit App Template Repository:

    git clone https://github.com/NVIDIA-Omniverse/kit-app-template.git
    cd kit-app-template
    
  2. Create a New Extension:

    ./repo.sh template new
    
    • Select “Extension”: Use arrow keys to select “Extension” and press Enter.
    • Enter Details:
      • Name of extension: omni_services_streamclient_webrtc
      • Extension display name: Omni Services StreamClient WebRTC
      • Version: 0.1.0
  3. Build the Extension:

    ./repo.sh build
    

4. Locate and Prepare the Kit Executable

  1. Unzip the Package:

    unzip omni.create.sh@106.0.2+main.0.70f7641d.local.linux-x86_64.release.zip -d /home/administrator/kit-app-template/_build/packages/unzipped
    
  2. Navigate to the Unzipped Directory:

    cd /home/administrator/kit-app-template/_build/packages/unzipped
    
  3. Verify the kit.sh Script Exists:

    ls -l
    

5. Configure and Run the WebRTC Server

  1. Create the launch_webrtc.sh Script:

    nano launch_webrtc.sh
    

    Paste the following script:

    #!/bin/bash
    
    # Path to the extracted kit.sh script
    KIT_PATH="/home/administrator/kit-app-template/_build/packages/unzipped/kit"
    
    # Verify the directory path
    cd $KIT_PATH || { echo "Directory not found: $KIT_PATH"; exit 1; }
    
    # Verify the kit.sh script exists
    if [ -f "./kit.sh" ]; then
        ./kit.sh apps/omni.create.kit --enable omni.services.streamclient.webrtc \
          --/exts/omni.services.streamclient.webrtc/ice_servers/1/urls/0="turn:173.208.162.74:3478?transport=udp" \
          --/exts/omni.services.streamclient.webrtc/ice_servers/1/urls/1="turn:173.208.162.74:3478?transport=tcp" \
          --/exts/omni.services.streamclient.webrtc/ice_servers/1/username="user" \
          --/exts/omni.services.streamclient.webrtc/ice_servers/1/credential="secret" \
          --no-window \
          --allow-root
    else
        echo "kit.sh script not found"
        exit 1
    fi
    
  2. Make the Script Executable:

    chmod +x launch_webrtc.sh
    
  3. Run the Script:

    ./launch_webrtc.sh
    

6. Ensure Required Ports Are Open

  1. Check Port Status on the Server:

    sudo netstat -tuln | grep 3478
    sudo netstat -tuln | grep 8011
    
  2. Open Ports Using UFW (Linux):

    sudo ufw allow 3478/tcp
    sudo ufw allow 3478/udp
    sudo ufw allow 8011/tcp
    sudo ufw reload
    
  3. Open Ports Using iptables (Linux):

    sudo iptables -A INPUT -p tcp --dport 3478 -j ACCEPT
    sudo iptables -A INPUT -p udp --dport 3478 -j ACCEPT
    sudo iptables -A INPUT -p tcp --dport 8011 -j ACCEPT
    sudo iptables-save | sudo tee /etc/iptables/rules.v4
    
  4. Open Ports Using Windows Firewall:

    netsh advfirewall firewall add rule name="Open Port 3478 TCP" protocol=TCP dir=in localport=3478 action=allow
    netsh advfirewall firewall add rule name="Open Port 3478 UDP" protocol=UDP dir=in localport=3478 action=allow
    netsh advfirewall firewall add rule name="Open Port 8011 TCP" protocol=TCP dir=in localport=8011 action=allow
    

7. Verify External Access

  1. Using curl:

    curl http://173.208.162.74:8011/streaming/webrtc-client?server=173.208.162.74
    
  2. Using a Web Browser:
    Navigate to:

    http://173.208.162.74:8011/streaming/webrtc-client?server=173.208.162.74
    

Docker Image Details

If you need to run the Omniverse services in a containerized environment, you can use the Docker image for Omniverse. Here’s an example of pulling and running the Docker image:

  1. Pull the Docker Image:

    docker pull nvcr.io/nvidia/omniverse-kit:latest
    
  2. Run the Docker Container:

    docker run --rm -it -p 8011:8011 -p 3478:3478 nvcr.io/nvidia/omniverse-kit:latest
    

This summary includes all the steps we’ve followed, from setting up the environment to configuring and running the WebRTC server with the specified IP address and ports. You can use this as a detailed guide to post on a forum or share with others. If you need further details or clarification, feel free to ask!

2 Likes

in the very begining mension my currunt approch