The Foxglove Podcast, Ep. 1: The New 3D Panel

The Foxglove Podcast, Ep. 1: The New 3D Panel

Introduction

In this section, the hosts introduce themselves and their backgrounds in robotics.

Introductions

  • Jacob and John introduce themselves as members of the Foxglove team.
  • Jacob talks about his background in robotics, including his experience with US First organization and Lego Robotics.
  • John talks about his background in simulation and 3D rendering.

Foxglove Studio 3D Panel

In this section, the hosts discuss the new Foxglove Studio 3D panel, its development process, and its features.

Previous Versions of Foxglove Studio

  • Jacob discusses how Foxglove Studio began as a fork of Webviz, a web-based visualization tool for robotics data developed at Cruise.
  • The hosts talk about some of the problems that Webviz aimed to solve, such as difficulties with sharing configurations among team members.

Development Process for Foxglove Studio 3D Panel

  • The hosts discuss how they set out to develop a web app that could handle all visualization tasks for robotics data.
  • They talk about how they used feedback from users to improve the app's functionality over time.

Features of Foxglove Studio 3D Panel

  • The hosts describe some of the key features of the new 3D panel, including improved performance and support for more types of data.
  • They also discuss some of the challenges they faced during development, such as optimizing performance on constrained devices.

The Origin of the 3D Panel

In this section, the speakers discuss the origin of the 3D panel and how it was one of the first things they got to work on during a hackathon. They also talk about how it was originally written in 3js and later migrated to using Regal.

Early Development

  • The 3D panel was one of the very first things that they got to work on during a hackathon.
  • It may have actually been written in 3js, but shortly thereafter, it was migrated to using Regal.
  • The code had been around for quite a long time and had grown organically with tons of features.

Technical Choices

  • There were some performance issues with the 3js implementation early on, especially when handling lots of messages coming in rapidly.
  • This led them towards using Regal, which is a low-level webgl wrapper library that makes it easier to use webgl.
  • They also started building some stuff in Regal and realized that it's so low level that it's actually a bit hard to write a real feature full panel on top of this.
  • Since the rest of the app was built-in react, they decided to write a little react wrapper around Regal which became worldview.

Challenges with Rewriting the 3D Panel

In this section, John talks about some challenges they faced while rewriting the 3D panel. He mentions that going into making changes was fairly challenging due to structural debt and complexity baked into layering features over time.

Challenges Faced

  • Going into making changes was fairly challenging due to structural debt and complexity baked into layering features over time.
  • There was so much complexity in that panel that they wanted to bring out of that particular panel into the app.
  • The 3D panel had the most complexity and features, making it challenging to make changes.
  • They wanted to bring out the complexity of that panel into the app.

Creating a Webviz T-Shirt

In this section, they talk about how they created a Webviz t-shirt using worldview. They also mention that there were some concerns about sharing original data on the shirt.

Creating a T-Shirt

  • They needed Vector files like an SVG or an EPS file to send to the printer for creating t-shirts.
  • They hacked up worldview so that those react elements instead of becoming render calls in the Regal API would become SVG elements and produce one giant SVG.
  • This is how they created their original Webviz t-shirt.
  • There were concerns about sharing original data on the shirt, but since it's hard to get actual original data from someone, it wasn't much of an issue.

Improving the Extension API and 3D Panel

In this section, the speakers discuss how they improved the extension API and rebuilt the 3D panel to use it. They also talk about performance improvements and adding new features.

Rebuilding the 3D Panel with Extension API

  • The new 3D panel is fully using the extension API to run.
  • Pulling complexity out was one of the drivers for improving the extension API.
  • The old 3D panel was not built around their concept of visualizing topics, so retrofitting new types of renderables was difficult.
  • In the new scene, adding new renderables is baked in as a first-class concept.

Performance Improvements and Adding New Features

  • Being low level like regl makes it easy to directly manipulate a Shader but can be difficult for higher-level changes that would benefit from having a scene graph.
  • Using 3js allows them to draw from different rendering techniques shared by others in the open-source community.
  • React wasn't suitable for large 3D scenes with high-frequency data coming in, so they switched away from it for most of their updates.
  • Switching away from React allowed them to create larger scene graph or DOM changes applied efficiently with a diff.

Worldview and Rendering

In this section, the speakers discuss how worldview gives primitives for rendering 3D scenes. They also talk about how data is transformed into renderable objects and the challenges of updating them.

