Logotipo de Debug Physics

Debug Physics

OrganizaciónPopular
AgibotTech
debug-physics

Diagnose physics misbehaviour in the Genie Sim RT Engine — robot swings on spawn, contacts tunnel, joints drift past their limits, cloth blows up, the convex-hull proxy renders instead of the visual mesh, or the wrong physics backend is active. Walks the user through the engine's debug toggles (visualizers, marker array, GL viewer, `init_*` teleport, backend swap) and the common failure-mode fixes. Trigger: When the user reports "robot swings at start", "objects float / sink into the floor", "contact tunnelling", "joint went past limit", "robot vibrates / explodes", "shelf looks like a convex hull", "wrong gripper poses", "newton vs physx vs mjwarp difference", or asks to "debug the physics".

Descripción general

EditorAgibotTech
Repositoriogenie_sim
Nombre de la habilidaddebug-physics
Estrellas
1.4K
Forks
119
Archivos incluidos
Solo instrucciones
LicenciaMPL-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por AgibotTech en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Debug Physics en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/AgibotTech/genie_sim/tree/main/source/geniesim_ros/skills/debug-physics
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgibotTech/genie_sim.git /tmp/genie_sim
mkdir -p .claude/skills
cp -r /tmp/genie_sim/source/geniesim_ros/skills/debug-physics .claude/skills/debug-physics
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Debug Physics en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Debug Physics automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Debug Physics no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

When to Use

  • Visual / kinematic glitch on launch (swing, drift, float, sink).
  • Contact behaviour wrong (tunnelling, no contact, no friction).
  • Solver-specific symptoms — works on PhysX but not Newton, or vice versa.
  • Render proxy showing instead of visual mesh (convex-hull look).
  • Joint exceeds URDF <limit> and MoveIt rejects the start state.

Do not use for:

  • Launch errors before physics even runs → check build-workspace skill output first.
  • MoveIt planning failures with sane physics → that's moveit-wbc, in particular the fix_start_state + start_state_max_bounds_error knobs.
  • Performance tuning (low FPS, JIT compile time) — different topic.

Critical Patterns

  1. init_base_pose / init_joint_pos are non-physics teleport. The engine writes them to USD attributes before world.reset() on PhysX and to model.joint_q + control.joint_target_pos before the first solver tick on Newton — drive error is zero at t=0, so no startup swing. If you see a swing, your launcher / scene yaml is bypassing this path.
  2. init_joint_pos is JSON-encoded, not a launch list. launch_ros mangles list-typed params; the engine reads init_joint_pos_json and decodes. Always edit it in scene yaml, not on the CLI.
  3. The convex-hull look means the visual mesh was stripped. The engine blocks the physics:approximation token when collisionEnabled=False, so the GL viewer renders the visual mesh. If you still see the proxy, the USD set collisionEnabled=True with a convexDecomposition approximation and the visual mesh is missing.
  4. Backend swap is one-arg. Whenever you suspect engine bugs, re-launch with the other launcher: launcher_ovrtx_isaac_physx (stable) vs launcher_newton_mjwarp (rigid, mujoco-warp). If only one backend reproduces, the issue is solver-side, not asset-side.
  5. Use the GL viewer for ground truth. Newton-standalone + inline OVRtx can mask geometry issues with photoreal lighting. The Newton GL viewer renders raw visual + collision meshes, so it's the right tool for "is the asset actually there".

Decision tree

Symptom: robot swings violently on spawn

CheckWhat to do
Was init_joint_pos set?Add to scene yaml under the robot block.
Did the swing happen on PhysX?Engine seeds state:angular/linear:physics:position before world.reset(). If swing returns, you're on an old build — rebuild via build-workspace.
Did the swing happen on Newton?Engine writes model.joint_q + control.joint_target_pos + syncs state_0.joint_q + calls eval_fk in _phase_finalize_init_state before _warmup. Confirm with cat source/geniesim_ros/src/ros_ws/src/genie_sim_engine/scripts/engine/newton/setup/init_pose.py
Mimic followers still swing?Mimic states are trivial — they ride the constraint. If they swing, the master joint init pose is wrong, not the follower.

Symptom: contact tunnelling / objects sink through floor

CheckWhat to do
Backend?Try the other launcher — PhysX 5 vs mujoco-warp have very different defaults.
Was collisionEnabled=False set on the floor / object?The engine strips the physics:approximation token only; if the whole CollisionAPI is disabled it'll fall through. Re-enable in the USD.
Soft joint limit drift?MoveIt URDF limits are padded ±0.01 rad / ±0.001 m at launch (see wbc.launch.py). For the engine itself, raise the URDF <limit> if real contact load is pushing past it.
MuJoCo soft contact?mjwarp uses a softer contact model than PhysX; reduce solref / solimp in the scene mjcf injection block.

