如何使用 NVIDIA Warp 與 MjWarp 加速機器人模擬與學習工作流程

2026年9月23日 18:41
站內 AI 整理稿

Back to Articles How to Use NVIDIA Warp and MjWarp to Accelerate Robotics Simulation and Learning Workflows Enterprise + Article Published September 23, 2026 Upvote - Johnny Nuñez Cano johnnynv Follow nvidia Asier Arranz asiernvidia Follow nvidia Rishabh Chadha rchadha-nv Follow nvidia Ben Oliveri BenOliveri Follow nvidia Classic MuJoCo provides fast CPU-based robot simulation for developing, testing, and controlling robots and it can parallelize sampling across CPU cores.

But as learning workloads grow, the question shifts from how quickly one world can run to how many worlds can run at once.GPU acceleration makes it possible to advance those worlds in large batches while keeping simulation and learning data close to the device.

MuJoCo Warp (MJWarp), built on NVIDIA Warp, takes compatible MuJoCo models into that GPU-scale regime.

In this article, we will move an SO-101 follower arm from a familiar MuJoCo workflow to as many as 2,048 parallel MJWarp environments and examine the technology and validation steps that make the transition possible.Figure 1.How MJWarp connects Python to GPU simulation.

MuJoCo loads and compiles the MJCF model; MJWarp implements the physics in NVIDIA Warp, which compiles CUDA kernels to advance simulation states on NVIDIA GPUs.This is the second article in our State of Simulation for Physical AI series.The first article mapped the robot-simulation landscape.

Here, we prepare and scale the simulation environment; we do not train a policy.The later Newton and Isaac Lab installments cover the next integration layers.

Putting it together Layer Role in the stack NVIDIA Warp Python kernel language: single instruction, multiple threads (SIMT), autodiff, PyTorch/JAX interop MJWarp MuJoCo physics on Warp: same MJCF, batched GPU throughput Your scene (SO-101) Familiar Menagerie / Robot Studio assets + task geometry Next (Newton / Isaac Lab) Multi-solver API, USD, sensors, managers, training loops Decision shortcut: If you need… Reach for… Single-robot MPC / teleop MuJoCo CPU Max throughput on raw MuJoCo physics MJWarp (or mjlab) JAX training recipes MuJoCo Playground / MJX (impl='warp') Multi-solver + Isaac Lab integration Newton — next post in this series Start with one useful Warp Kernel NVIDIA Warp is a Python framework for writing high-performance, GPU-accelerated kernels.

Warp lets developers author statically typed kernels in Python and compiles them for CPU or CUDA execution.The first launch builds and caches a native module; later launches reuse it.

The kernel language is a performance-oriented subset of Python, while ordinary Python remains responsible for configuration, allocation, and launch orchestration.This small robotics-oriented kernel advances point positions under gravity.

One logical thread handles one point, so the same code scales from two points to millions without introducing GPU terminology into the control flow.

The three value propositions of Warp are: Pillar What you get Performance Native-CUDA speed via JIT compilation, kernel fusion, and CUDA Graphs Ease of use Pure Python authoring with built-in vectors, matrices, quaternions, BVHs, hash grids, sparse matrices, and tile primitives Capability Differentiable kernels and DLPack-style interop so simulation can sit inside an ML training loop import numpy as np import warp as wp @wp.

kernel def integrate( positions: wp.array[wp.vec3], velocities: wp.array[wp.vec3], dt: float, ): i = wp.tid() velocities[i] += wp.vec3(0.0, 0.0, -9.81) dt positions[i] += velocities[i] dt wp.init() device = "cuda:0" if wp.iscudaavailable() else "cpu" start = np.array([[0.0, 0.0, 0.5], [0.2, 0.0, 0.

5]], dtype=np.float32) positions = wp.array(start, dtype=wp.vec3, device=device) velocities = wp.zeroslike(positions) wp.launch( integrate, dim=len(start), inputs=[positions, velocities, 0.01], device=device, ) wp.synchronizedevice(device) print(positions.

numpy()) Three properties make this useful in robotics: Explicit parallel work.wp.tid() identifies the point, contact, body, or world owned by the current logical thread.Explicit device arrays.An array lives on the selected device.Calling .

numpy() on a CUDA array synchronizes and copies it to CPU memory; it is not a zero-copy path.For a device-resident PyTorch or JAX pipeline, use Warp’s framework adapters or DLPack-compatible sharing instead.Composable kernel launches.

