Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 03:01
· 102 commits to main since this release

Reliability, usability, functions and speed (23 to 25 November)

The audit of 23 November and the work it asked for; each item was reviewed by experiment (a test that fails without
it). The physics audit of 21 and 22 November follows below it.

Changed

  • sim-cli exits with 1 when a judged row fails (verdicts, also with --bands and --worst, margins, stop,
    accuracy, report); 0 when all pass; 2 stays for usage and config errors. The table is printed in full first.
    Scripts that read the exit code of these commands as "ran through" must accept 1: the overhead crane's shipped
    config fails one check (its input shaper is off by default), and a worst case that fails under --bands counts.
  • The MCP server refuses a config value that names a file (a key ending in _file, such as arm.urdf_file or a cam's
    table_file) unless it is empty, the machine's built-in value, or a file of at most 5 MB inside the folder the
    operator names in KINEMATICS_SIM_MCP_IN_DIR; the refusal does not tell whether the file exists. TOML text the
    server's own parser cannot read is refused before the core reads it; on Python 3.10, which has no TOML parser of
    its own, any TOML text that holds _file or an escape is refused.
  • The optimiser's refusal of a cycle that fails as configured has a message of its own ("The cycle as configured
    already fails: ..."), no longer "Configuration value is out of range", and names the failing checks by their labels,
    each once (a linear motor's speed in m/s), in the app and at the command line.
  • The web page's plain wheel scrolls the page; Ctrl + wheel (or a trackpad pinch) zooms the 3D view and the plots. On
    touch a vertical swipe scrolls past the view.
  • The app's window title is "Kinematics Simulation"; its speed slider goes up to 10.
  • The steps of the T-gantry (its default cycle 38 % faster), the spatial cable robot (18 to 36 %) and the rotary
    hexapod (6 %) are cheaper: no heap allocations in their derivatives and forward kinematics, the cranks' terms worked
    out once per call. Every output is unchanged.
  • drive.notch_frequency_hz = 0 is no notch for that motor (effects.notch_filter stays machine-wide).
  • CI: the long sweeps of the loops' margins across the bounds run weekly and by hand, no longer on a push to main
    (since the margins are measured at every pose of the cycle they take hours), in fifteen groups of up to 6 hours.

Added

  • A result that is not finite (an unstable loop, or a winding that heats without end) is named: sim-cli says so on
    the error stream after verdicts, stop and accuracy, with a pointer to sim-cli margins; the app says it once
    per analysis.
  • sim-cli --version and -V; sim-cli help, help COMMAND and COMMAND --help (one command to a line, a command's
    options, the topics options, paths, units); a usage error names the command's help in one line.
  • Config errors at the command line name the nearest key of a misspelt one and show the value that is out of range,
    with the limit it broke wherever a shared reader refused it (above 0, not negative, finite and at most 1e15), in the
    machine, the drive model and the analyses; a check made elsewhere shows the value, a machine file's node path
    neither.
  • Long analyses can be watched and stopped: Progress, with_progress and Cancelled in sim_components::analysis
    (every batch of runs counts into the job and stops taking runs once it is cancelled; a run already started is
    finished), Job and Cancelled in the Python module, a progress bar and a Cancel button for the app's long
    computations (checks with bands, sensitivity, optimiser, tuning, report, band traces, motor search, kinematics
    comparison). Switching the machine or opening another file stops the jobs under way.
  • MCP server: a call given up at its timeout or cancelled by the client stops computing; its progress notices carry
    the time used of the timeout and the runs done of those planned; a panic of the core is an error of the tool, not
    the end of the server; at most 32 sessions (the least recently used is dropped) and limits on runs, points and
    repeats; loop_margins takes top and orders its rows worst first.
  • App: messages at the top of the left panel on every tab; undo and redo of config edits (Ctrl+Z, Ctrl+Y), a
    "modified" mark and a Save / Discard / Cancel question before a machine switch or closing the window drops edits;
    language, theme, units, speed and the last config file are remembered between starts (settings.toml in the
    user's config folder, SIM_APP_SETTINGS for another file); the Parameters tab has a filter, the config path on
    hover, a list of the values changed from the default and catalogue drop-downs for motor, supply, gearbox, drive,
    axis and belt. Opening a config or machine file over unsaved edits asks first too; its Save writes the file the
    config was last opened from or saved to (the file dialog where there is none or it was a JSON machine file), never
    the one being opened. A JSON machine file is reopened at the next start.
  • Web page: Shift + drag or a right or middle drag pans, a double click or "Fit" fits the view again, "+" and "−"
    zoom; on touch a sideways swipe turns the machine, and two fingers pinch, pan sideways and tilt (their vertical
    movement) without scrolling the page.
  • sim-cli tune MACHINE [--phase-margin DEG] [--gain-margin DB] [--no-notch] (sim_components::tune::velocity_loops):
    each motor's largest velocity gain that keeps the least phase and gain margin over the cycle's poses at 35 degrees
    and 6 dB, the position gain with it, and a notch on a machine mode that holds the gain back; the margins before and
    after, ready-to-paste --set words, exit code 1 where the targets are not met; it can be watched and stopped as
    the other analyses. It looks at the poses, not across the bounds: margins --bands afterwards (the single axis's
    and the rotary knife's shipped gains are lower than tune's because they hold over their bounds).
  • sim-cli parameters MACHINE [--family s120|s210]: for each motor the SINAMICS S120 servo or S210 parameter that
    takes each drive setting (number, name, unit, the value converted), each marked as printed in a Siemens document,
    derived, or without a parameter; tables siemens/parameters_s120.csv and parameters_s210.csv with their pages.
    An aid for commissioning, to be checked against the drive's firmware.
  • A twin can be judged: sim-cli replay --tolerance NAME=LIMIT,... (RMS and peak limits per signal) and sim-cli fit --within N (each fitted value at most N standard errors from the config) say ok or FAIL with exit code 1;
    sim-cli fit --write FILE [--sigmas K] writes the fitted belt stiffness and its K-sigma band ([bounds]) into a
    config. Lumped values (the moved mass, friction, the payload factor) are named and not written: no single key holds
    them. The written file keeps neither comments nor key order.
  • sim-cli search --prices FILE: the user's own price list (part_number,price, in one currency of the user's
    choice; no vendor publishes prices) adds a price column, ranks by it, and names the part numbers it lacks; a
    candidate's price counts every motor's own parts, the axis by its screw and carriages; --rank-by price, also in
    mixes. The app and the Python module refuse a ranking by price (they take no price list yet).
  • Drive derating: ratings.drive_ambient_c, ratings.drive_altitude_m and ratings.drive_pulse_frequency_hz derate
    the rated and base-load current of an S210 converter (Table 12-9 of its operating instructions) and of an S120
    Motor Module (altitude, ambient and pulse frequency multiplied, this simulator's assumption on the safe side; Siemens
    does not say how they combine). The maximum current is not derated (Siemens does not say). A condition beyond the
    documents' range, for another maker's drive or without a catalogue drive is refused; the search marks a derated
    drive as estimated. Tables siemens/derating_s210.csv and derating_s120.csv.
  • G-code: G4 P dwell, G61, G64, G64 P (P0 = G64), and profile.feed_override (above 0, at most 2) on the
    programmed feed of G1, G2, G3 and of RAPID and KRL moves (not G0, never above the axes' limits); a change of mode
    stops at its corner. Where this differs from LinuxCNC is in the user guide.
  • Verdict self-collision: the machine's own parts against each other in the run and in the plan, against
    profile.min_clearance_m. Parts in contact at the start pose count as joined (an arm's links by their order); a
    time-optimal path that brings two parts that close is refused; a machine with fewer than two parts says "not
    checked". On the H4 delta two neighbouring rods start within the clearance and are therefore not compared
    (docs/model-reference.md).
  • Catalogue: Bosch Rexroth BSHP ball runner blocks (61 rows, C for 100 km as printed) and THK SHS and HSR guides (59
    rows), named as guide sets (FNS25x4, SHS25Cx4) and offered by the guide search; Festo ELGA-TB-KF-F1, -RF and
    -RF-F1 (belt_axes_elga.csv 16 rows) with the travel their loads are stated for, an RF slide screened on Festo's
    5000 km basis.
  • --set (and the app, the Python module, the OPC UA server and the web page) adds a key a config file may have where
    this one has none: a motor's own [drive.<id>] value, ratings, the installation conditions, the feed override; a
    misspelt key is still refused with the nearest one.

Fixed

  • --catalog DIR refuses a table with a missing column or a short row, naming the file and the column or line; such
    a table made the program panic later. A blank line in a table is passed over.
  • A machine file loaded again (a Python sweep, an FMU made in a loop, the CLI's second load) is the same entry; each
    load leaked an entry before.
  • MCP server: loop_margins could cut off its worst row at the cap of 25.
  • The dataset report's "Apart" table was empty since the fit table gained its units column.
  • The S120's balancing of the speed precontrol is p2536, not p1429 (configs, docs); its ramps p1121 and p1135 run
    from the maximum speed p1082.

Physics audit (21 and 22 November)

Details, measurements and the tests behind each item are in
estimates-and-open-items.md sections 4 and 10 and in
model-reference.md.

  • Obstacle contact: every machine takes an obstacle's push on its contact coordinates (the tool, the crane's hook
    block or payload, the winder's dancer), through each machine's own equations, so a load behind a soft belt or gear
    stops at the face (F / k) instead of swinging on by the transmission's give; finer sub-steps while pushed, the push
    on a compliant base's coordinates once, the crash budget closing to 3e-5 of the supply or better.
  • Numerics: a gearbox's switch between driving and driven back and a stiff joint stop are resolved by cutting the
    base step where they are stiffer than it (the model unchanged; default cycles bit-identical).
  • Modes: each mode's damping from the damped eigenproblem; machine files report every mode with its damping; the
    app's mode list pairs a mode with the held-motor linearised model, never a friction pole; the five-bar's mode shape.
  • Loop margins and backlash kicks over the cycle's poses (sim-cli margins, a row per pose), a describing-function
    margin across a gearbox's play (play_margin_db); the velocity and position loops of the T-gantry, URDF arm, arm on
    a track, palletiser and rotary knife retuned to keep 35 degrees and 6 dB at every pose.
  • Screws: the stiffness at the nut in the fit's twist, the mesh bristle and the rest sag; the hysteresis behind a
    screw on the gear's own twist; the crane's second input shaper takes the upper sway, not the rope's bounce.
  • Machine files: real belt loops with far idlers (XYZ, screw and C portals, five-axis, dual and rack gantries), a
    plane per belt, the T-gantry file equal to its crate in momentum and in the belt riding on the beam's mode.
  • New effects (off as shipped where they move shipped figures): the T-gantry belt runs on the beam mode and beside the
    leaning Z axis (effects.belt_run_offset), the hexapod rotors' gyroscopic push (effects.rotor_gyroscopic), cable
    inertia, sway and drum geometry (effects.cable_inertia, frame.run_lengths_m), belt-to-pulley heat in the linear
    delta (effects.belt_pulley_conduction), the joint kit's parallelogram rod and crank, a general four-bar, bars on
    bending links, the rod's stiffness (effects.bar_elasticity) and the forearm rocking on it (effects.bar_rocking),
    one-way bends as a two-shape Ritz basis (within 0.5 % of the exact beam), the crane hook block's contact with the
    payload's top and sides, the stepper's detent while disabled or coasting, frame momentum for the mover track, the
    indexers and the scissor file.
  • Fixed: the crane app path test depended on timing (judged now by the middle of one swing); a machine file's push
    counted twice on a compliant base; the PLC link reports a crash with ErrorID 8; run files without setpoint_age
    rebuild it from their timing.

Added

  • effects.screw_stiffness_with_position and screw.fixed_bearing_at_m: a ball screw's axial stiffness follows the
    nut (the shaft E A / a between the fixed bearing and the nut, in series with nut and bearings) in the dynamics, the
    modes and the equilibrium at a pose, with the nut's travel force T² c′ / 2 from the spring's energy. The wafer
    handler's column rings at 438 Hz with the nut 0.1 m from the bearing against 321 Hz at the far end. The screw's
    damper keeps its ratio screw.axial_damping_ratio along the stroke (c ∝ √k, the series dampers and the Maxwell
    arm laid out at the nut's place, the arm's store booked like the spring's): the column's damping 0.042 at 0.1 m
    where the far end's damper held gave 0.029.
  • MCP server for LLM clients (kinematics_sim.mcp, the extra kinematics-sim[mcp] with mcp>=2.3,<3, the console
    script kinematics-sim-mcp; uvx --from "kinematics-sim[mcp]" kinematics-sim-mcp): 17 tools (machines, configs as
    named sessions with dotted-path get and set and a diff, sizing verdicts with margins, meanings and bands, cycle
    analysis, inline paths, catalogue search, optimiser, loop margins, accuracy, sensitivity, report and FMU), compact
    JSON with capped tables and a notes field with the limits, a timeout (KINEMATICS_SIM_MCP_TIMEOUT_S, 900 s) and
    progress; a resource with the model's limits and a prompt "size a motor". The report and the FMU are written only
    into an output folder the operator sets (KINEMATICS_SIM_MCP_OUT_DIR), never over a file unless
    KINEMATICS_SIM_MCP_OVERWRITE=1, the FMU's sim-fmi library from KINEMATICS_SIM_FMI_BINARIES or beside sim-cli. docs/mcp.md has the client
    configuration for Claude Desktop, Claude Code and Cursor, a worked example, and a section on using sim-cli from a
    coding agent with real outputs. llms.txt at the repository root and on the project site indexes the docs for
    LLMs. Python ks.label(cfg, key) gives a message key's text (a verdict's meaning). The Python package is now a mixed
    one (crates/sim-py/python/kinematics_sim, the native module inside it); import kinematics_sim is unchanged.
  • Validation dashboard on the project site (/validation/): every check of docs/validation.md with the outcome of
    its tests in that run, a link to each test's source line and, where the test records them, the reference, the
    simulated value, the difference allowed and the margin left. Made by tools/validation_dashboard.py (standard
    library only) from the tables, nextest's JUnit file and the values the tests write with
    sim_core::testkit::record_check to the file KS_VALIDATION_OUT names (nothing without it). The rustdoc of the
    workspace is published under /api/. See docs/dashboard.md.
  • Positioning accuracy and repeatability (sim-cli accuracy, Python ks.accuracy, sim_components::accuracy): each
    tool axis run through ISO 230-2's linear cycle (targets approached from below and above, --points, --repeats,
    --dwell), reported per target and per axis (B, R, E, M, A) and at the tool along ISO 9283 (AP, RP, vAP); verdicts
    positioning-accuracy and positioning-repeatability against the optional ratings.max_positioning_error_m and
    ratings.max_repeatability_m. Two optional effects for the axes of [accuracy]: effects.thermal_growth (screw
    11.5e-6 / K, belt 11.5e-6 / K [estimate], from a given rise and a heated part's) and effects.lead_error (a pitch
    error table); off where a config does not have them.
  • sim-cli fit --dataset DIR --report OUT: one report of a dataset folder. Every trace recording replayed on the
    dataset's machine and config, the torque difference (RMS and worst sample, in N m and as a share of the peak) on the
    fit recording and on the checks, the free values fitted on the first recording against the config's with their
    standard errors, the config's [bounds], each frequency response's resonance against the model's first mode; as
    Markdown, CSV and SVG plots. On the ISW ball screw it gives the figures of docs/validation.md.
  • datasets/RESULTS.md, one row per dataset, generated from the reports by a test (UPDATE_RESULTS=1 rewrites it),
    linked from the README's validation table.
  • Dataset keys machine.simulator (the machine the recordings are replayed on) and machine.set (values on top of the
    config); a step-by-step contribution guide in docs/measurement-procedure.md (what to record, sample rates, layout,
    licence, metadata), a fuller datasets/template, and the GitHub issue form "Offer a measured dataset".
  • effects.screw_lead_efficiency and screw.friction_coefficient (0.003, THK's general value): a ball screw's
    efficiency from its lead angle, (1 − μ tan β) / (1 + μ / tan β), in place of the catalogue's screw.efficiency that
    also holds the nut's preload drag, which the model drags apart. Off in every shipped config but the measured ISW
    bench's machine.toml; off keeps the old results to the bit.

Changed

  • The ISW ball screw bench (datasets/isw-ball-screw-axis/machine.toml): the screw's efficiency from its lead (0.990
    for 0.9) and the Coulomb friction fitted again on the S-profile (× 1.115: guides 97.7 N, nut preload 1953 N, motor
    shaft 0.293 N m). S-profile replay 5.3 → 4.6 % RMS, checks 13.3 → 13.1 % and 6.1 %; fitted moved mass 57 kg below
    the config's 549 kg (92 below 584 before); first mode unchanged at 137 Hz. The screw shaft's inertia and the
    efficiency on the inertial force, named as missing in 1.0.0's notes, were already modelled: docs/validation.md.
  • Global sensitivity over a config's [bounds]: sim-cli sensitivity <machine> --method morris|sobol [--samples N] [--seed S] [--result NAME] [--group TABLE], Python ks.global_sensitivity (module sim_components::sensitivity).
    Morris' elementary effects (μ*, μ, σ) as a cheap screening, Sobol' first-order and total indices (Saltelli sampling,
    Jansen estimators) with bootstrap 95 % intervals; per result (the verdicts' margins, peak and RMS torque, winding rise,
    path and dwell error) a ranked CSV and "measure these first" on the error stream; runs on all cores, deterministic for
    a seed. Checked on the Ishigami function and a linear model with known indices.
  • The verdict belt-slack is now belt-least-tension: its value is the lowest belt tension, which has to stay above
    ratings.belt_min_tension_n, and a row "belt-slack,,169.8,0,ok" read as 169.8 of slack against none allowed.

Release polish (session 12)

  • Releases: SHA256SUMS over every file of the release, a GitHub build provenance attestation for each of them
    (zip, MSI, tarballs, .deb, FMUs) and for the Python wheels and sdist (gh attestation verify FILE --repo ...); a
    macOS build (one universal tarball, arm64 and x86_64, unsigned; the README says how to open it) and the darwin64
    binary in the FMUs, both left out with a warning when the macOS build fails.
  • .github/workflows/bench.yml: the Criterion step and cycle benches of every machine on each push to main and by hand, compared
    with the last run on main by tools/bench_compare.py; a median over 15 % slower with the 95 % intervals apart gives
    a warning, never a failure.
  • Every crate has publish = false (CI's lint checks it): the product ships as binaries, wheels and FMUs, not on
    crates.io (CONTRIBUTING.md).
  • examples/README.md opens with a gallery of eight recipes, one per question users ask (will this motor do it, the
    cheapest motor, how fast a path can go, an E-stop, the energy, input shaping, a fit from a drive trace, an own
    controller in Python or through the FMU), each with its command, its output and what to read from it; the new
    examples/fmu_controller.py drives the FMU in torque mode with fmpy.
  • Machines geneva-drive and cam-indexer (crate machine-crank-cam): a rotary indexing table of six stations
    stepped by a Geneva wheel (exact wheel angle, speed and acceleration, the acceleration step at the pin's entry and
    exit) or by a cam index drive with the modified sine; checks indexer-contact-force, index-accuracy (the lock's play
    in the dwell) and index-settling (the table's ring after each index).
  • kinematics.redundancy for the URDF arms in tool space: "joint_limits" spends a redundant arm's spare joint on
    keeping the joints off their stops (the null space towards the middles of their ranges), "home" (as before) on
    staying near kinematics.home_joints.

Changed

  • Speed: the hexapod, the platform on cranks and the spatial cable robot run faster than real time on one core (2 s of
    their default cycles in 0.94, 1.39 and 1.48 s of processor time, from 1.33, 1.84 and 2.39 s). Their dynamics start
    the forward kinematics from the last call's pose (Mechanism::memory carries it for snapshots); the cable robot's
    elastic forward from its last pose and Jacobian. The cable robots' cycle figures are unchanged to 1e-9; the
    hexapods' move by up to 1.1e-4, as rounding-level changes of the pose move them anyway (docs/validation.md).
  • App: a "Loop response" tab: per motor the Bode plot of the velocity loop (open loop, closed loop, and the plant from
    motor torque to speed) with the margins, the machine's resonances and the shaper's and notch filter's frequencies
    marked, and the Nyquist plot around -1; measured in the background with progress and cancel.
  • sim-cli margins (and Python margins) measure at the machine's resonances too and refine the sweep where the loop
    or the plant changes fast (analysis::refinement), so a sharp resonance between two of the 60 points is not missed.

App: layout at 1280 x 720, run differences

  • The side panels no longer widen with what a tab holds: a combo box at the end of a wrapped row in the Search tab
    widened the tools panel from 430 to 524 pixels at 1280 x 720 (the effect views by 22, the German parameters the
    setup panel by 8), taken from the 3D view, and it stayed so. Their contents are now laid out in the panel's width.
  • The 3D view's controls fold to their first row (presets, Record, "More…") where the view is under 500 pixels tall:
    at 1280 x 720 the opened controls covered half of the 418-pixel view. "More…" / "Less" opens and folds them.
  • The runs tab's key figures have a column per kept run less the reference ("Δ" and its label; for the checks, the
    failed ones less the reference's).
  • Lists in wrapped rows (motor search, move map, effect comparison) go to the next line where they do not fit.
  • The camera frames the machine clear of the folded controls and the timeline (56 pixels at the top and bottom): the
    six-axis arm's top was under the controls and its base under the timeline.
  • Window test at_1280_by_720_the_panels_keep_their_widths_and_the_view_stays_free.
  • Machine mover-track (crate machine-mover-track): independent movers on a closed track of linear-motor segments, as
    Beckhoff XTS or B&R ACOPOStrak (six movers on two straights of 250 mm modules and two 180° clothoid curves, XTS data
    where published). Each mover a linear-motor joint with its own drive; lateral acceleration and jerk over the rollers'
    wheelbase (clothoid or constant radius), roller load and lift-off against the magnets' attraction, segment currents and
    heating from the movers' coil currents, the gap between movers. Two cam cycles: indexing through stations
    (default.toml) and a flying process synchronous with a conveyor (flying.toml). Checks mover-guide-load,
    curve-holding, station-settling, mover-gap, segment-current, segment-temperature.
  • Machine overhead-crane (crate machine-overhead-crane): a single-girder overhead crane of 250 kg, bridge, trolley
    and hoist on Siemens 1FK2 and S210, the load a spherical pendulum on an elastic rope that goes slack
    (effects.rope_stretch, off the rigid rope; rope_damping, guide_friction); its sway acts back on both travel
    drives. Checks rope-max-tension, rope-min-tension, residual-sway, hoist-brake. The input shaper follows the
    sway's period of the rope's length (resonance_hz, effects.shaper_follows_pose); the default cycle (travel while
    lowering, back, pick, hoist) passes with it and leaves the load swinging without. Hand calculations (pendulum period, static
    stretch, the energy of a lift) and a SciPy reference of a trapezoidal trolley move.

Python: pip install "kinematics-sim[mcp]==1.1.0". Checksums of every file are in SHA256SUMS.