[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-isaac-sim--IsaacGymEnvs":3,"tool-isaac-sim--IsaacGymEnvs":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":80,"languages":81,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":100,"env_os":101,"env_gpu":102,"env_ram":103,"env_deps":104,"category_tags":114,"github_topics":79,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":115,"updated_at":116,"faqs":117,"releases":118},3622,"isaac-sim\u002FIsaacGymEnvs","IsaacGymEnvs","Isaac Gym Reinforcement Learning Environments","IsaacGymEnvs 是 NVIDIA 提供的一套基于 Isaac Gym 的高性能强化学习基准环境集合。它旨在解决传统机器人仿真训练中速度慢、并行度低的痛点，利用 GPU 加速技术，允许开发者在同一张显卡上同时运行数千个独立的仿真环境。这种大规模并行化能力将原本需要数天甚至数周的模型训练时间缩短至几分钟，极大地提升了研发效率。\n\n该工具主要面向机器人学研究人员、AI 算法工程师以及高校师生，特别适合需要快速验证强化学习算法或训练复杂机器人控制策略的专业用户。其核心技术亮点在于原生的向量化环境 API，用户只需几行代码即可轻松创建并管理成千上万个并行环境，完美适配 PyTorch 等主流深度学习框架。此外，IsaacGymEnvs 内置了包括蚂蚁行走（Ant）、倒立摆（Cartpole）在内的多种经典测试任务，并支持无头模式（headless）以进一步加速训练过程。无论是从零开始训练策略，还是加载已有模型进行推理，它都提供了灵活便捷的命令行配置与检查点管理机制，是探索高性能机器人学习的得力助手。","# Isaac Gym Benchmark Environments\n\n[Website](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym) | [Technical Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2108.10470) | [Videos](https:\u002F\u002Fsites.google.com\u002Fview\u002Fisaacgym-nvidia)\n\n\n### About this repository\n\nThis repository contains example RL environments for the NVIDIA Isaac Gym high performance environments described [in our NeurIPS 2021 Datasets and Benchmarks paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=fgFBtYgJQX_)\n\n\n### Installation\n\nDownload the Isaac Gym Preview 4 release from the [website](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym), then\nfollow the installation instructions in the documentation. We highly recommend using a conda environment \nto simplify set up.\n\nEnsure that Isaac Gym works on your system by running one of the examples from the `python\u002Fexamples` \ndirectory, like `joint_monkey.py`. Follow troubleshooting steps described in the Isaac Gym Preview 4\ninstall instructions if you have any trouble running the samples.\n\nOnce Isaac Gym is installed and samples work within your current python environment, install this repo:\n\n```bash\npip install -e .\n```\n\n\n### Creating an environment\n\nWe offer an easy-to-use API for creating preset vectorized environments. For more info on what a vectorized environment is and its usage, please refer to the Gym library [documentation](https:\u002F\u002Fwww.gymlibrary.dev\u002Fcontent\u002Fvectorising\u002F#vectorized-environments).\n\n```python\nimport isaacgym\nimport isaacgymenvs\nimport torch\n\nnum_envs = 2000\n\nenvs = isaacgymenvs.make(\n\tseed=0, \n\ttask=\"Ant\", \n\tnum_envs=num_envs, \n\tsim_device=\"cuda:0\",\n\trl_device=\"cuda:0\",\n)\nprint(\"Observation space is\", envs.observation_space)\nprint(\"Action space is\", envs.action_space)\nobs = envs.reset()\nfor _ in range(20):\n\trandom_actions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0\n\tenvs.step(random_actions)\n```\n\n\n### Running the benchmarks\n\nTo train your first policy, run this line:\n\n```bash\npython train.py task=Cartpole\n```\n\nCartpole should train to the point that the pole stays upright within a few seconds of starting.\n\nHere's another example - Ant locomotion:\n\n```bash\npython train.py task=Ant\n```\n\nNote that by default we show a preview window, which will usually slow down training. You \ncan use the `v` key while running to disable viewer updates and allow training to proceed \nfaster. Hit the `v` key again to resume viewing after a few seconds of training, once the \nants have learned to run a bit better.\n\nUse the `esc` key or close the viewer window to stop training early.\n\nAlternatively, you can train headlessly, as follows:\n\n```bash\npython train.py task=Ant headless=True\n```\n\nAnt may take a minute or two to train a policy you can run. When running headlessly, you \ncan stop it early using Control-C in the command line window.\n\n### Loading trained models \u002F\u002F Checkpoints\n\nCheckpoints are saved in the folder `runs\u002FEXPERIMENT_NAME\u002Fnn` where `EXPERIMENT_NAME` \ndefaults to the task name, but can also be overridden via the `experiment` argument.\n\nTo load a trained checkpoint and continue training, use the `checkpoint` argument:\n\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth\n```\n\nTo load a trained checkpoint and only perform inference (no training), pass `test=True` \nas an argument, along with the checkpoint name. To avoid rendering overhead, you may \nalso want to run with fewer environments using `num_envs=64`:\n\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth test=True num_envs=64\n```\n\nNote that If there are special characters such as `[` or `=` in the checkpoint names, \nyou will need to escape them and put quotes around the string. For example,\n`checkpoint=\".\u002Fruns\u002FAnt\u002Fnn\u002Flast_Antep\\=501rew\\[5981.31\\].pth\"`\n\n\n### Configuration and command line arguments\n\nWe use [Hydra](https:\u002F\u002Fhydra.cc\u002Fdocs\u002Fintro\u002F) to manage the config. Note that this has some \ndifferences from previous incarnations in older versions of Isaac Gym.\n \nKey arguments to the `train.py` script are:\n\n* `task=TASK` - selects which task to use. Any of `AllegroHand`, `AllegroHandDextremeADR`, `AllegroHandDextremeManualDR`, `AllegroKukaLSTM`, `AllegroKukaTwoArmsLSTM`, `Ant`, `Anymal`, `AnymalTerrain`, `BallBalance`, `Cartpole`, `FrankaCabinet`, `Humanoid`, `Ingenuity` `Quadcopter`, `ShadowHand`, `ShadowHandOpenAI_FF`, `ShadowHandOpenAI_LSTM`, and `Trifinger` (these correspond to the config for each environment in the folder `isaacgymenvs\u002Fconfig\u002Ftask`)\n* `train=TRAIN` - selects which training config to use. Will automatically default to the correct config for the environment (ie. `\u003CTASK>PPO`).\n* `num_envs=NUM_ENVS` - selects the number of environments to use (overriding the default number of environments set in the task config).\n* `seed=SEED` - sets a seed value for randomizations, and overrides the default seed set up in the task config\n* `sim_device=SIM_DEVICE_TYPE` - Device used for physics simulation. Set to `cuda:0` (default) to use GPU and to `cpu` for CPU. Follows PyTorch-like device syntax.\n* `rl_device=RL_DEVICE` - Which device \u002F ID to use for the RL algorithm. Defaults to `cuda:0`, and also follows PyTorch-like device syntax.\n* `graphics_device_id=GRAPHICS_DEVICE_ID` - Which Vulkan graphics device ID to use for rendering. Defaults to 0. **Note** - this may be different from CUDA device ID, and does **not** follow PyTorch-like device syntax.\n* `pipeline=PIPELINE` - Which API pipeline to use. Defaults to `gpu`, can also set to `cpu`. When using the `gpu` pipeline, all data stays on the GPU and everything runs as fast as possible. When using the `cpu` pipeline, simulation can run on either CPU or GPU, depending on the `sim_device` setting, but a copy of the data is always made on the CPU at every step.\n* `test=TEST`- If set to `True`, only runs inference on the policy and does not do any training.\n* `checkpoint=CHECKPOINT_PATH` - Set to path to the checkpoint to load for training or testing.\n* `headless=HEADLESS` - Whether to run in headless mode.\n* `experiment=EXPERIMENT` - Sets the name of the experiment.\n* `max_iterations=MAX_ITERATIONS` - Sets how many iterations to run for. Reasonable defaults are provided for the provided environments.\n\nHydra also allows setting variables inside config files directly as command line arguments. As an example, to set the discount rate for a rl_games training run, you can use `train.params.config.gamma=0.999`. Similarly, variables in task configs can also be set. For example, `task.env.enableDebugVis=True`.\n\n#### Hydra Notes\n\nDefault values for each of these are found in the `isaacgymenvs\u002Fconfig\u002Fconfig.yaml` file.\n\nThe way that the `task` and `train` portions of the config works are through the use of config groups. \nYou can learn more about how these work [here](https:\u002F\u002Fhydra.cc\u002Fdocs\u002Ftutorials\u002Fstructured_config\u002Fconfig_groups\u002F)\nThe actual configs for `task` are in `isaacgymenvs\u002Fconfig\u002Ftask\u002F\u003CTASK>.yaml` and for train in `isaacgymenvs\u002Fconfig\u002Ftrain\u002F\u003CTASK>PPO.yaml`. \n\nIn some places in the config you will find other variables referenced (for example,\n `num_actors: ${....task.env.numEnvs}`). Each `.` represents going one level up in the config hierarchy.\n This is documented fully [here](https:\u002F\u002Fomegaconf.readthedocs.io\u002Fen\u002Flatest\u002Fusage.html#variable-interpolation).\n\n## Tasks\n\nSource code for tasks can be found in `isaacgymenvs\u002Ftasks`. \n\nEach task subclasses the `VecEnv` base class in `isaacgymenvs\u002Fbase\u002Fvec_task.py`.\n\nRefer to [docs\u002Fframework.md](docs\u002Fframework.md) for how to create your own tasks.\n\nFull details on each of the tasks available can be found in the [RL examples documentation](docs\u002Frl_examples.md).\n\n## Domain Randomization\n\nIsaacGymEnvs includes a framework for Domain Randomization to improve Sim-to-Real transfer of trained\nRL policies. You can read more about it [here](docs\u002Fdomain_randomization.md).\n\n## Reproducibility and Determinism\n\nIf deterministic training of RL policies is important for your work, you may wish to review our [Reproducibility and Determinism Documentation](docs\u002Freproducibility.md).\n\n## Multi-GPU Training\n\nYou can run multi-GPU training using `torchrun` (i.e., `torch.distributed`) using this repository.\n\nHere is an example command for how to run in this way -\n`torchrun --standalone --nnodes=1 --nproc_per_node=2 train.py multi_gpu=True task=Ant \u003COTHER_ARGS>`\n\nWhere the `--nproc_per_node=` flag specifies how many processes to run and note the `multi_gpu=True` flag must be set on the train script in order for multi-GPU training to run.\n\n## Population Based Training\n\nYou can run population based training to help find good hyperparameters or to train on very difficult environments which would otherwise\nbe hard to learn anything on without it. See [the readme](docs\u002Fpbt.md) for details.\n\n## WandB support\n\nYou can run [WandB](https:\u002F\u002Fwandb.ai\u002F) with Isaac Gym Envs by setting `wandb_activate=True` flag from the command line. You can set the group, name, entity, and project for the run by setting the `wandb_group`, `wandb_name`, `wandb_entity` and `wandb_project` set. Make sure you have WandB installed with `pip install wandb` before activating.\n\n\n## Capture videos\n\n\nWe implement the standard `env.render(mode='rgb_rray')` `gym` API to provide an image of the simulator viewer. Additionally, we can leverage `gym.wrappers.RecordVideo` to help record videos that shows agent's gameplay. Consider running the following file which should produce a video in the `videos` folder.\n\n```python\nimport gym\nimport isaacgym\nimport isaacgymenvs\nimport torch\n\nnum_envs = 64\n\nenvs = isaacgymenvs.make(\n\tseed=0, \n\ttask=\"Ant\", \n\tnum_envs=num_envs, \n\tsim_device=\"cuda:0\",\n\trl_device=\"cuda:0\",\n\tgraphics_device_id=0,\n\theadless=False,\n\tmulti_gpu=False,\n\tvirtual_screen_capture=True,\n\tforce_render=False,\n)\nenvs.is_vector_env = True\nenvs = gym.wrappers.RecordVideo(\n\tenvs,\n\t\".\u002Fvideos\",\n\tstep_trigger=lambda step: step % 10000 == 0, # record the videos every 10000 steps\n\tvideo_length=100  # for each video record up to 100 steps\n)\nenvs.reset()\nprint(\"the image of Isaac Gym viewer is an array of shape\", envs.render(mode=\"rgb_array\").shape)\nfor _ in range(100):\n\tactions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0\n\tenvs.step(actions)\n```\n\n## Capture videos during training\n\nYou can automatically capture the videos of the agents gameplay by toggling the `capture_video=True` flag and tune the capture frequency `capture_video_freq=1500` and video length via `capture_video_len=100`. You can set `force_render=False` to disable rendering when the videos are not captured.\n\n```\npython train.py capture_video=True capture_video_freq=1500 capture_video_len=100 force_render=False\n```\n\nYou can also automatically upload the videos to Weights and Biases:\n\n```\npython train.py task=Ant wandb_activate=True wandb_entity=nvidia wandb_project=rl_games capture_video=True force_render=False\n```\n\n## Pre-commit\n\nWe use [pre-commit](https:\u002F\u002Fpre-commit.com\u002F) to helps us automate short tasks that improve code quality. Before making a commit to the repository, please ensure `pre-commit run --all-files` runs without error.\n\n\n## Troubleshooting\n\nPlease review the Isaac Gym installation instructions first if you run into any issues.\n\nYou can either submit issues through GitHub or through the [Isaac Gym forum here](https:\u002F\u002Fforums.developer.nvidia.com\u002Fc\u002Fagx-autonomous-machines\u002Fisaac\u002Fisaac-gym\u002F322).\n\n## Citing\n\nPlease cite this work as:\n```\n@misc{makoviychuk2021isaac,\n      title={Isaac Gym: High Performance GPU-Based Physics Simulation For Robot Learning}, \n      author={Viktor Makoviychuk and Lukasz Wawrzyniak and Yunrong Guo and Michelle Lu and Kier Storey and Miles Macklin and David Hoeller and Nikita Rudin and Arthur Allshire and Ankur Handa and Gavriel State},\n      year={2021},\n      journal={arXiv preprint arXiv:2108.10470}\n}\n```\n\n**Note** if you use the DexPBT: Scaling up Dexterous Manipulation for Hand-Arm Systems with Population Based Training work or the code related to Population Based Training, please cite the following paper:\n\n```\n@inproceedings{\n\tpetrenko2023dexpbt,\n\tauthor = {Aleksei Petrenko, Arthur Allshire, Gavriel State, Ankur Handa, Viktor Makoviychuk},\n\ttitle = {DexPBT: Scaling up Dexterous Manipulation for Hand-Arm Systems with Population Based Training},\n\tbooktitle = {RSS},\n\tyear = {2023}\n}\n```\n\n**Note** if you use the DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality work or the code related to Automatic Domain Randomisation, please cite the following paper:\n\n```\n@inproceedings{\n\thanda2023dextreme,\n\tauthor = {Ankur Handa, Arthur Allshire, Viktor Makoviychuk, Aleksei Petrenko, Ritvik Singh, Jingzhou Liu, Denys Makoviichuk, Karl Van Wyk, Alexander Zhurkevich, Balakumar Sundaralingam, Yashraj Narang, Jean-Francois Lafleche, Dieter Fox, Gavriel State},\n\ttitle = {DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality},\n\tbooktitle = {ICRA},\n\tyear = {2023}\n} \n```\n\n**Note** if you use the ANYmal rough terrain environment in your work, please ensure you cite the following work:\n```\n@misc{rudin2021learning,\n      title={Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning}, \n      author={Nikita Rudin and David Hoeller and Philipp Reist and Marco Hutter},\n      year={2021},\n      journal = {arXiv preprint arXiv:2109.11978}\n}\n```\n\n**Note** if you use the Trifinger environment in your work, please ensure you cite the following work:\n```\n@misc{isaacgym-trifinger,\n  title     = {{Transferring Dexterous Manipulation from GPU Simulation to a Remote Real-World TriFinger}},\n  author    = {Allshire, Arthur and Mittal, Mayank and Lodaya, Varun and Makoviychuk, Viktor and Makoviichuk, Denys and Widmaier, Felix and Wuthrich, Manuel and Bauer, Stefan and Handa, Ankur and Garg, Animesh},\n  year      = {2021},\n  journal = {arXiv preprint arXiv:2108.09779}\n}\n```\n\n**Note** if you use the AMP: Adversarial Motion Priors environment in your work, please ensure you cite the following work:\n```\n@article{\n\t2021-TOG-AMP,\n\tauthor = {Peng, Xue Bin and Ma, Ze and Abbeel, Pieter and Levine, Sergey and Kanazawa, Angjoo},\n\ttitle = {AMP: Adversarial Motion Priors for Stylized Physics-Based Character Control},\n\tjournal = {ACM Trans. Graph.},\n\tissue_date = {August 2021},\n\tvolume = {40},\n\tnumber = {4},\n\tmonth = jul,\n\tyear = {2021},\n\tarticleno = {1},\n\tnumpages = {15},\n\turl = {http:\u002F\u002Fdoi.acm.org\u002F10.1145\u002F3450626.3459670},\n\tdoi = {10.1145\u002F3450626.3459670},\n\tpublisher = {ACM},\n\taddress = {New York, NY, USA},\n\tkeywords = {motion control, physics-based character animation, reinforcement learning},\n} \n```\n\n**Note** if you use the Factory simulation methods (e.g., SDF collisions, contact reduction) or Factory learning tools (e.g., assets, environments, or controllers) in your work, please cite the following paper:\n```\n@inproceedings{\n\tnarang2022factory,\n\tauthor = {Yashraj Narang and Kier Storey and Iretiayo Akinola and Miles Macklin and Philipp Reist and Lukasz Wawrzyniak and Yunrong Guo and Adam Moravanszky and Gavriel State and Michelle Lu and Ankur Handa and Dieter Fox},\n\ttitle = {Factory: Fast contact for robotic assembly},\n\tbooktitle = {Robotics: Science and Systems},\n\tyear = {2022}\n} \n```\n\n**Note** if you use the IndustReal training environments or algorithms in your work, please cite the following paper:\n```\n@inproceedings{\n\ttang2023industreal,\n\tauthor = {Bingjie Tang and Michael A Lin and Iretiayo Akinola and Ankur Handa and Gaurav S Sukhatme and Fabio Ramos and Dieter Fox and Yashraj Narang},\n\ttitle = {IndustReal: Transferring contact-rich assembly tasks from simulation to reality},\n\tbooktitle = {Robotics: Science and Systems},\n\tyear = {2023}\n}\n```","# Isaac Gym 基准环境\n\n[官网](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym) | [技术论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2108.10470) | [视频](https:\u002F\u002Fsites.google.com\u002Fview\u002Fisaacgym-nvidia)\n\n\n### 关于本仓库\n\n本仓库包含 NVIDIA Isaac Gym 高性能环境的强化学习示例环境，这些环境在我们的 [NeurIPS 2021 数据集与基准论文](https:\u002F\u002Fopenreview.net\u002Fforum?id=fgFBtYgJQX_) 中有所介绍。\n\n\n### 安装\n\n从 [官网](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym) 下载 Isaac Gym Preview 4 版本，然后按照文档中的安装说明进行操作。我们强烈建议使用 conda 环境来简化设置。\n\n确保 Isaac Gym 在您的系统上正常运行，方法是运行 `python\u002Fexamples` 目录下的示例之一，例如 `joint_monkey.py`。如果运行示例时遇到任何问题，请按照 Isaac Gym Preview 4 的安装说明中的故障排除步骤进行操作。\n\n一旦 Isaac Gym 已成功安装，并且当前 Python 环境中的示例能够正常运行，请安装本仓库：\n\n```bash\npip install -e .\n```\n\n\n### 创建环境\n\n我们提供了一个易于使用的 API 来创建预设的向量化环境。有关向量化环境的概念及其用法的更多信息，请参阅 Gym 库的 [文档](https:\u002F\u002Fwww.gymlibrary.dev\u002Fcontent\u002Fvectorising\u002F#vectorized-environments)。\n\n```python\nimport isaacgym\nimport isaacgymenvs\nimport torch\n\nnum_envs = 2000\n\nenvs = isaacgymenvs.make(\n\tseed=0, \n\ttask=\"Ant\", \n\tnum_envs=num_envs, \n\tsim_device=\"cuda:0\",\n\trl_device=\"cuda:0\",\n)\nprint(\"观测空间为\", envs.observation_space)\nprint(\"动作空间为\", envs.action_space)\nobs = envs.reset()\nfor _ in range(20):\n\trandom_actions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0\n\tenvs.step(random_actions)\n```\n\n\n### 运行基准测试\n\n要训练您的第一个策略，运行以下命令：\n\n```bash\npython train.py task=Cartpole\n```\n\nCartpole 应该能够在开始后的几秒钟内学会保持杆直立。\n\n另一个例子——蚂蚁行走：\n\n```bash\npython train.py task=Ant\n```\n\n请注意，默认情况下会显示一个预览窗口，这通常会降低训练速度。您可以在运行过程中按 `v` 键来禁用查看器更新，从而加快训练速度。训练几秒钟后，当蚂蚁已经学会更好地行走时，再次按下 `v` 键即可恢复查看。\n\n按 `esc` 键或关闭查看器窗口可以提前停止训练。\n\n或者，您也可以以无头模式进行训练，如下所示：\n\n```bash\npython train.py task=Ant headless=True\n```\n\n蚂蚁可能需要一两分钟才能训练出一个可运行的策略。在无头模式下，您可以使用终端中的 Control-C 提前终止训练。\n\n### 加载已训练模型 \u002F\u002F 检查点\n\n检查点保存在 `runs\u002FEXPERIMENT_NAME\u002Fnn` 文件夹中，其中 `EXPERIMENT_NAME` 默认为任务名称，但也可以通过 `experiment` 参数覆盖。\n\n要加载已训练的检查点并继续训练，使用 `checkpoint` 参数：\n\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth\n```\n\n要加载已训练的检查点并仅进行推理（不进行训练），请同时传递 `test=True` 参数和检查点名称。为了避免渲染开销，您还可以使用较少的环境数量，例如 `num_envs=64`：\n\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth test=True num_envs=64\n```\n\n请注意，如果检查点名称中包含特殊字符，如 `[` 或 `=`，则需要对这些字符进行转义，并将字符串用引号括起来。例如，\n`checkpoint=\".\u002Fruns\u002FAnt\u002Fnn\u002Flast_Antep\\=501rew\\[5981.31\\].pth\"`\n\n### 配置与命令行参数\n\n我们使用 [Hydra](https:\u002F\u002Fhydra.cc\u002Fdocs\u002Fintro\u002F) 来管理配置。请注意，这与 Isaac Gym 旧版本中的实现有一些差异。\n\n`train.py` 脚本的关键参数包括：\n\n* `task=TASK` - 选择要使用的任务。可选值包括 `AllegroHand`、`AllegroHandDextremeADR`、`AllegroHandDextremeManualDR`、`AllegroKukaLSTM`、`AllegroKukaTwoArmsLSTM`、`Ant`、`Anymal`、`AnymalTerrain`、`BallBalance`、`Cartpole`、`FrankaCabinet`、`Humanoid`、`Ingenuity`、`Quadcopter`、`ShadowHand`、`ShadowHandOpenAI_FF`、`ShadowHandOpenAI_LSTM` 和 `Trifinger`（这些对应于 `isaacgymenvs\u002Fconfig\u002Ftask` 文件夹中每个环境的配置）。\n* `train=TRAIN` - 选择要使用的训练配置。默认会自动选择与当前环境匹配的正确配置（即 `\u003CTASK>PPO`）。\n* `num_envs=NUM_ENVS` - 指定要使用的环境数量，覆盖任务配置中设置的默认环境数。\n* `seed=SEED` - 设置随机化的种子值，覆盖任务配置中设置的默认种子。\n* `sim_device=SIM_DEVICE_TYPE` - 用于物理模拟的设备。设置为 `cuda:0`（默认）以使用 GPU，或设置为 `cpu` 以使用 CPU。遵循 PyTorch 风格的设备语法。\n* `rl_device=RL_DEVICE` - 用于强化学习算法的设备或 ID。默认为 `cuda:0`，同样遵循 PyTorch 风格的设备语法。\n* `graphics_device_id=GRAPHICS_DEVICE_ID` - 用于渲染的 Vulkan 图形设备 ID。默认为 0。**注意**：这可能与 CUDA 设备 ID 不同，并且 **不** 遵循 PyTorch 风格的设备语法。\n* `pipeline=PIPELINE` - 使用哪种 API 管道。默认为 `gpu`，也可设置为 `cpu`。当使用 `gpu` 管道时，所有数据都保留在 GPU 上，运行速度尽可能快；而使用 `cpu` 管道时，模拟可以在 CPU 或 GPU 上运行，具体取决于 `sim_device` 的设置，但每一步都会在 CPU 上复制一份数据。\n* `test=TEST` - 如果设置为 `True`，则仅运行策略的推理，而不进行训练。\n* `checkpoint=CHECKPOINT_PATH` - 指定要加载的检查点路径，用于训练或测试。\n* `headless=HEADLESS` - 是否以无头模式运行。\n* `experiment=EXPERIMENT` - 设置实验名称。\n* `max_iterations=MAX_ITERATIONS` - 设置要运行的最大迭代次数。对于提供的环境，已提供合理的默认值。\n\nHydra 还允许直接通过命令行参数设置配置文件中的变量。例如，要设置 rl_games 训练的折扣因子，可以使用 `train.params.config.gamma=0.999`。同样，也可以设置任务配置中的变量，比如 `task.env.enableDebugVis=True`。\n\n#### Hydra 注意事项\n\n这些参数的默认值可在 `isaacgymenvs\u002Fconfig\u002Fconfig.yaml` 文件中找到。\n\n配置中 `task` 和 `train` 部分的工作方式是通过配置组来实现。有关其工作原理的更多信息，请参阅 [此处](https:\u002F\u002Fhydra.cc\u002Fdocs\u002Ftutorials\u002Fstructured_config\u002Fconfig_groups\u002F)。\n\n实际的任务配置位于 `isaacgymenvs\u002Fconfig\u002Ftask\u002F\u003CTASK>.yaml`，而训练配置则位于 `isaacgymenvs\u002Fconfig\u002Ftrain\u002F\u003CTASK>PPO.yaml`。\n\n在配置的某些地方，您会发现引用了其他变量（例如，`num_actors: ${....task.env.numEnvs}`）。每个 `.` 表示在配置层次结构中向上一级。完整的文档请参阅 [这里](https:\u002F\u002Fomegaconf.readthedocs.io\u002Fen\u002Flatest\u002Fusage.html#variable-interpolation)。\n\n## 任务\n\n任务的源代码位于 `isaacgymenvs\u002Ftasks` 中。\n\n每个任务都继承自 `isaacgymenvs\u002Fbase\u002Fvec_task.py` 中的 `VecEnv` 基类。\n\n有关如何创建自己的任务，请参阅 [docs\u002Fframework.md](docs\u002Fframework.md)。\n\n关于可用任务的详细信息，请参阅 [RL 示例文档](docs\u002Frl_examples.md)。\n\n## 域随机化\n\nIsaacGymEnvs 包含一个用于域随机化的框架，以提高训练好的 RL 策略从仿真到现实世界的迁移能力。您可以阅读 [这里](docs\u002Fdomain_randomization.md) 获取更多信息。\n\n## 可重复性和确定性\n\n如果您对 RL 策略的确定性训练非常重视，建议查阅我们的 [可重复性和确定性文档](docs\u002Freproducibility.md)。\n\n## 多 GPU 训练\n\n您可以使用 `torchrun`（即 `torch.distributed`）通过本仓库进行多 GPU 训练。\n\n以下是一个以这种方式运行的示例命令：\n`torchrun --standalone --nnodes=1 --nproc_per_node=2 train.py multi_gpu=True task=Ant \u003COTHER_ARGS>`\n\n其中 `--nproc_per_node=` 标志指定了要运行的进程数，并且必须在训练脚本中设置 `multi_gpu=True` 才能进行多 GPU 训练。\n\n## 基于群体的训练\n\n您可以运行基于群体的训练，以帮助寻找合适的超参数，或在那些如果没有它就很难学习的困难环境中进行训练。详情请参阅 [readme](docs\u002Fpbt.md)。\n\n## WandB 支持\n\n您可以通过在命令行中设置 `wandb_activate=True` 标志来使用 [WandB](https:\u002F\u002Fwandb.ai\u002F) 与 Isaac Gym Envs 集成。您还可以通过设置 `wandb_group`、`wandb_name`、`wandb_entity` 和 `wandb_project` 来指定运行的组、名称、实体和项目。在激活之前，请确保已通过 `pip install wandb` 安装 WandB。\n\n## 录制视频\n\n我们实现了标准的 `env.render(mode='rgb_array')` `gym` API，以提供模拟器视图的图像。此外，我们还可以利用 `gym.wrappers.RecordVideo` 来录制展示智能体游戏过程的视频。请尝试运行以下代码，它应该会在 `videos` 文件夹中生成一个视频。\n\n```python\nimport gym\nimport isaacgym\nimport isaacgymenvs\nimport torch\n\nnum_envs = 64\n\nenvs = isaacgymenvs.make(\n\tseed=0, \n\ttask=\"Ant\", \n\tnum_envs=num_envs, \n\tsim_device=\"cuda:0\",\n\trl_device=\"cuda:0\",\n\tgraphics_device_id=0,\n\theadless=False,\n\tmulti_gpu=False,\n\tvirtual_screen_capture=True,\n\tforce_render=False,\n)\nenvs.is_vector_env = True\nenvs = gym.wrappers.RecordVideo(\n\tenvs,\n\t\".\u002Fvideos\",\n\tstep_trigger=lambda step: step % 10000 == 0, # 每 10000 步录制一次视频\n\tvideo_length=100  # 每段视频最多记录 100 步\n)\nenvs.reset()\nprint(\"Isaac Gym 查看器的图像是一个形状为\", envs.render(mode=\"rgb_array\").shape, \"的数组\")\nfor _ in range(100):\n\tactions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0\n\tenvs.step(actions)\n```\n\n## 在训练过程中捕获视频\n\n您可以通过切换 `capture_video=True` 标志来自动捕获智能体的游戏过程视频，并通过 `capture_video_freq=1500` 调整捕获频率，以及通过 `capture_video_len=100` 设置视频长度。当不需要捕获视频时，可以将 `force_render=False` 设置为禁用渲染。\n\n```\npython train.py capture_video=True capture_video_freq=1500 capture_video_len=100 force_render=False\n```\n\n您还可以将视频自动上传到 Weights and Biases：\n\n```\npython train.py task=Ant wandb_activate=True wandb_entity=nvidia wandb_project=rl_games capture_video=True force_render=False\n```\n\n## Pre-commit\n\n我们使用 [pre-commit](https:\u002F\u002Fpre-commit.com\u002F) 来自动化一些能够提升代码质量的小任务。在向仓库提交更改之前，请确保运行 `pre-commit run --all-files` 时不出现任何错误。\n\n## 故障排除\n\n如果您遇到任何问题，请先查看 Isaac Gym 的安装说明。\n\n您可以选择通过 GitHub 提交问题，也可以通过 [Isaac Gym 论坛](https:\u002F\u002Fforums.developer.nvidia.com\u002Fc\u002Fagx-autonomous-machines\u002Fisaac\u002Fisaac-gym\u002F322) 提交。\n\n## 引用\n\n请按以下方式引用本项目：\n```\n@misc{makoviychuk2021isaac,\n      title={Isaac Gym: High Performance GPU-Based Physics Simulation For Robot Learning}, \n      author={Viktor Makoviychuk and Lukasz Wawrzyniak and Yunrong Guo and Michelle Lu and Kier Storey and Miles Macklin and David Hoeller and Nikita Rudin and Arthur Allshire and Ankur Handa and Gavriel State},\n      year={2021},\n      journal={arXiv preprint arXiv:2108.10470}\n}\n```\n\n**注意**：如果您使用了 DexPBT：通过基于群体的训练扩展手-臂系统的灵巧操作相关工作或代码，请引用以下论文：\n\n```\n@inproceedings{\n\tpetrenko2023dexpbt,\n\tauthor = {Aleksei Petrenko, Arthur Allshire, Gavriel State, Ankur Handa, Viktor Makoviychuk},\n\ttitle = {DexPBT: Scaling up Dexterous Manipulation for Hand-Arm Systems with Population Based Training},\n\tbooktitle = {RSS},\n\tyear = {2023}\n}\n```\n\n**注意**：如果您使用了 DeXtreme：从仿真到现实的敏捷手持操作迁移相关工作或与自动领域随机化相关的代码，请引用以下论文：\n\n```\n@inproceedings{\n\thanda2023dextreme,\n\tauthor = {Ankur Handa, Arthur Allshire, Viktor Makoviychuk, Aleksei Petrenko, Ritvik Singh, Jingzhou Liu, Denys Makoviichuk, Karl Van Wyk, Alexander Zhurkevich, Balakumar Sundaralingam, Yashraj Narang, Jean-Francois Lafleche, Dieter Fox, Gavriel State},\n\ttitle = {DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality},\n\tbooktitle = {ICRA},\n\tyear = {2023}\n} \n```\n\n**注意**：如果您在工作中使用了 ANYmal 复杂地形环境，请务必引用以下文献：\n```\n@misc{rudin2021learning,\n      title={Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning}, \n      author={Nikita Rudin and David Hoeller and Philipp Reist and Marco Hutter},\n      year={2021},\n      journal = {arXiv preprint arXiv:2109.11978}\n}\n```\n\n**注意**：如果您在工作中使用了 Trifinger 环境，请务必引用以下文献：\n```\n@misc{isaacgym-trifinger,\n  title     = {{Transferring Dexterous Manipulation from GPU Simulation to a Remote Real-World TriFinger}},\n  author    = {Allshire, Arthur and Mittal, Mayank and Lodaya, Varun and Makoviychuk, Viktor and Makoviichuk, Denys and Widmaier, Felix and Wuthrich, Manuel and Bauer, Stefan and Handa, Ankur and Garg, Animesh},\n  year      = {2021},\n  journal = {arXiv preprint arXiv:2108.09779}\n}\n```\n\n**注意**：如果您在工作中使用了 AMP：对抗性运动先验环境，请务必引用以下文献：\n```\n@article{\n\t2021-TOG-AMP,\n\tauthor = {Peng, Xue Bin and Ma, Ze and Abbeel, Pieter and Levine, Sergey and Kanazawa, Angjoo},\n\ttitle = {AMP: Adversarial Motion Priors for Stylized Physics-Based Character Control},\n\tjournal = {ACM Trans. Graph.},\n\tissue_date = {August 2021},\n\tvolume = {40},\n\tnumber = {4},\n\tmonth = jul,\n\tyear = {2021},\n\tarticleno = {1},\n\tnumpages = {15},\n\turl = {http:\u002F\u002Fdoi.acm.org\u002F10.1145\u002F3450626.3459670},\n\tdoi = {10.1145\u002F3450626.3459670},\n\tpublisher = {ACM},\n\taddress = {New York, NY, USA},\n\tkeywords = {motion control, physics-based character animation, reinforcement learning},\n} \n```\n\n**注意**：如果您在工作中使用了 Factory 模拟方法（例如 SDF 碰撞、接触简化）或 Factory 学习工具（例如资产、环境或控制器），请引用以下论文：\n```\n@inproceedings{\n\tnarang2022factory,\n\tauthor = {Yashraj Narang and Kier Storey and Iretiayo Akinola and Miles Macklin and Philipp Reist and Lukasz Wawrzyniak and Yunrong Guo and Adam Moravanszky and Gavriel State and Michelle Lu and Ankur Handa and Dieter Fox},\n\ttitle = {Factory: Fast contact for robotic assembly},\n\tbooktitle = {Robotics: Science and Systems},\n\tyear = {2022}\n} \n```\n\n**注意**：如果您在工作中使用了 IndustReal 培训环境或算法，请引用以下论文：\n```\n@inproceedings{\n\ttang2023industreal,\n\tauthor = {Bingjie Tang and Michael A Lin and Iretiayo Akinola and Ankur Handa and Gaurav S Sukhatme and Fabio Ramos and Dieter Fox and Yashraj Narang},\n\ttitle = {IndustReal: Transferring contact-rich assembly tasks from simulation to reality},\n\tbooktitle = {Robotics: Science and Systems},\n\tyear = {2023}\n}\n```","# IsaacGymEnvs 快速上手指南\n\nIsaacGymEnvs 是 NVIDIA Isaac Gym 的高性能强化学习（RL）基准环境集合，支持大规模并行仿真，专为机器人学习设计。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (推荐 Ubuntu 18.04\u002F20.04)\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡（需安装对应的驱动和 CUDA Toolkit）\n*   **Python**: 建议 Python 3.6 - 3.9\n*   **前置软件**: \n    *   **Isaac Gym Preview 4**: 必须先从 [NVIDIA 官网](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym) 下载并安装。\n    *   **Conda**: 强烈推荐使用 Conda 管理虚拟环境以简化依赖配置。\n\n> **注意**：在安装本仓库前，请务必先运行 Isaac Gym 自带的示例（如 `python\u002Fexamples\u002Fjoint_monkey.py`），确保基础仿真环境在您的机器上正常工作。\n\n## 安装步骤\n\n1.  **创建并激活 Conda 环境**\n    ```bash\n    conda create -n isaacgym python=3.8\n    conda activate isaacgym\n    ```\n\n2.  **安装 PyTorch**\n    请根据您的 CUDA 版本安装对应的 PyTorch。例如使用 CUDA 11.3：\n    ```bash\n    pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0 -f https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu113\u002Ftorch_stable.html\n    ```\n    *(国内用户若下载缓慢，可尝试使用清华源：`-i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`)*\n\n3.  **克隆并安装 IsaacGymEnvs**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FNVIDIA-Omniverse\u002FIsaacGymEnvs.git\n    cd IsaacGymEnvs\n    pip install -e .\n    ```\n    如果安装过程中缺少依赖，可根据报错信息手动安装 `gym`, `hydra-core`, `rl-games` 等包。\n\n## 基本使用\n\n### 1. 快速训练测试\n运行以下命令即可开始训练经典的 Cartpole（倒立摆）任务。默认情况下会弹出可视化窗口，几秒内即可看到策略收敛（杆子保持直立）。\n\n```bash\npython train.py task=Cartpole\n```\n\n**常用参数说明：**\n*   `task=Ant`: 切换为蚂蚁行走任务。\n*   `headless=True`: 无头模式运行（不显示窗口），显著提升训练速度。\n*   `num_envs=2048`: 设置并行环境数量（默认为配置文件中的值）。\n*   `sim_device=cuda:0`: 指定物理仿真运行的设备。\n\n**无头模式训练示例：**\n```bash\npython train.py task=Ant headless=True\n```\n\n> **提示**：在有可视化窗口时，按 `v` 键可暂停渲染以加速训练，再次按 `v` 恢复；按 `Esc` 或关闭窗口可停止训练。在无头模式下，使用 `Ctrl+C` 停止。\n\n### 2. 加载模型与推理\n训练产生的检查点保存在 `runs\u002F\u003CTASK_NAME>\u002Fnn\u002F` 目录下。\n\n**继续训练：**\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth\n```\n\n**仅进行推理测试（不训练）：**\n建议减少环境数量以降低渲染开销。\n```bash\npython train.py task=Ant checkpoint=runs\u002FAnt\u002Fnn\u002FAnt.pth test=True num_envs=64\n```\n\n### 3. Python API 调用\n您可以在自己的脚本中直接创建矢量化环境并进行交互：\n\n```python\nimport isaacgym\nimport isaacgymenvs\nimport torch\n\nnum_envs = 2000\n\n# 创建环境\nenvs = isaacgymenvs.make(\n\tseed=0, \n\ttask=\"Ant\", \n\tnum_envs=num_envs, \n\tsim_device=\"cuda:0\",\n\trl_device=\"cuda:0\",\n)\n\nprint(\"Observation space is\", envs.observation_space)\nprint(\"Action space is\", envs.action_space)\n\nobs = envs.reset()\n\n# 执行随机动作步\nfor _ in range(20):\n\trandom_actions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0\n\tenvs.step(random_actions)\n```\n\n### 4. 高级配置 (Hydra)\n本项目使用 Hydra 管理配置，支持通过命令行直接覆盖配置文件中的参数：\n\n*   **修改超参数**: 例如修改折扣因子 gamma\n    ```bash\n    python train.py task=Ant train.params.config.gamma=0.999\n    ```\n*   **多 GPU 训练**:\n    ```bash\n    torchrun --standalone --nnodes=1 --nproc_per_node=2 train.py multi_gpu=True task=Ant\n    ```\n*   **开启 WandB 日志记录**:\n    ```bash\n    python train.py task=Ant wandb_activate=True wandb_project=my_project\n    ```\n\n更多任务列表及详细配置请参考 `isaacgymenvs\u002Fconfig\u002F` 目录下的 YAML 文件。","某机器人实验室团队正致力于训练四足机器人在复杂地形上的自适应行走策略，需要处理高维度的物理仿真与大规模并行强化学习。\n\n### 没有 IsaacGymEnvs 时\n- **训练效率极低**：传统仿真器通常只能在 CPU 上串行运行少量环境，训练一个稳定的步态策略往往需要数天甚至数周。\n- **代码集成繁琐**：研究人员需手动编写大量样板代码来连接物理引擎与 RL 算法，难以快速复现论文中的基准测试（如 Ant、Humanoid）。\n- **资源调度困难**：无法充分利用 GPU 的并行计算能力，导致昂贵的显卡资源在训练过程中大量闲置，算力转化率低下。\n- **调试周期漫长**：由于缺乏统一的向量化环境接口，每次调整超参数或更换任务都需要重新配置底层仿真逻辑，试错成本极高。\n\n### 使用 IsaacGymEnvs 后\n- **训练速度飞跃**：借助 GPU 加速的向量化环境，团队可瞬间启动数千个并行仿真实例（如 `num_envs=2000`），将原本数周的训练压缩至几分钟内完成。\n- **开箱即用的基准**：直接调用 `isaacgymenvs.make(task=\"Ant\")` 即可加载预置的高性能环境，无需重复造轮子，让团队能专注于算法创新而非工程搭建。\n- **算力满负荷运转**：原生支持 CUDA 设备映射，确保数据在 GPU 内部高效流转，彻底消除了 CPU 与 GPU 间的数据传输瓶颈，最大化硬件投资回报。\n- **灵活的开发体验**：通过简洁的 Python API 和 Hydra 配置系统，研究人员可轻松切换无头模式（headless）进行后台训练，或实时可视化观察策略进化过程。\n\nIsaacGymEnvs 通过将物理仿真与强化学习训练完全置于 GPU 之上，从根本上解决了机器人控制领域“仿真慢、落地难”的核心痛点。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fisaac-sim_IsaacGymEnvs_e166426f.png","isaac-sim","NVIDIA Isaac Sim","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fisaac-sim_4316e067.jpg","",null,"https:\u002F\u002Fgithub.com\u002Fisaac-sim",[82,86,90,93],{"name":83,"color":84,"percentage":85},"Python","#3572A5",99.9,{"name":87,"color":88,"percentage":89},"Batchfile","#C1F12E",0,{"name":91,"color":92,"percentage":89},"CMake","#DA3434",{"name":94,"color":95,"percentage":89},"Shell","#89e051",2899,517,"2026-04-03T17:45:48","NOASSERTION",4,"Linux","必需 NVIDIA GPU (支持 CUDA)，用于物理模拟和渲染。需安装 Isaac Gym Preview 4 (基于 Vulkan 渲染和 CUDA 计算)。具体显存需求取决于任务规模 (num_envs)，建议高性能显卡以支持大规模并行环境。","未说明 (建议根据并行环境数量配置充足内存)",{"notes":105,"python":106,"dependencies":107},"1. 必须先单独下载并安装 NVIDIA Isaac Gym Preview 4，本仓库仅为示例环境集合。\n2. 强烈建议使用 conda 管理环境。\n3. 渲染需要支持 Vulkan 的显卡驱动，且图形设备 ID (graphics_device_id) 可能与 CUDA 设备 ID 不同。\n4. 支持无头模式 (headless) 运行以加速训练。\n5. 支持多 GPU 训练 (需使用 torchrun) 和基于群体的训练 (PBT)。","未说明 (需与已安装的 Isaac Gym Preview 4 环境兼容，通常推荐 Python 3.8+)",[108,109,110,111,112,113],"torch","numpy","gym","hydra-core","rl-games","wandb (可选)",[13,54],"2026-03-27T02:49:30.150509","2026-04-06T05:32:21.660281",[],[]]