Skip to content
Semillero
ARES
← All projects
Ongoing

360° camera for Webots

A camera and controller that record 360° video (equirectangular, up to 8K) of any Webots simulation for viewing in virtual reality headsets.

cam360 records 360° video of any Webots simulation, up to 8K, without slowing the simulation down much.

  • No stitching in Python: Webots renders the full panorama on the GPU.
  • Hardware encoding: ffmpeg encodes the video on the NVIDIA GPU (NVENC) in a separate process. Without an NVIDIA GPU it falls back to the CPU.
  • No dependencies: the controller only uses the Python standard library.
  • Correct duration: the video always lasts as long as the simulated time, even if the simulation runs slower or faster than real time.

Contents

cam360/
├── protos/cam360.proto              the 360 camera (a Robot node with a Camera)
├── controllers/cam360/cam360.py     controller that records the video
└── worlds/cam360.wbt                example world

Requirements

  • Webots R2025a or later.
  • Python 3.8 or later.
  • ffmpeg on the PATH (on Windows: winget install Gyan.FFmpeg).
  • Recommended: an NVIDIA GPU with NVENC.

Quick test

  1. Open worlds/cam360.wbt in Webots.
  2. Run the simulation. The console shows something like [cam360] 8192x4096 @ 15.62 fps, hevc_nvenc -> ....
  3. Reset the simulation or close Webots to finish recording.

The video is saved in controllers/cam360/. The repository explains how to add the camera to your own world.

Translated from Spanish.