A program can launch a sequence of focused kernels and capture supported CUDA work into a graph to reduce repeated dispatch overhead.Graph capture replays launches against existing buffers; it does not fuse arbitrary kernels.Differentiability and Determinism.

Two further Warp capabilities are worth knowing, even though neither is used in the SO-101 workflow in this article.Warp kernels are differentiable: a wp.

Tape records the forward kernel launches made inside its context and replays their adjoints in reverse when backward() is called, which is why teams build differentiable geometry, CFD, and custom physics in Warp, including CAE workflows for simulation and design optimization.

Warp also supports deterministic execution, introduced in Warp 1.

15: GPU atomics are scheduler-dependent by default, so repeated launches of the same kernel can differ slightly, and the opt-in deterministic modes trade some performance for reproducible ordering in simulation, validation, and regression tests.

These are Warp capabilities, not guarantees of differentiability or determinism for an entire MJWarp rollout.See the Warp documentation on differentiability and deterministic execution for the details.Try Warp: pip install warp-lang (≥ 1.15 for GPU determinism), then python -m warp.examples.

browse, or the tutorial notebooks.What is MuJoCo Warp (MJWarp)?A robot simulator repeatedly computes what happens next: given the current joint positions, velocities, controls, and contacts, it advances the scene by one small timestep.

In this article, a world means one independent copy of that scene and its state.One world might contain the SO-101 arm reaching for a cube; another can contain the same arm starting from a slightly different pose.

MuJoCo and MJWarp can run the same compatible robot and task, but they organize the work differently.MuJoCo naturally suits developing and inspecting one or a few CPU worlds.

MJWarp is a NVIDIA Warp implementation of MuJoCo’s physics pipeline that places the model and a batch of independent states on NVIDIA GPUs; one call to mjw.step advances the entire batch.MJWarp’s value is not necessarily a faster step for one world.

It is the ability to advance hundreds or thousands together, giving the GPU enough parallel work to improve aggregate throughput, the total world-steps completed per second.

That favors reinforcement learning and large-scale sampling, where collecting experience matters more than minimizing one environment’s latency.This blog covers the following: validate one MuJoCo world, move it to MJWarp, form a batch, verify it, and measure it correctly.

Solver tuning, Jacobian representation, and specialized multi-GPU or determinism topics are not required for this migration and can be covered separately.Then, the distinction is precise: Latency is wall-clock time for one simulation step.

Aggregate throughput is the total number of world-steps completed per measured wall-clock second.Basic usage: structs, batch sizes, and a minimal step The core API transition is small: MuJoCo host workflow MJWarp workflow mujoco.MjModel mjw.putmodel(mjm) creates a device model mujoco.MjData mjw.

putdata(mjm, mjd, ...) preserves and batches an existing state mujoco.mjstep(mjm, mjd) mjw.step(m, d) advances every world in d Host arrays such as mjd.ctrl Batched device arrays such as d.ctrl with shape (nworld, nu) Use mjw.makedata() when default/fresh state is intended.Use mjw.

putdata() when the exact initialized MuJoCo state must cross the migration boundary.

Allocating batched resources requires defining the following parameters (refer to Batch sizes): Parameter Meaning nworld Total number of parallel environments nconmax Expected contacts per individual world (overall capacity ≈ nconmax * nworld) naconmax Alternative setting: global maximum contacts across all environments combined (takes precedence if both are defined) njmax Hard upper limit on constraints per world Performance tuning 1.

CUDA graph capture:mjw.step is many kernel launches; capture once, replay often: with wp.ScopedCapture() as capture: mjw.step(m, d) wp.capturelaunch(capture.graph) 2.Size nconmax / naconmax / njmax tightly: memory and work scale with them.

Tune with mjwarp-testspeed: --measurealloc and watch overflows in mjwarp-viewer.Additional tuning considerations.After sizing contact and constraint buffers, test solver iteration limits without changing task behavior.

Meshes and CCD settings can increase memory use; nccdmax / naccdmax can reduce CCD buffer allocation when the measured contact counts allow it.MJWarp’s compact solver uses MuJoCo’s Newton constraint solver and sleeping, not the separate Newton physics-engine framework.

Compact-solver and multi-GPU configuration are beyond this walkthrough; consult the MJWarp performance-tuning documentation.

To train policies on MJWarp physics: Isaac Lab via Newton mjlab (manager API directly on MJWarp + PyTorch) MuJoCo Playground via MJX (impl='warp') Install / try: pip install mujoco-warp · mjwarp-viewer path/to/scene.

