Use Radar in WiTwin Studio
Install the Radar Plugin in WiTwin Studio, place a radar in a Scene, simulate animated targets, replay range-Doppler and micro-Doppler, and export the Result.
The Radar Plugin (wt_radar, Plugin id witwin.radar) runs Radar inside WiTwin Studio. It reads the open Scene, samples animated skinned targets, asks Channel for paths, synthesizes FMCW data with Radar, and shows the Result in Studio. Use it when you want to set up a radar measurement on a furnished room and an animated person without writing the simulation code yourself.
Requirements#
- WiTwin Studio with a Project open.
- An NVIDIA GPU with CUDA. Solving runs Radar on the GPU; see Installation for the supported PyTorch and CUDA versions.
- The Plugin's solver dependencies:
witwin-radar>=0.4,<0.5andwitwin-channel>=0.5,<0.6. They are the Plugin'ssolveextra.
Install the Plugin#
WiTwin Plugins do not come from PyPI. Install the Radar Plugin into the Project in one of these ways:
- In Studio, open the Plugins page and add Radar.
- From the Project folder, add it from GitHub with the
witwincommand line:
witwin add git+https://github.com/witwin-ai/wt_radar- From a local checkout of the Plugin:
witwin add ../wt_radarThe Plugin checks at startup that compatible witwin-radar and witwin-channel versions are installed. An absent or incompatible package fails before any GPU work.
Tip
The Plugin also adds a Radar Sim Project template: a 77 GHz FMCW radar looking at one box target. Start from it to try the Plugin without building a Scene.
Simulate an animated target#
Prepare the Scene
Open a Scene that contains one or more skinned targets (for example an SMPL human) with baked motion timelines, ideally in a furnished room.
Add the radar
Add Library -> Radar -> Radar Settings to the Scene. The object's Transform is the sensor pose, and its local
-Zaxis is the radar's forward direction, the same convention aswitwin.radar.Choose the targets
Let the Agent configure the target list, or set Snapshot Target ID to measure one target.
Set the time window
Set Measurement start time, Animation duration and Animation FPS. The window must fit inside the baked timeline, and duration times FPS must be a whole number. The limits are 30 s, 30 FPS and 1536 MiB of raw result data.
Simulate
Click Simulate & Prepare Replay. The Plugin runs one native GPU measurement per requested frame and prepares the replay.
Inspect and export
View the Range Profile, Range Spectrum or Range-Doppler of any frame. Changing the result frame does not move the editor timeline. Click Export Animation Result to write a
.npzfile intoresults/radar-animation/in the Project. Exports never overwrite an existing file.
Run Static Snapshot (1 frame) is a separate one-frame diagnostic. The Radar (Demo) Library prefab selects its box target for it automatically.
What the Plugin models#
The multi-frame Result adds two coherent parts:
- Target returns from fixed sites on the skinned target's surface. A site is kept only if Channel finds inbound and outbound paths for it in every requested frame; missing paths fail the preflight instead of being filled with zeros.
- Static room background: one-bounce paths radar to wall, floor or furniture and back.
Defaults and options:
| Setting | Default | Meaning |
|---|---|---|
| Target paths | Line of sight | Target Multipath turns on wall-to-target and target-to-wall paths. It is off by default because it is expensive |
| Intra-frame motion | Every chirp (Motion.chirp()) | Adaptive (Motion.adaptive()) is available for comparison |
| Human Target Site Budget | 720 | Surface sites on a typed SMPL human |
| Animal Target Site Budget | 360 | Surface sites on a registered animal |
| Target Site Budget | Fallback for untyped skinned targets. A per-target site_budget wins over all three |
The total target cross section stays constant whatever the budget. Budgets up to 64 use prioritized bone anchors; larger budgets cover the whole surface deterministically.
The Plugin does not model diffuse clutter, calibrated animal cross sections, target self-occlusion, or room paths with more than one bounce. Path topology is rediscovered at each Studio frame boundary.
Replay a saved recording#
Open Load Saved Recording and load an exported .npz to review it without rerunning the solver. The Radar Replay figure plays every frame (All Frames, on by default) with a play button and frame scrubber. Result Display also offers:
- Micro-Doppler: time against closing velocity, summed over range.
- Range-Time: time against range, summed over Doppler.
- Motion Energy: normalized energy outside the zero-Doppler bin.
Heatmaps show amplitude in dB relative to the recording's peak.
The exported Result#
An animation export contains the complex Radar cube, its physical axes, timestamps, the sampled target positions and velocities, the active site IDs, topology evidence, environment-reflection statistics, package versions and an input fingerprint. Load it with NumPy:
import numpy as np
with np.load("results/radar-animation/<name>.npz", allow_pickle=False) as data:
print(sorted(data.files))The replay uses the same witwin.radar.processing functions described in Signal processing chain, so you can reprocess the cube with your own pipeline.
Use the Project from Python#
A Studio Project is also a Python project. The Radar Sim template includes scripts/prepare_radar.py, which checks the solver setup and prints it:
witwin check
witwin run scripts/prepare_radar.pywitwin open opens the Project in Studio.