[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112905":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":13,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":28,"discoverSource":29},112905,"NEXUS","Gamma-Robot\u002FNEXUS","Gamma-Robot","Official implementation of \"NEXUS: Perceptive Whole-Body Control for Terrain-Adaptive Teleoperation\".","https:\u002F\u002Fnexus-humanoid.github.io\u002F",null,"Python",75,7,0,2,8,16,52.31,"Other",false,"main",true,[],"2026-10-29 12:09:40","2026-11-23 11:24:50","\u003Ch1 align=\"center\">NEXUS: Perceptive Whole-Body Control\u003Cbr>for Terrain-Adaptive Teleoperation\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=wMMZpqYAAAAJ\">Xiangyu Miao\u003C\u002Fa>\u003Csup>1,2\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=RrZ_vZIAAAAJ\">Junsong Wu\u003C\u002Fa>\u003Csup>1,2\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=aVte5j4AAAAJ\">Jiyuan Shi\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Ey2NlGMAAAAJ\">Weiji Xie\u003C\u002Fa>\u003Csup>1,2\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=mJ7tn3MAAAAJ\">Jinrui Han\u003C\u002Fa>\u003Csup>3\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=w7dfT-gAAAAJ\">Xingyi Wang\u003C\u002Fa>\u003Csup>1,4\u003C\u002Fsup>\n  \u003Cbr>\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Qzss0GEAAAAJ\">Weinan Zhang\u003C\u002Fa>\u003Csup>2,†\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Rm_1y2kAAAAJ\">Chenjia Bai\u003C\u002Fa>\u003Csup>1,5,†\u003C\u002Fsup>,\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=ahUibskAAAAJ\">Xuelong Li\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Csup>1\u003C\u002Fsup>The Institute of Artificial Intelligence, China Telecom (TeleAI)\n  &nbsp; \u003Csup>2\u003C\u002Fsup>Shanghai Jiao Tong University\n  \u003Cbr>\n  \u003Csup>3\u003C\u002Fsup>The University of Hong Kong\n  &nbsp; \u003Csup>4\u003C\u002Fsup>Zhejiang University\n  &nbsp; \u003Csup>5\u003C\u002Fsup>γ-Robotics\n  \u003Cbr>\n  \u003Csup>†\u003C\u002Fsup>Corresponding authors\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fnexus-humanoid.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Website-467895?style=flat&amp;logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI%2BPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iOSIvPjxlbGxpcHNlIGN4PSIxMiIgY3k9IjEyIiByeD0iNCIgcnk9IjkiLz48cGF0aCBkPSJNMyAxMmgxOCIvPjwvc3ZnPg%3D%3D&amp;logoColor=white\" alt=\"Project website\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgamma-robot.github.io\u002FNEXUS\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-GitHub%20Pages-526C9B?style=flat&amp;logo=github&amp;logoColor=white\" alt=\"Documentation on GitHub Pages\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.39000\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2609.39000-B31B1B?style=flat&amp;logo=arxiv&amp;logoColor=white\" alt=\"Paper on arXiv\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fnexus-humanoid.github.io\u002F#video\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVideo-YouTube-C96632?style=flat&amp;logo=youtube&amp;logoColor=white\" alt=\"Watch the project video\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fnexus-humanoid.github.io\u002Fdemo\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-Interactive-497860?style=flat&amp;logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI%2BPHBhdGggZD0iTTUgM2wxNCA5LTcgMS0zIDd6Ii8%2BPC9zdmc%2B&amp;logoColor=white\" alt=\"Launch the interactive demo\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Overview\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fnexus-humanoid.github.io\u002F#method\">\n    \u003Cimg src=\"docs\u002F_static\u002Fmedia\u002Fmethod-overview.png\" width=\"100%\" alt=\"NEXUS method: contact-guided motion adaptation, teacher-student policy learning and robot-side perceptive control\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\nThis repository provides the official implementation of our paper, **[NEXUS: Perceptive Whole-Body Control for Terrain-Adaptive Teleoperation](https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.39000)**. NEXUS enables humanoid robots to follow whole-body teleoperation commands while using onboard perception to adapt their movements to the terrain.\n\n1. **Adapt motions to terrain.** Generate time-aligned terrain variants from robot motions using contact detection, pelvis adjustment, keyframe IK and trajectory reconstruction.\n2. **Train a privileged teacher.** PPO learns to track terrain-adapted references using privileged observations and terrain elevation.\n3. **Distill a perceptive student.** The student combines the paired flat-ground motion command, proprioceptive history and depth images to imitate the teacher.\n\nThe code also includes one-stage perceptive PPO and optional left–right symmetry augmentation and regularization. Human-to-robot retargeting supplies the input robot motions as an upstream step.\n\n## Release Status\n\n- [x] Standalone terrain motion adaptation package\n- [x] Policy training pipeline\n- [x] Pretrained model (G1, ONNX)\n- [x] Documentation\n- [ ] Deployment: sim-to-sim and sim-to-real\n\n## Repository Guide\n\n| Component | Location | Purpose |\n| --- | --- | --- |\n| Standalone motion adaptation | [`terrain_motion_adaptation\u002F`](terrain_motion_adaptation\u002F) | Terrain adaptation, batch processing, bundled G1\u002Fterrain examples and motion replay |\n| Data preparation | [`src\u002Fperceptive_bfm\u002Fscripts\u002Fdata_process\u002F`](src\u002Fperceptive_bfm\u002Fscripts\u002Fdata_process\u002F) | Training-terrain generation and grouped motion packing |\n| Tasks and configurations | [`src\u002Fperceptive_bfm\u002Ftasks\u002Fperceptive\u002F`](src\u002Fperceptive_bfm\u002Ftasks\u002Fperceptive\u002F) | Perceptive motion-tracking environments and training configurations |\n| RL algorithms | [`src\u002Fperceptive_bfm_rl\u002F`](src\u002Fperceptive_bfm_rl\u002F) | PPO and distillation implementations used by the training project |\n| Training and playback | [`src\u002Fperceptive_bfm\u002Fscripts\u002F`](src\u002Fperceptive_bfm\u002Fscripts\u002F) | Train, play and scene-export entry points |\n| Pretrained model | [`resources\u002Fg1\u002Fcheckpoints\u002F`](resources\u002Fg1\u002Fcheckpoints\u002F) | Perceptive behavior foundation model in ONNX format and inference configuration |\n| Example motions | [`resources\u002Fg1\u002Fmotions\u002Fpyramid\u002F`](resources\u002Fg1\u002Fmotions\u002Fpyramid\u002F) | Walking, crawling with a back handspring, and backward roll, paired across flat ground and four terrains |\n\nThe root project installs `perceptive_bfm` and `perceptive_bfm_rl` together. `terrain_motion_adaptation` can also be installed separately for offline data generation.\n\nSee the [documentation](https:\u002F\u002Fgamma-robot.github.io\u002FNEXUS\u002F) for installation, data preparation, training, playback and illustrated reference guides.\n\n## Pretrained Perceptive Behavior Foundation Model\n\nWe provide a [pretrained perceptive behavior foundation model](resources\u002Fg1\u002Fcheckpoints\u002Fpolicy.onnx)\nfor Unitree G1 in ONNX format. The model combines motion references,\nproprioceptive history, and depth observations for terrain-adaptive whole-body\ncontrol. See the\n[model documentation](resources\u002Fg1\u002Fcheckpoints\u002FREADME.md) for its interface and inference\nconfiguration.\n\n## Installation Guide\n\n### 1. Install uv\n\nInstall [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F) with the official installer:\n\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\nRestart your terminal after installation so `uv` is available in your shell.\n\n### 2. Install the project\n\nClone this repository, enter its root directory, and run:\n\n```bash\nuv sync --locked\n```\n\nThis creates `.venv` and installs the project and its dependencies. The Python version is selected from `.python-version`. GPU training uses the CUDA 12.8 PyTorch wheels configured in this repository and requires a compatible NVIDIA driver.\n\nUse `uv run` to run commands in this environment.\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Motion adaptation only\u003C\u002Fb>\u003C\u002Fsummary>\n\nFor offline motion adaptation without the training dependencies, install from the standalone package directory instead:\n\n```bash\ncd terrain_motion_adaptation\nuv sync --locked\n```\n\nInclude the visualization extra for browser-based motion replay:\n\n```bash\nuv sync --locked --extra visualization\n```\n\nSee the [standalone package guide](terrain_motion_adaptation\u002FREADME.md) for usage.\n\n\u003C\u002Fdetails>\n\n## Workflow\n\n| **1. Data preparation** | **2. Policy learning** | **3. Export & playback** |\n| :--- | :--- | :--- |\n| Retargeted flat-ground motions → terrain adaptation → grouped dataset packing | Privileged teacher PPO → perceptive student distillation | JIT\u002FONNX export and MuJoCo\u002FViser playback |\n| **Output:** paired motion dataset | **Output:** trained perceptive policy | **Output:** exported models and simulation playback |\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Motion data at a glance\u003C\u002Fb>\u003C\u002Fsummary>\n\nEach terrain group has a `manifest.json` describing the joint order. Each clip is stored as `\u003Crelative-clip-path>\u002Fmotion.npz`, written with `np.savez`:\n\n| Field | Contents |\n| --- | --- |\n| `qpos` | float32 `(T, 7 + J)`: root XYZ, root quaternion **wxyz**, then scalar joint positions |\n| `fps` | A finite positive scalar giving the clip's sampling rate |\n\nCoordinates are right-handed with Z up; lengths use meters and angles use radians. The manifest's `joint_names` gives the joint-column order. Matching relative clip paths identify corresponding motions across terrain groups.\n\nThe exchange format allows per-clip FPS. A training pack requires one common FPS and frame-aligned terrain pairs. Packing validates the rate and does not resample. Body poses and velocities are reconstructed at runtime.\n\n\u003C\u002Fdetails>\n\n## Usage\n\nRun the following commands from the repository root after installation. These examples use Unitree G1 and 50 FPS motions. Prepare your own retargeted robot motions; human-to-robot retargeting is an upstream step.\n\nThe [bundled G1 motion examples](resources\u002Fg1\u002Fmotions\u002Fpyramid\u002F) show terrain\noptimization results, ready to replay without running the optimization pipeline.\n\n### 1. Prepare flat-ground motions\n\nStore input motions in the format described above:\n\n```text\ndatasets\u002Fg1\u002Fflat\u002F\n├── manifest.json\n└── walk\u002F\n    └── motion.npz\n```\n\nThe manifest must contain `version: 1` and `joint_names` listing the scalar joints in the same order as the joint columns of `qpos`. Each NPZ must contain `qpos` and `fps`.\n\n### 2. Adapt motions to terrain\n\nGenerate the four non-flat PyramidTerrain variants:\n\n```bash\nuv run python -m perceptive_bfm.scripts.data_process.adapt_motions \\\n  --input-dir datasets\u002Fg1\u002Fflat --base-dir datasets\u002Fg1\u002Fflat \\\n  --output-dir datasets\u002Fg1\u002Fpyramid --num-workers 32\n```\n\nCPU processing examples use 32 workers. Reduce this to fit the CPU quota and\nmemory available to your job or container, rather than the host CPU count.\n\nThe default light preflight checks shared paths and schemas at startup, then\nvalidates individual clips in workers. Use `--preflight full` for the earlier\nstartup metadata and existing-output checks.\n\nThis writes `\u003Cterrain>_lv0\u002F\u003Cclip>\u002Fmotion.npz` under the output directory. Check the generation summary for skipped or failed clips. Keep the original flat motions as a paired group by creating this link once:\n\n```bash\nln -s ..\u002Fflat datasets\u002Fg1\u002Fpyramid\u002Fflat\n```\n\nInspect the generated motions before packing:\n\n```bash\nuv run python -m perceptive_bfm.scripts.data_process.visualize_motions \\\n  --input-dir datasets\u002Fg1\u002Fpyramid\n```\n\nOpen the URL printed by Viser. Select terrain groups and motions, then use pause, slow playback and frame scrubbing to inspect contact, foot sliding, penetration and motion continuity. This viewer replays reference poses without a policy checkpoint.\n\n### 3. Pack the training dataset\n\n```bash\nuv run python -m perceptive_bfm.scripts.data_process.pack_motions \\\n  --input-dir datasets\u002Fg1\u002Fpyramid --output-dir dataset\u002Fg1\u002Fpyramid \\\n  --target-fps 50 --num-workers 32\n```\n\nRaw NPZ motions live under `datasets\u002F`; packed training data live under `dataset\u002F`. Packing checks the common FPS and frame counts of available terrain\u002Fflat pairs. `--target-fps` asserts the rate and does not resample motions. Training and play commands below take the packed group root, `dataset\u002Fg1\u002Fpyramid`.\n\n### 4. Train the teacher\n\nThe training examples use four GPUs (`--gpu-ids 0 1 2 3`) with 16,384\nenvironments per GPU (65,536 total). For a single GPU, use `--gpu-ids 0`.\nAdjust `--env.scene.num-envs` to fit your available GPU memory.\n\n```bash\nuv run python -m perceptive_bfm.scripts.train \\\n  Perceptive-PyramidTerrain-Unitree-G1-Teacher-Symmetry \\\n  --env.scene.num-envs 16384 \\\n  --env.commands.motion.motion-file dataset\u002Fg1\u002Fpyramid \\\n  --agent.run-name teacher --agent.logger tensorboard --gpu-ids 0 1 2 3\n```\n\nRuns and checkpoints are saved under `logs\u002Frsl_rl\u002Fg1_perceptive\u002F\u003Ctimestamp>_teacher\u002F`. The teacher uses privileged observations and terrain elevation.\n\n### 5. Distill the student\n\nUse a trained teacher checkpoint from step 4. Replace `\u003Cteacher_run>` with its directory name under `logs\u002Frsl_rl\u002Fg1_perceptive\u002F`, and `\u003Citeration>` with the checkpoint iteration:\n\n```bash\nuv run python -m perceptive_bfm.scripts.train \\\n  Perceptive-PyramidTerrain-Unitree-G1-BC-Symmetry \\\n  --env.scene.num-envs 16384 \\\n  --env.commands.motion.motion-file dataset\u002Fg1\u002Fpyramid \\\n  --agent.load-run \"\u003Cteacher_run>\" \\\n  --agent.load-checkpoint \"model_\u003Citeration>.pt\" \\\n  --agent.run-name student --agent.logger tensorboard --gpu-ids 0 1 2 3\n```\n\nThe student learns from the teacher using flat-ground motion commands, proprioceptive history and depth images. Student checkpoints are saved under `logs\u002Frsl_rl\u002Fg1_perceptive\u002F\u003Ctimestamp>_student\u002F`.\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>One-stage perceptive PPO\u003C\u002Fb>\u003C\u002Fsummary>\n\nTo train the perceptive policy directly with PPO:\n\n```bash\nuv run python -m perceptive_bfm.scripts.train \\\n  Perceptive-PyramidTerrain-Unitree-G1-Symmetry \\\n  --env.scene.num-envs 16384 \\\n  --env.commands.motion.motion-file dataset\u002Fg1\u002Fpyramid \\\n  --agent.run-name ppo --agent.logger tensorboard --gpu-ids 0 1 2 3\n```\n\n\u003C\u002Fdetails>\n\nThe examples enable left–right symmetry: mirror loss for PPO and augmented teacher supervision for distillation. See the [illustrated symmetry guide](docs\u002Freference\u002Fsymmetry.md). Remove `-Symmetry` from each task ID to use the corresponding configuration without it.\n\n### 6. Play a trained policy\n\nReplace `\u003Cstudent_run>` and `\u003Citeration>` with the student run and checkpoint to replay:\n\n```bash\nuv run python -m perceptive_bfm.scripts.play \\\n  Perceptive-PyramidTerrain-Unitree-G1-BC-Symmetry \\\n  --motion-file dataset\u002Fg1\u002Fpyramid \\\n  --checkpoint-file \"logs\u002Frsl_rl\u002Fg1_perceptive\u002F\u003Cstudent_run>\u002Fmodel_\u003Citeration>.pt\" \\\n  --num-envs 1 --viewer viser\n```\n\nOpen the viewer URL to watch the simulated robot track its motion reference. To play a teacher or one-stage PPO checkpoint, use its matching task ID and checkpoint path. Use `--viewer native` for a desktop MuJoCo window. Pass a task ID before `--help` to inspect training or play options.\n\n## Citation\n\nIf you find NEXUS useful in your research, please consider citing:\n\n```bibtex\n@misc{miao2026nexus,\n  title = {{NEXUS}: Perceptive Whole-Body Control for Terrain-Adaptive Teleoperation},\n  author = {Xiangyu Miao and Junsong Wu and Jiyuan Shi and Weiji Xie and Jinrui Han and Xingyi Wang and Weinan Zhang and Chenjia Bai and Xuelong Li},\n  year = {2026},\n  eprint = {2609.39000},\n  archivePrefix = {arXiv},\n  primaryClass = {cs.RO},\n  doi = {10.48550\u002FarXiv.2609.39000},\n  url = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.39000}\n}\n```\n\n## Acknowledgments\n\nWe thank the authors of [BeyondMimic](https:\u002F\u002Fbeyondmimic.github.io\u002F), [SONIC](https:\u002F\u002Fnvlabs.github.io\u002FSONIC\u002F), and [HEFT](https:\u002F\u002Fheft.axell.top\u002F) for their inspiring work. Our implementation builds on [mjlab](https:\u002F\u002Fgithub.com\u002Fmujocolab\u002Fmjlab), [RSL-RL](https:\u002F\u002Fgithub.com\u002Fleggedrobotics\u002Frsl_rl), and [InstinctMJ](https:\u002F\u002Fgithub.com\u002Fproject-instinct\u002FInstinctMJ), and we thank their authors and contributors for sharing these tools with the community.\n\n## License\n\nOriginal NEXUS contributions are licensed under [Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)](LICENSE). Non-commercial sharing and adaptation are permitted subject to the license's attribution and other conditions. Uses outside the license require separate permission.\n\nThird-party code and robot assets retain their own terms. In particular, the RSL-RL-derived PPO and distillation modules retain BSD-3-Clause. See [third-party notices](THIRD_PARTY_NOTICES.md).\n\n## Contact\n\nWe welcome questions, feedback, and opportunities for collaboration. Feel free to reach out:\n\n- **Xiangyu Miao**: [thedarkknight@sjtu.edu.cn](mailto:thedarkknight@sjtu.edu.cn) · [WeChat](https:\u002F\u002Fnexus-humanoid.github.io\u002Fstatic\u002Fimages\u002Fwechat-qr.jpg)\n- **Junsong Wu**: [jason-w@sjtu.edu.cn](mailto:jason-w@sjtu.edu.cn) · [WeChat](docs\u002F_static\u002Fmedia\u002Fjunsong-wu-wechat.png)\n- **Chenjia Bai** (Corresponding author): [baicj@chinatelecom.cn](mailto:baicj@chinatelecom.cn)\n","NEXUS 是一个面向复杂地形自适应遥操作的具身智能控制框架，实现人形机器人全身体感闭环控制。其核心功能包括多模态环境感知（深度相机+IMU融合）、基于模型预测控制（MPC）的实时全身运动规划、地形自适应步态生成与力觉反馈驱动的遥操作接口；技术特点涵盖端到端感知-决策-执行链路、轻量级Python实现、支持真实机器人部署与仿真验证。适用于野外搜救、电力巡检、灾后勘察等非结构化场景下的远程机器人作业。","2026-11-24 04:44:33","CREATED_QUERY"]