Worldview and Primitives

  • Worldview provides primitives for rendering 3D scenes using angle brackets syntax.
  • In reality, when rendering a scene, primitives are created dynamically based on incoming data.
  • The process involves transforming data into something that can be rendered as an object or directly into GL calls.

React Wrapper and Performance

  • Moving away from React in the new 3D panel allows for more control over what updates trigger which GL calls.
  • Fine-grained control is beneficial in high-performance scenarios where there is a lot of data to handle.
  • React handles updates automatically, making it hard to reason about performance impact when new messages come in.

Architectural Changes

  • The move away from React is positive because it allows for more control over rendering and performance impact.
  • Having fine-grained control over updates helps with high-performance scenarios.
  • Challenges arise when ensuring all rendering has occurred before moving on to the next batch of messages.

Settings API

In this section, the speakers discuss the settings API used in the new 3D panel. They talk about its benefits and how it unifies all panels' interfaces.

Unified Interface for Panels

  • The settings API provides a unified interface for modifying settings across all panels.
  • Every panel has consistent UI regardless of whether it's a custom extension or native panel.
  • The new 3D panel has per-topic settings that can be overridden at any time.

Customizability

  • Adding new fields to the settings sidebar is straightforward compared to previous versions of the 3D panel.
  • More customizability was added during the porting process to support everything that existed before and add more features.

Handling Topic List

In this section, the speakers discuss how they handle the topic list in the new 3D panel. They talk about per-topic settings and how they can be overridden.

Per-Topic Settings

  • The new 3D panel has per-topic settings that allow for more customization.
  • Every topic shows up in the settings sidebar, and each one has its own set of settings.
  • Overriding per-topic settings is possible, making it easier to modify specific topics' behavior.

Consistent UI

  • The settings API provides a consistent interface across all panels.
  • Having a unified interface makes it easier to modify settings regardless of which panel you're using.

Overview of the Old 3D Panel

This section discusses the limitations of the old 3D panel and how it covered half of the scene while open. Editing settings in a particular topic would drop a modal that completely covered the entire app.

Limitations of the Old 3D Panel

  • The topic list covered half of the scene while open.
  • Editing settings in a particular topic would drop a modal that completely covered the entire app.

Improvements to the New 3D Panel

This section discusses improvements made to the new 3D panel, including changes to settings and custom layers.

Improvements to Settings and Custom Layers

  • The new 3D panel has improved settings that no longer overlap with content.
  • Custom layers have been added, allowing users to add an arbitrary number of grids, meshes, or programmatic primitives.
  • It is now possible to load map tiles or geojson off your desk for more flexibility.

Image Rendering in the New 3D Panel

This section discusses image rendering in the new 3D panel and its potential for advanced overlays.

Image Rendering Features

  • The new 3D panel includes image rendering features that were previously sitting in backlog.
  • It takes two input topics (camera info and actual image data) to create a warped representation of an image plane in space.

Advanced Overlays with Image Rendering

  • It should be possible to refactor the image panel to fully support advanced overlays using technology built into this panel.

Bring Your Own Data and Back Slot Schemas

This section discusses the "Bring Your Own Data" project, which allows users to take full advantage of the 3D panel regardless of their message format.

The "Bring Your Own Data" Project

  • The "Bring Your Own Data" project allows users who are not using ROS to take full advantage of the 3D panel.
  • It supports various message formats such as protobuf, Avro, Arrow, and ZeroMQ.

Introduction to Function of Schemas

In this section, the speaker discusses the features supported by Studio and the need for function schemas.

Features Supported by Studio

  • The speaker discusses the features currently supported by Studio.
  • They mention that they have a flux Club schemas repo for language agnostic schemas for data.
  • Foxglove schemas can be used with JSON encoding as well as protobuf definitions.
  • The speaker talks about translating marker arrays in Ross into foxglove scene entity and scene update messages.

Foxglove Scene Entities

  • The speaker explains that foxglove scene entities are used to describe a visual scene with multiple entities in it.
  • These entities support having lifetimes and various primitives such as cubes, spheres, cones, meshes, etc.
  • The speaker recommends checking out foxglove scene entities even if you're not using Ross.

Technical Challenges Faced in Building the New 3D Panel

In this section, the speaker talks about some of the technical challenges faced while building the new 3D panel.

