[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FBYFX6KB27B2E3CB4C8TV4":3,"skill-same:01M7FBYFX6KB27B2E3CB4C8TV4":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7FBYFX6KB27B2E3CB4C8TV4","locomotion-modeling",null,"Use Rex-Gym's deterministic kinematics, Bezier gait, constants, and motor model helpers to turn poses or gait parameters into correctly ordered leg commands and bounded torques.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: locomotion-modeling\ndescription: \"Use Rex-Gym's deterministic kinematics, Bezier gait, constants,\n  and motor model helpers to turn poses or gait parameters into correctly\n  ordered leg commands and bounded torques.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# Rex locomotion modeling\n\nUse this sub-skill when a task mentions Rex-Gym inverse kinematics, `Kinematics.solve`,\nBezier trajectories, `GaitPlanner`, leg frames, motor PD\u002Ftorque, walk or gallop phase,\nmark\u002Fmotor constants, 12-joint versus 18-motor commands, or action-to-motor conversion.\nIt is a source-backed operating guide, not a simulator lifecycle guide.\n\n## Route first\n\n- For PyBullet connection\u002Freset\u002Fstep lifecycle, terrain, observations, rewards, falls,\n  or task termination, follow [simulation environments](..\u002Fsimulation-environments\u002FSKILL.md).\n- For PPO policy architecture, training, checkpoints, and evaluation, follow\n  [training policy](..\u002Ftraining-policy\u002FSKILL.md).\n- Use the bundled [API reference](references\u002Fapi-reference.md) for signatures and\n  constants, [motion and control](references\u002Fmotion-and-control.md) for recipes, and\n  [troubleshooting](references\u002Ftroubleshooting.md) when a result is surprising.\n- Run [inspect_kinematics.py](scripts\u002Finspect_kinematics.py),\n  [inspect_gait.py](scripts\u002Finspect_gait.py), or\n  [inspect_motor.py](scripts\u002Finspect_motor.py) for bounded diagnostics.\n\n## Model pipeline\n\n1. Choose the mark and command width. The base has 12 leg motors (four legs × three\n   joints); the arm mark has 18 motors and appends six arm joints. Constants and names\n   are in `rex_constants` and `mark_constants`; do not invent a second ordering.\n2. Define base pose as `orientation=[roll, pitch, yaw]` and `position=[x, y, z]`.\n   Kinematics uses radians and metres. Define four foot frames as a 4×3 matrix in\n   solver order **FR, FL, RR, RL**.\n3. For a static pose, call `Kinematics.solve`. For motion, call `GaitPlanner.loop`\n   to obtain updated frames, then pass those frames to `solve`.\n4. Convert the solver's four 3-angle results to the environment's motor command order\n   **FL, FR, RL, RR**, three values per leg. This reorder is required by the task\n   signal code even though the solver returns FR, FL, RR, RL.\n5. In position control, pass desired joint angles to the environment. In torque control,\n   pass one bounded PWM-like value per motor to `MotorModel.convert_to_torque`; inspect\n   both returned actual and observed torque before applying simulation controls.\n\n## Verified recipes\n\nStatic IK with default frames:\n\n```python\nimport numpy as np\nfrom rex_gym.model.kinematics import Kinematics\n\nik = Kinematics()\nfr, fl, rr, rl, transformed = ik.solve(\n    orientation=np.zeros(3), position=np.zeros(3)\n)\ncommand = np.concatenate([fl, fr, rl, rr])  # 12 values: FL, FR, RL, RR\nassert command.shape == (12,)\nassert np.asarray(transformed).shape == (4, 3)\n```\n\nA gait-to-command step:\n\n```python\nimport numpy as np\nfrom rex_gym.model.gait_planner import GaitPlanner\nfrom rex_gym.model.kinematics import Kinematics\n\nplanner = GaitPlanner(\"walk\")\nik = Kinematics()\nframes = planner.loop(v=0.6, angle=0.0, w_rot=0.0, t=0.65, direction=1.0)\nfr, fl, rr, rl, _ = ik.solve(np.zeros(3), np.zeros(3), frames)\ncommand = np.concatenate([fl, fr, rl, rr])\n```\n\nThe loop is clock-driven: `t` is the period in seconds and the phase comes from wall\nclock time. For reproducible phase diagnostics, use\n[inspect_gait.py](scripts\u002Finspect_gait.py), which evaluates bounded fixed phases rather\nthan sleeping or opening PyBullet.\n\nTorque conversion:\n\n```python\nimport numpy as np\nfrom rex_gym.model.motor import MotorModel\n\nmodel = MotorModel(motors_num=12, torque_control_enabled=False, kp=1.2, kd=0.0)\ntau_actual, tau_observed = model.convert_to_torque(\n    motor_commands=np.zeros(12), motor_angle=np.zeros(12),\n    motor_velocity=np.zeros(12), true_motor_velocity=np.zeros(12),\n)\n```\n\nFor position control, `motor_commands` are target angles. For torque control, construct\n`MotorModel(12, torque_control_enabled=True)` and supply PWM-like commands in `[-1, 1]`;\nthe implementation clips them before its DC-motor calculation. All five input arrays\nmust broadcast to the motor count in normal use.\n\n## Constants and limits that matter\n\n- `Kinematics` uses body dimensions `x_dist=0.23`, `y_dist=0.185`, and default foot\n  height `0.2` metres. Its default frames are\n  `[[.115,-.0925,-.2],[.115,.0925,-.2],[-.115,-.0925,-.2],[-.115,.0925,-.2]]`.\n- `mark_constants.MARK_LIST` is `['base', 'arm']`. `MARK_DETAILS['motors_num']` is\n  12 for `base` and 18 for `arm`; the arm's six rest values are\n  `[-1.6,-1.6,0,0,1.6,0]`.\n- `INIT_POSES` supplies named 12-value poses such as `stand`, `stand_ol`, `gallop`,\n  `stand_low`, `stand_high`, and `rest_position`. These values are radians despite\n  their source being plain arrays. `ARM_POSES['rest']` is six radians.\n- Motor defaults are `kp=1.2`, `kd=0`, voltage `32`, resistance `0.186`, torque\n  constant `0.0954`, and zero viscous damping. PWM is clipped to `[-1,1]`; observed\n  torque is clipped to ±5.7; net voltage is clipped to ±50 before the empirical\n  current\u002Ftorque interpolation. Strength ratios scale actual torque.\n\n## Scope boundary and limitations\n\nIK clamps the cosine-law domain to ±0.99 (not ±1) when a target is unreachable, so a\nreturned angle is a bounded fallback rather than proof that the pose is reachable.\nThe solver is a geometric model: it does not validate joint limits, collisions,\ncontact, terrain, balance, or rewards. The gait planner is an open-loop trajectory\nreference; it does not guarantee foot contact or stable locomotion. The motor helper\nmodels torque\u002FPWM and does not itself simulate PyBullet, thermal shutdown, or policy\nlearning. Keep task semantics and evaluation in the routed sibling skills.\n\nRead the detailed links above before changing conventions; then run the relevant\nself-contained inspector and compare shapes, phase, ordering, and clipping behavior.\n","# Rex locomotion modeling\n\nUse this sub-skill when a task mentions Rex-Gym inverse kinematics, `Kinematics.solve`,\nBezier trajectories, `GaitPlanner`, leg frames, motor PD\u002Ftorque, walk or gallop phase,\nmark\u002Fmotor constants, 12-joint versus 18-motor commands, or action-to-motor conversion.\nIt is a source-backed operating guide, not a simulator lifecycle guide.\n\n## Route first\n\n- For PyBullet connection\u002Freset\u002Fstep lifecycle, terrain, observations, rewards, falls,\n  or task termination, follow [simulation environments](..\u002Fsimulation-environments\u002FSKILL.md).\n- For PPO policy architecture, training, checkpoints, and evaluation, follow\n  [training policy](..\u002Ftraining-policy\u002FSKILL.md).\n- Use the bundled [API reference](references\u002Fapi-reference.md) for signatures and\n  constants, [motion and control](references\u002Fmotion-and-control.md) for recipes, and\n  [troubleshooting](references\u002Ftroubleshooting.md) when a result is surprising.\n- Run [inspect_kinematics.py](scripts\u002Finspect_kinematics.py),\n  [inspect_gait.py](scripts\u002Finspect_gait.py), or\n  [inspect_motor.py](scripts\u002Finspect_motor.py) for bounded diagnostics.\n\n## Model pipeline\n\n1. Choose the mark and command width. The base has 12 leg motors (four legs × three\n   joints); the arm mark has 18 motors and appends six arm joints. Constants and names\n   are in `rex_constants` and `mark_constants`; do not invent a second ordering.\n2. Define base pose as `orientation=[roll, pitch, yaw]` and `position=[x, y, z]`.\n   Kinematics uses radians and metres. Define four foot frames as a 4×3 matrix in\n   solver order **FR, FL, RR, RL**.\n3. For a static pose, call `Kinematics.solve`. For motion, call `GaitPlanner.loop`\n   to obtain updated frames, then pass those frames to `solve`.\n4. Convert the solver's four 3-angle results to the environment's motor command order\n   **FL, FR, RL, RR**, three values per leg. This reorder is required by the task\n   signal code even though the solver returns FR, FL, RR, RL.\n5. In position control, pass desired joint angles to the environment. In torque control,\n   pass one bounded PWM-like value per motor to `MotorModel.convert_to_torque`; inspect\n   both returned actual and observed torque before applying simulation controls.\n\n## Verified recipes\n\nStatic IK with default frames:\n\n```python\nimport numpy as np\nfrom rex_gym.model.kinematics import Kinematics\n\nik = Kinematics()\nfr, fl, rr, rl, transformed = ik.solve(\n    orientation=np.zeros(3), position=np.zeros(3)\n)\ncommand = np.concatenate([fl, fr, rl, rr])  # 12 values: FL, FR, RL, RR\nassert command.shape == (12,)\nassert np.asarray(transformed).shape == (4, 3)\n```\n\nA gait-to-command step:\n\n```python\nimport numpy as np\nfrom rex_gym.model.gait_planner import GaitPlanner\nfrom rex_gym.model.kinematics import Kinematics\n\nplanner = GaitPlanner(\"walk\")\nik = Kinematics()\nframes = planner.loop(v=0.6, angle=0.0, w_rot=0.0, t=0.65, direction=1.0)\nfr, fl, rr, rl, _ = ik.solve(np.zeros(3), np.zeros(3), frames)\ncommand = np.concatenate([fl, fr, rl, rr])\n```\n\nThe loop is clock-driven: `t` is the period in seconds and the phase comes from wall\nclock time. For reproducible phase diagnostics, use\n[inspect_gait.py](scripts\u002Finspect_gait.py), which evaluates bounded fixed phases rather\nthan sleeping or opening PyBullet.\n\nTorque conversion:\n\n```python\nimport numpy as np\nfrom rex_gym.model.motor import MotorModel\n\nmodel = MotorModel(motors_num=12, torque_control_enabled=False, kp=1.2, kd=0.0)\ntau_actual, tau_observed = model.convert_to_torque(\n    motor_commands=np.zeros(12), motor_angle=np.zeros(12),\n    motor_velocity=np.zeros(12), true_motor_velocity=np.zeros(12),\n)\n```\n\nFor position control, `motor_commands` are target angles. For torque control, construct\n`MotorModel(12, torque_control_enabled=True)` and supply PWM-like commands in `[-1, 1]`;\nthe implementation clips them before its DC-motor calculation. All five input arrays\nmust broadcast to the motor count in normal use.\n\n## Constants and limits that matter\n\n- `Kinematics` uses body dimensions `x_dist=0.23`, `y_dist=0.185`, and default foot\n  height `0.2` metres. Its default frames are\n  `[[.115,-.0925,-.2],[.115,.0925,-.2],[-.115,-.0925,-.2],[-.115,.0925,-.2]]`.\n- `mark_constants.MARK_LIST` is `['base', 'arm']`. `MARK_DETAILS['motors_num']` is\n  12 for `base` and 18 for `arm`; the arm's six rest values are\n  `[-1.6,-1.6,0,0,1.6,0]`.\n- `INIT_POSES` supplies named 12-value poses such as `stand`, `stand_ol`, `gallop`,\n  `stand_low`, `stand_high`, and `rest_position`. These values are radians despite\n  their source being plain arrays. `ARM_POSES['rest']` is six radians.\n- Motor defaults are `kp=1.2`, `kd=0`, voltage `32`, resistance `0.186`, torque\n  constant `0.0954`, and zero viscous damping. PWM is clipped to `[-1,1]`; observed\n  torque is clipped to ±5.7; net voltage is clipped to ±50 before the empirical\n  current\u002Ftorque interpolation. Strength ratios scale actual torque.\n\n## Scope boundary and limitations\n\nIK clamps the cosine-law domain to ±0.99 (not ±1) when a target is unreachable, so a\nreturned angle is a bounded fallback rather than proof that the pose is reachable.\nThe solver is a geometric model: it does not validate joint limits, collisions,\ncontact, terrain, balance, or rewards. The gait planner is an open-loop trajectory\nreference; it does not guarantee foot contact or stable locomotion. The motor helper\nmodels torque\u002FPWM and does not itself simulate PyBullet, thermal shutdown, or policy\nlearning. Keep task semantics and evaluation in the routed sibling skills.\n\nRead the detailed links above before changing conventions; then run the relevant\nself-contained inspector and compare shapes, phase, ordering, and clipping behavior.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill locomotion-modeling",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill locomotion-modeling",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill locomotion-modeling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling\u002FSKILL.md",[49,55,59],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",6718,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fmotion-and-control.md",7630,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling\u002Freferences\u002Fmotion-and-control.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ftroubleshooting.md",6803,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Frex-gym\u002Fsub-skills\u002Flocomotion-modeling\u002Freferences\u002Ftroubleshooting.md",[64,72,77,84,91,98],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":73,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]