xml · Colab tutorial Workflow to migrate a MuJoCo scene to MjWarp Establish a MuJoCo CPU baseline The scene.Nothing here is MJWarp-specific yet: an SO-101 arm, a table, and two cubes to stack, written as ordinary MJCF.Figure 2.SO-101 pick-and-place scene, rendered from the MuJoCo CPU simulation.

The task is to grasp the red 44 mm cube and stack it on the blue cube; the same robot and scene are used for MJWarp validation.For an MJCF box, the size values are half-extents: size=”0.022 …” defines a cube with 44 mm edges.The task uses this size for its success thresholds.

The arm base is at the origin, its reach is along +X, and the cubes are arranged along Y.In the companion repository this file is generated rather than hand-written: resolvepickplacescene() copies the Menagerie arm into .

generated/, fills the table and cube coordinates from a robot profile, and writes scenepickplace.xml.The walkthrough uses the SO-101 profile; the optional reBot variant is described below.Loading it.Compilation and stepping are ordinary MuJoCo: import mujoco mjm = mujoco.MjModel.

fromxmlpath("scenepickplace.xml") mjd = mujoco.MjData(mjm) fps = 50 # controller rate simsubsteps = 10 # physics steps per control frame framedt = 1.0 / fps mjm.opt.

timestep = framedt / simsubsteps controller = PickPlaceController(spec=spec) # waypoints + damped-least-squares IK for in range(600): # 600 control frames ctrl = controller.step(mjm, mjd, framedt) for in range(simsubsteps): mjd.ctrl[: mjm.nu] = ctrl mujoco.

mjstep(mjm, mjd) Keep that shape in mind: compute controls once per frame, step physics simsubsteps times.Gate 2 changes only the inner loop, which is what makes the migration easy to review.Match the simulation and control rates.At 50 control frames per second and 10 p

Related

相關文章

AIBaseAI Agent

用 AI 做 PPT 被開除,公司反賠 4.6 萬:法院判了

2024 年 7 月,某保險公司員工吳女士為提效,把自行整理的公司稽核問題數據表上傳到第三方 AI 平臺,借 AI 輔助做 PPT。耐人尋味的是,此前她的部門與直屬領導曾多次推薦這類工具,認為能明顯提升效率。可一個月後,公司卻以"嚴重違反信息安全規定"為由將她解僱,吳女士隨即把公司告上法庭。

1 天前8400
AIBaseAI Agent

Perplexity發佈全新「隊友」功能:以 AI 代理程式管理持續性專案

繼2025年7月於 Comet 瀏覽器 推出助理及 Perplexity Computer 之後,「隊友」建構於 Computer 的多模型與精準度基礎之上,能夠在行銷、銷售、客戶支援與營運等業務線中主動監控專案、跨工具與團隊協調、處理後續跟進,並在多次執行之間記住專案目標與共用檔案。

1 天前6600
智東西AI Agent

能和Muse打視頻電話了!網友整活,自建動態虛擬形象、讓AI角色扮演

作者 | 孫小雯 編輯 | 程茜 11月6日消息,今日凌晨,Meta開始向美國用戶開放個人AI智能體Muse的實時語音和動態虛擬形象功能,用戶可以為Muse自建動態虛擬形象,並與其直接對話。該形象會隨對話改變表情和動作,就像在打“視頻電話”。 此次更新適用場景玩法多樣:用戶可以在模擬面試、做飯、規劃旅行等場景中使用Muse,通過實時對話討論想法、交代任務。交流過程中,用戶還可以隨時打斷、補充要求。

1 天前
智東西AI Agent

英特爾參展第九屆進博會,展示高能效計算成果,助力智能體時代綠色發展

