Skip to main content

Visualizes the state of your nova instance inside of [rerun.io](https://rerun.io). This is intended to be used alongside the [nova python lib](https://github.com/wandelbotsgmbh/wandelbots-nova).

Project description

Nova Rerun Bridge

PyPI version License Build Status

A visualization extension for wandelbots-nova that enables real-time 3D visualization of robot trajectories using rerun.io.

https://github.com/user-attachments/assets/ab527bc4-720a-41f2-9499-54d6ed027163

Prerequisites

🚀 Quick Start

Check out the minimal example:

# Install the package
poetry install

# Download required robot models
poetry run download-models
# Add credentials and instance to .env file
NOVA_API="https://your-instance.wandelbots.io"
NOVA_ACCESS_TOKEN="your-access-token"
from nova_rerun_bridge import NovaRerunBridge
from nova import Nova

# Connect to your Nova instance (or use .env file)
nova = Nova(
    host="https://your-instance.wandelbots.io",
    access_token="your-access-token"
)
bridge = NovaRerunBridge(nova)

# Setup visualization
await bridge.setup_blueprint()

# Log a trajectory
await bridge.log_trajectory(joint_trajectory, tcp, motion_group)

✨ Features

  • 🤖 Real-time 3D robot visualization (see a list of supported robots)
  • 🎯 Trajectory playback and analysis
  • 💥 Collision scene visualization
  • ⏱️ Motion timing analysis
  • 🔄 Continuous monitoring mode

💻 Usage Examples

The python library can be used to feed data to the rerun desktop app. The library is built on top of the nova python library and provides a simple interface to feed data to the rerun desktop app. See the minimal example on how to use the library.

Basic Motion Logging

# Log simple motion
await bridge.log_trajectory(joint_trajectory, tcp, motion_group)

Collision Scene Visualization

# Log collision scenes
await bridge.log_collision_scenes()

Stream current robot state

# Start streaming robot state
await bridge.start_streaming(motion_group)

# Stop streaming all robot states
await bridge.stop_streaming()

Log Actions

# Log planned actions
await bridge.log_actions(actions)

Setup

Adjust the NOVA_API and NOVA_ACCESS_TOKEN in the .env file to your instance URL (e.g. https://unzhoume.instance.wandelbots.io) and access token. You can find the access token in the developer portal.

📚 More Examples

Check out our example repository for more detailed examples.

⚙️ Configuration

The bridge can be configured through environment variables:

  • RECORDING_INTERVAL: Set visualization update interval (default: 0.1s)

Download Robot Models

After installing the library, you need to download the robot models:

# If installed via poetry
poetry run download-models

# If installed via pip
python -m nova_rerun_bridge.models.download_models

This will download the robot models into your project folder. You can use the library without downloading the models, but you will not be able to visualize the robot models in the rerun viewer.

Tools

Code formatting and linting is done with [ruff]

poetry run ruff check scripts/. --fix
poetry run ruff format

Build

To build the package locally, run the following command

poetry build

This will create a dist/ directory with the built package (.tar.gz and .whl files).

Install a development branch in Poetry

nova-rerun-bridge = { git = "https://github.com/wandelbotsgmbh/nova-rerun-bridge.git", branch = "feature/branchname" }

Run as Nova App

The easiest way to try it out is to install the app on your nova instance. Use the nova cli tool and run:

nova catalog install rerun

The app uses the populate script to feed the data to the rerun desktop app. The app automatically runs this script in the background. You can also run the script manually on your local machine.

  • run python nova_rerun_bridge/polling/populate.py to start a service which periodically polls the nova instance for new planned trajectories

Development

Deploy on local instance

  • use the kubeconfig from your nova instance and run export KUBECONFIG=kubeconfig

  • you can use skaffold to build the image and change the deployment

skaffold dev --cleanup=false --status-check=false

Issues

  • rerun is able to run behind reverse proxy and the viewer can connect via web
  • rerun sdk is not able to connect to rerun which is hosted behind reverse proxy
    • client communicates just via sockets
    • intermediate solution is socat
brew install socat
socat TCP4-LISTEN:6666,fork SYSTEM:"curl -X POST -d @- http://172.30.2.224/some/rerun/sdk/"

{ echo "load_module /usr/lib/nginx/modules/ngx_stream_module.so;"; cat /etc/nginx/nginx.conf; } > temp_file && mv temp_file /etc/nginx/nginx.conf

📝 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nova_rerun_bridge-0.28.0.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nova_rerun_bridge-0.28.0-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

Details for the file nova_rerun_bridge-0.28.0.tar.gz.

File metadata

  • Download URL: nova_rerun_bridge-0.28.0.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nova_rerun_bridge-0.28.0.tar.gz
Algorithm Hash digest
SHA256 14f0fe1e960ddc41ac323f3df5eff234ca9ae6983eeca2fc35f096eeb962a92a
MD5 2cef0d95c5ded49a9f07db90e79191cb
BLAKE2b-256 b600c86b9bf292bff220684c0debc7f421cf989fd47442ca64f140c835b847ae

See more details on using hashes here.

File details

Details for the file nova_rerun_bridge-0.28.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nova_rerun_bridge-0.28.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b301b59428a8f5dacfd103d9263d50a0f5e3fa1bc24e33d510bbcb2981a46298
MD5 1ada8b0c069ff2a5e07cf18bbc1be9ba
BLAKE2b-256 53ae9a937752f5ea8ad0f382d3703e539b83c345f1b6c1a95790b07e715eeb23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page