Mechanism Simulate Submit
mechanism_simulate_submitSubmit an asynchronous PyBullet simulation of rigid-link mechanism dynamics to obtain trajectories, joint torques, and through-motion collisions; poll the returned job ID for results.
Instructions
Simulate a rigid-link mechanism's DYNAMICS with PyBullet, asynchronously (the
MBD family; requires the mbd extra — pip install 'ankusdrive[mbd]'). Use
mechanism_kinematics first for the exact closed-form gates (DOF, Grashof, stroke).
links is a tree: [{name, box_mm:[lx,ly,lz], mass_g, parent (link index, −1 =
fixed base), joint_type ('revolute'|'prismatic'|'fixed'), joint_axis:[x,y,z],
joint_at_mm:[x,y,z] (in the parent frame), com_mm:[x,y,z]}]. drivers:
[{link, rate_dps}] (revolute) or [{link, rate_mm_s}] (prismatic). Optional
obstacles ([{box_mm, at_mm}]) for through-motion contact, base, gravity
(m/s², default [0,0,−9.81]), dt_s, duration_s. gears
([{link_a, link_b, ratio, axis?, max_force?}]) couples two revolute links by
ω_b = −ω_a/ratio (ratio = Nb/Na for an Na/Nb external mesh) — the moving image of
the gear-train ratio gate.
Returns immediately. If PyBullet is absent: {ok:false, reason, install, mobility_dof, n_links}. Otherwise {job_id, status, cache_hit, mobility_dof}; poll job_result(job_id) for {trajectories, orientations (per-link world quaternion, sampled with trajectories), max_torques, collisions_through_motion (with the sim time of each contact), reachable_envelope {bbox_mm}, mobility_dof}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"links": "<links>"
},
"name": "mechanism_simulate_submit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | ||
| dt_s | No | ||
| gears | No | ||
| links | Yes | ||
| drivers | No | ||
| gravity | No | ||
| obstacles | No | ||
| workspace | No | Run this call in this named workspace | |
| duration_s | No | ||
| loop_closures | No |