智東西 作者 | ZeR0 編輯 | 漠影 智東西11月5日報道,今日,第九屆中國國際進口博覽會在上海開幕。英特爾聯手生態夥伴在技術裝備展區展示覆蓋數據中心、網絡邊緣及智能終端的計算產品、綠電儲能算力一體化方案、詞元一體機以及智能體PC與遊戲終端等,展現英特爾與夥伴在推動智能應用落地、探索綠色算力建設方面的合作成果。 “智能體時代,計算能力的進步需要與產業需求、能源效率和商業可持續性相結合,才能轉化為持久的生產力。進博會不僅是展示新技術、新應用的窗口,更是連接不同市場需求、深化長期合作的重要平臺。”英特爾中國區董事長王稚聰談道,“英特爾將發揮全球產品與開放平臺優勢,深化與中國產業夥伴的協作,推動全球技術更好地服務本地應用,也讓立足本地需求的定製化創新產品惠及中國及全球市場。” 11月6日上午,英特爾副總裁柯安平(Sarah Kemp)將應邀出席第九屆虹橋國際經濟論壇“變局中的企業力量:構建更可持續的產業夥伴關係”分論壇,與各方探討產業夥伴關係的長期價值。 一、展示面向多元需求的計算產品,加速智能體時代端邊雲協同 隨著智能體應用對系統協同和邏輯調度提出更高要求,CPU的關鍵作用進一步強化,端邊雲深度協同亦成為降本增效的核心路徑。圍繞這一趨勢,英特爾展現了從底層芯片到系統部署的多層次計算能力。 依託核心的Intel 18A先進製程與封裝能力,英特爾將先進工藝轉化為面向多元需求的計算產品。 其展臺集中展示第三代英特爾酷睿Ultra處理器、英特爾至強6+處理器及新一代網絡與邊緣(NEX)產品的全棧計算矩陣,覆蓋客戶端、邊緣與數據中心的多樣應用需求,為端邊雲協同提供高能效基礎。 第三代英特爾酷睿Ultra處理器(代號Panther Lake)是首款基於Intel 18A製程節點打造的計算平臺,面向筆記本電腦、遊戲掌機、機器人及工業邊緣設備等多種形態。該產品於2026年1月正式推出。

2 天前
雷峰網AI Agent

累計發貨量突破100萬臺!鴻蒙電腦厚積薄發,持續拓展桌面應用生態

全球桌面操作系統市場格局已固化數十年。面對極高的生態壁壘,傳統替代型系統往往困於“特定場景可用、大眾市場難推”的瓶頸,難以實現規模化商業閉環。在11月5日啟幕的2026鴻蒙辦公產業峰會上,一個數字非常亮眼,截至2026年10月,鴻蒙電腦累計發貨量突破100萬臺。華為終端BG平板與PC產品線總裁朱懂東表示:鴻蒙電腦2026年加速增長,單年發貨量有望突破100萬臺,展現出蓬勃之勢。他還正式宣佈:“鴻蒙電腦全面向開發者開放側載能力。

2 天前
智東西AI Agent

阿里發佈AI向善報告2026:數據中心算力密度兩年增近5倍,綠電佔比73.6%

智東西 作者 | 楊京麗 編輯 | 李水青 智東西11月5日報道,今日,阿里巴巴發佈《阿里巴巴AI向善行動報告2026》。報告圍繞“全棧AI,協同向善”展開,提出AI發展需要同時滿足“社會可接受、環境可承載、經濟可持續”三個條件。 報告中的AI向善行動覆蓋健康、教育、科研、綠色發展、經濟機會、安全包容社區六大領域,包括26個應用案例。 在發佈會現場,阿里巴巴還圍繞AI數據中心的可持續發展進行分享,介紹了多癌早篩和循證醫學輔助等醫療AI實踐。其中,癌症篩查模型已從單一癌症,擴展到多癌篩查,進一步推進到通用影像診斷。氫離子醫學AI助手則將醫學文獻、臨床指南和證據分級體系納入模型分析流程。 報告強調,在AI技術快速發展的同時,還應當回答AI如何真正服務社會、服務普通人的問題。 一、AI發展要跨過社會、環境和經濟三道邊界 今年是阿里巴巴連續第二年發佈AI向善行動報告。阿里巴巴集團ESG戰略負責人劉偉稱,隨著AI從實驗室走向千行百業,社會關注點也從模型能力和算力規模,轉向技術能為普通人帶來什麼,以及哪些事情值得用AI去做。 劉偉認為,在AI智能體時代,AI發展需要處在一個“安全運行空間”內,應滿足社會可接受、環境可承載和經濟可持續三個條件。社會可接受,意味著技術要服務人的福祉;環境可承載,要求關注能源、水資源和碳排放;經濟可持續,則要讓技術投入轉化為長期的社會和產業價值。 阿里雲智能集團全球數據中心總經理王朝陽稱,隨著AI算力需求增長,行業人才需求快速擴大。 在社會可接受方面,阿里雲正在推進人才標準、培訓材料和考核機制標準化。過去一年,阿里雲團隊吸納的人才中,超過70%來自傳統行業之外,包括製造、能源等行業。 在環境承載方面,阿里雲數據中心算力密度已從兩年前約0.8kW/㎡提升至4.5kW/㎡,預計到2027年3月底達到9kW/㎡。過去一年,阿里雲自建數據中心清潔電力佔比已達到73.

2 天前