Symptom: shelf / object renders as a convex hull

CheckWhat to do
GL viewer or OVRtx?OVRtx renders visual mesh; GL viewer renders both visual + collision. If only GL shows the hull, that's expected — toggle off the collision layer.
collisionEnabled value on the primIf False, the engine should not be authoring a collision shape at all. If a hull renders, the USD still has physics:approximation=convexDecomposition. The engine blocks that token at load — rebuild via build-workspace if not.
Recently merged scene?Re-run assemble_scene.py (rm -rf assets/scenes/<scene>/ + relaunch).

Symptom: gripper poses wrong / EEF off

Common one for omnipicker / swiftpicker — verify:

  • Scene yaml gripper: matches the URDF you built MoveIt for.
  • MoveIt's (arm, gripper) matches the engine's. See moveit-wbc.
  • EEF_ABS payloads use arm_base_link framing (not base_link) — this was the most common confusion before commit 6391cdcf6.

Toggles & visualizers

bash
# Newton GL viewer (rigid only, kit-free) — see raw geometry:
ros2 launch genie_sim_bringup app.launch.py \
  scene:=<SCENE> \
  launcher_config:=launcher_newton_mjwarp \
  headless:=false   # local workstation with a screen; flip to true on a remote/headless host

# Debug marker / pointcloud publishers (enabled in the launcher yaml):
ros2 topic list | grep -E "marker|pointcloud|debug"
ros2 topic echo /debug/contacts                      # contact normals + impulses
ros2 topic echo /debug/init_pose                     # confirms init_* applied

# Compare runtime USD against source:
cat assets/scenes/<scene>/robot_runtime.usda | head  # post-strip / post-overrides

Per-scene viewer-camera pose is configurable in the scene yaml:

yaml
viewer_camera:
  pos:    [1.6, -1.6, 1.2]
  lookat: [0.0,  0.0, 0.8]

Backend swap as a bisection tool

When in doubt, run the same scene through both stable launchers and diff the behaviour:

bash
ros2 launch genie_sim_bringup app.launch.py scene:=<S> launcher_config:=launcher_ovrtx_isaac_physx
ros2 launch genie_sim_bringup app.launch.py scene:=<S> launcher_config:=launcher_newton_mjwarp
  • Same misbehaviour on both → asset / scene yaml bug (URDF inertia, init_pose, collision flags).
  • Different misbehaviour → solver-tuning bug (gains, contact compliance, integrator step).

Commands (copy-paste summary for the user)

bash
# 1. Force scene regenerate to rule out a stale cache
rm -rf assets/scenes/<scene>/
# OR:
ros2 launch genie_sim_bringup app.launch.py scene:=<S> launcher_config:=launcher_ovrtx_isaac_physx always_regenerate_robot_usd:=true

# 2. Try the other backend (bisection) — flip headless to true on a remote/headless host
ros2 launch genie_sim_bringup app.launch.py scene:=<S> launcher_config:=launcher_newton_mjwarp headless:=false

# 3. Inspect debug topics
ros2 topic list | grep -E "marker|debug|contacts"
ros2 topic echo /debug/contacts

# 4. Inspect the runtime USD
cat assets/scenes/<scene>/robot_runtime.usda

Notes

  • All launcher_newton_* rows except launcher_newton_mjwarp are experimental — physics, perf, and yaml schema can break between commits. Use them when you specifically need cloth / soft body or are intentionally testing a solver, not as a general fallback.
  • The _apply_init_base_pose helper writes to the session layer with a unique suffix, so re-launching doesn't accumulate xformOpOrder ops. Safe to relaunch repeatedly.
  • The OVRtx first-frame banner is one-shot, not a heartbeat — shader compile holds the GIL inside a C extension, so there's nothing to tick. If the banner sits without progress for >2 min, the compile cache is missing (rebuild the docker image's shader cache mount).

Resources

Preguntas frecuentes

¿Qué hace la habilidad de IA Debug Physics?

Diagnose physics misbehaviour in the Genie Sim RT Engine — robot swings on spawn, contacts tunnel, joints drift past their limits, cloth blows up, the convex-hull proxy renders instead of the visual mesh, or the wrong physics backend is active. Walks the user through the engine's debug toggles (visualizers, marker array, GL viewer, `init_*` teleport, backend swap) and the common failure-mode fixes. Trigger: When the user reports "robot swings at start", "objects float / sink into the floor", "contact tunnelling", "joint went past limit", "robot vibrates / explodes", "shelf looks like a conv...

¿Por qué usar Debug Physics en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Debug Physics está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Debug Physics en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/AgibotTech/genie_sim/tree/main/source/geniesim_ros/skills/debug-physics. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Debug Physics?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Debug Physics?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Debug Physics con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Debug Physics?

Sí. AgibotTech la ha publicado en GitHub bajo la licencia MPL-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