Follow Mode Feature

  • The speaker mentions adding a feature to change follow mode for the camera which was challenging to implement.
  • This feature captures an offset at a specific point and applies a delta offset every frame so that it appears that the camera is staying stationary even though we're getting further away from the origin.

Rethinking the 3D Panel

In this section, the speakers discuss how they had to rethink and re-implement the 3D panel from scratch. They also talk about some of the challenges they faced with managing resources in GPU programming.

Re-implementing the Feature

  • The team had to go back to the whiteboard and fully re-implement the feature.
  • The architecture of how different renderables are added to the scheme is quite different, and something that required rethinking.
  • They created an internal API called "scene extension" for adding things to the scene graph.

Managing Resources in GPU Programming

  • In GPU programming, unmanaged resources need manual cleaning up.
  • There's quite a bit of code scattered throughout the whole new 3D panel for manually managing these resources.
  • Anything that has a dispose method needs to have that called.

Future Plans for the 3D Panel

In this section, speakers discuss future plans for Fox Club Studio's 3D panel. They talk about supporting custom rendering for certain message types and adding support for displaying 3D markers on images.

Custom Rendering for Message Types

  • Fox Club Studio is looking at allowing users to write more of an extension or plugin that does transformation live.
  • This will be associated with the 3D panel and may also support other panels as well.

Displaying 3D Markers on Images

  • Rethinking image panel to support 3D markers on images is definitely something that's there in the nearer term.

Transform Editing in 3D Panel

In this section, the speaker talks about the new transform editing feature in the 3D panel. This feature allows users to apply fixed position or rotational offsets to near transforms and edit them visually within the app.

Live URDF Editor

  • The new transform editing feature is like a live URDF editor.
  • Users can load up all their transforms into Studio and visually slide them over or change their orientation.
  • This feature cuts down on workflow steps by allowing users to interactively work on something without having to compile their program and see the output.

Workflow for Editing or Creating a URDF

In this section, the speaker discusses the main workflow for using the transform editing feature and creating/editing a URDF file.

Previous Workflow

  • Previously, users would start in their CAD software and manually extract out offset and pose information for each camera or robot part.
  • They would then load it up into Studio and make adjustments as needed before going back to edit their file again.

New Workflow with Transform Editing Feature

  • With the new transform editing feature, users can visually adjust offsets and orientations within Studio itself.
  • This eliminates one step of having to go back and forth between editing files and loading them up in Studio.

Feedback from Users

In this section, the speaker encourages users to provide feedback on the new 3D panel features. They also mention that a lot of work went into getting set up for future extensions of these features.

Show-and-Tell Channel on Public Slack Organization

  • Users are encouraged to join their public Slack organization where they can post images or recordings of what they've been working on.
  • The community would love to see cool demos or hear about any issues users are having with the new 3D panel.

Future Extensions

  • The speaker mentions that this is just the beginning of shipping these features and that they're open to ideas for how to extend them.
  • They want to hear from users about what they would like to see next.

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.

Video description

Foxglove CEO Adrian Macneil talks about the Foxglove Studio app's new 3D panel with Foxglove engineers John Hurliman and Jacob Bandes-Storch. 👉 Read more at foxglove.dev/blog/announcing-the-new-3d-panel. Make sure to subscribe to the @Foxglove channel for more videos, or join the Foxglove Slack community at https://foxglove.dev/slack to share questions and feedback! ---------------------------------------------------------------------------------------------------- DROP US A LINE ☎️ Contact the Foxglove team at https://foxglove.dev/contact. - Adrian Macneil (@amacneil on GitHub, @adrianmacneil on Twitter) - John Hurliman (@jhurliman on GitHub / Twitter) - Jacob Bandes-Storch (@jtbandes on GitHub / Twitter) ---------------------------------------------------------------------------------------------------- MORE RESOURCES 📚 - Foxglove website: https://foxglove.dev - Foxglove Studio docs: https://foxglove.dev/docs/studio - Introducing Webviz and Worldview: https://www.youtube.com/watch?v=_3_Bb-dlq0Q - Foxglove Studio vs. Webviz: https://foxglove.dev/blog/foxglove-studio-vs-webviz - Worldview library: https://webviz.io/worldview/ - Three.js library: https://threejs.org - Supported SceneEntity types in the new 3D panel: https://foxglove.dev/docs/studio/messages/scene-entity - Camera images in the new 3D panel: https://github.com/foxglove/studio/pull/3453 - TF editing: https://github.com/foxglove/studio/issues/3479