Matlab Robotics Autonomy logo

Matlab Robotics Autonomy

Community
wzyn20051216
matlab-robotics-autonomy

MATLAB robotics and autonomy workflow for rigid-body transforms, quaternions, forward/inverse kinematics, trajectory planning, rigid-body dynamics, ROS/ROS 2 bags, sensor fusion, state estimation, SLAM, and reproducible robot experiments. Use whenever the user asks MATLAB to verify a rotation or quaternion, compute FK/IK/Jacobians, check a trajectory against waypoints and limits, check dynamics (M/C/g, energy), or judge whether a recorded state estimate is consistent with its covariance. Missing toolbox, bag, robot model or hardware means SKIP, never a claimed result.

Overview

Publisherwzyn20051216
Repositorymatlab-agent-skills
Skill namematlab-robotics-autonomy
Stars
32
Forks
1
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wzyn20051216 on GitHub. Read the source before you install it.

Installation

Install the Matlab Robotics Autonomy AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-robotics-autonomy
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wzyn20051216/matlab-agent-skills.git /tmp/matlab-agent-skills
mkdir -p .claude/skills
cp -r /tmp/matlab-agent-skills/skills/matlab-robotics-autonomy .claude/skills/matlab-robotics-autonomy
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Matlab Robotics Autonomy in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Matlab Robotics Autonomy on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Matlab Robotics Autonomy is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

MATLAB Robotics Autonomy

Use this skill when the deliverable is a pose, a motion, a torque, or a state estimate that another engineer will act on. A plot of the arm or a smooth estimate trace is not evidence: a sign error in a Jacobian drives the tip the wrong way, and a filter can be smooth, stable and confidently wrong.

Skill Root

The installed directory containing this SKILL.md is the resource root. Add its helper folder for the current MATLAB session only — never through savepath, startup.m, or a global path edit:

matlab
skillRoot = '<absolute path to the installed matlab-robotics-autonomy Skill directory>';
addpath(fullfile(skillRoot, 'scripts'));

Resolve references/, tests/, and helper calls from that root, not from the caller's working directory. If a shipped helper or reference is missing, report the exact path and reinstall the Skill; do not scan the disk for a substitute.

Workflow

  1. 任务识别 — Name the frame convention, units, sign convention and the tolerance that makes the answer acceptable. State which independent route could contradict it (analytic formula, finite difference, energy, another sensor, hand algebra). A claim with no acceptance criterion has no PASS.
  2. 能力选择 — r = mas_route(prompt); confirm this skill is primary, then load only the matching tool contract below instead of the whole toolbox.
  3. 环境检查 — mas_precheck before Robotics System Toolbox / Navigation / ROS / UAV APIs. Record what is missing. Missing toolbox, bag, URDF or hardware is SKIP with the reason, never a simulated substitute reported as the real result.
  4. MATLAB 执行 — build the smallest loop first: one frame, one configuration, one recorded run. Save q, t, M, P and the inputs so a failing check can be inspected instead of guessed.
  5. 独立验收 — grade with the tools below (or mas_grade for a manifest task). Every accepted number needs a second route: rotation matrix vs quaternion, analytic derivative vs stencil, Lagrange vs kinetic energy, NEES vs covariance.
  6. 错误恢复 — a fail/UNDETERMINED is fixed for the named reason (fix the frame, supply the analytic derivative, extend the run, add the tolerance) and re-run. It is never skipped, relabelled, or averaged away.
  7. 结果交付 — report value, frame, tolerance, and verdict; cite the check ids. SKIP and BLOCKED stay SKIP and BLOCKED.

Verification tools

matlab
q = mas_quat_check(q, struct('matrix',R,'angle',a,'axis',ax,'rotvec',rv, ...
        'compose',q2,'interp',struct('qEnd',q1,'t',ts)));
q.verdict  q.qUnit  q.R  q.angle  q.axis  q.slerp  q.inverseErr

F = mas_frame_check(T);                        % SE(3) hygiene, chain closure
F.verdict  F.orthErr  F.detR  F.closureErr  F.crossCheck

K = mas_kin_check(L, q);                       % FK + J vs finite difference
K.verdict  K.pos  K.J  K.jacErr  K.condJ  K.manip

I = mas_kin_ik(L, pTarget, q0, struct('maxIter',200));   % DLS IK
I.converged  I.feasible  I.limitHit  I.stepRawMax  I.maxStep

T = mas_traj_check(t, q, struct('waypoints',wp,'vMax',4,'aMax',12, ...
        'qMin',-2,'qMax',2,'vel',V,'acc',A));
T.verdict  T.waypointErr  T.vMax  T.aMax  T.certified  T.derivErrV

D = mas_dyn_check(p, q, qd, struct('M',M,'C',C,'g',g));
D.verdict  D.skewErr  D.coriolisErr  D.gravityErr  D.energyDrift

E = mas_estimate_check(truth, est, P, struct('maxBias',0.1, ...
        'innovation',nu,'S',S));
E.verdict  E.aneesMean  E.aneesBand  E.inBandFrac  E.minEigP  E.bias

% legacy Monte Carlo route (simulated truth, not recorded data)
r = mas_ekf_check(model);

Every tool returns verdict (PASS | FAIL | UNDETERMINED) and per-check status (pass | fail | na | undetermined). na = the contract does not apply and does not drag the verdict; undetermined = missing evidence or criterion and forces UNDETERMINED. No acceptance criterion, no PASS.

Boundary rules these tools encode

  • A non-unit quaternion still yields a rotation (via q/|q|), but every derived claim is graded against the normalized value; the root cause is reported, not hidden. q and -q are the same rotation (double cover); SLERP flips the sign to take the shortest arc, and a bent path or an endpoint mismatch FAILS.
  • A zero rotation has no axis: [1 0 0] and [0 1 0] are equally valid, so the axis check is UNDETERMINED, not a pass. A 180° rotation accepts either axis sign.
  • Euler sequence is data: the same three numbers mean different orientations under ZYX and XYZ. .seq is required and echoed back; degree-valued input under angleUnit='rad' is rejected.
  • The Jacobian is checked against a central difference of the FK, and the test pins the outer sum — joint j moves every link from j outward. A per-link Jacobian is the documented wrong answer and disagrees at ~1e-1 while the correct one agrees at ~1e-9.
  • IK is DLS (J'(JJ'+λ²I)⁻¹e) with a per-joint step clamp; stepRawMax is still reported because suppressing it hides the bad configuration. Unreachable target → feasible=false, zero iterations. Joint-limit-only reachable → converged=false with limitHit=true, never the clamped pose reported as success.
  • A trajectory peak is only a sample unless analytic vel/acc were supplied (certified=false). Non-uniform time or fewer than 5 samples makes derivative claims UNDETERMINED while the sampled limits are still graded. A waypoint between samples is interpolated linearly and its miss is measured, not excused.
  • Dynamics is graded by three independent identities: Mdot − 2C skew, C qd = Mdot qd − ∂T/∂q, and g = ∂V/∂q, plus RK4 energy conservation under zero torque. The energy route integrates the claimed model when M/C/g are supplied, so a wrong C is caught by the leak it causes, not just by comparison to the reference.
  • NEES has two correct denominators: the mean over all accepted samples (nRuns×nSteps) and one step's mean over runs (nRuns). Its bands differ; using one band for both is a false FAIL. Fewer than 20 runs or 5 steps is UNDETERMINED; covariance symmetry and positive definiteness are checked before NEES, since NEES on a non-PD P is noise.
  • Innovation whiteness is a family of autocorrelation tests, so the threshold is family-wise: sqrt(2)·erfcinv(α/L)/sqrt(m·N_eff) ≈ 0.0444 for the fixture — not sqrt(2)·erfcinv(α/2). Serial correlation makes a single-lag test a coin flip.
  • Bias is a separate claim from consistency: a filter can pass NEES while biased, and a bias bound with no argument is UNDETERMINED.

Full formulas, worked numbers, negative controls and the SKIP matrix: references/robotics-verification-contract.md.

Frames, kinematics and IK in one paragraph each

mas_frame_check reports orthErr and det(R) separately: a matrix stretched 0.1 % still has det=1.001 while orthErr reads 2e-3; a reflection has orthErr=0 and det=-1. Cross-checks against eul2rotm/quat2rotm run only when the toolbox is licensed, and absence is crossCheck.checked=false, never faked.

mas_kin_check returns the analytic J and the finite-difference J. For a planar chain with absolute angles theta_i = sum_{k<=i} q_k: dx/dq_j = -sum_{i>=j} L_i sin(theta_i), dy/dq_j = sum_{i>=j} L_i cos(theta_i). condJ and manip are reported at every configuration; a near-straight arm is flagged s singular rather than left for the controller to discover.

mas_kin_ik at q2 = 1e-4 with a radial target: cond(J) 4.9e4, DLS raw step 0.12, normal-equations raw step 6.4e3. method='normal' is kept as the negative control.

Estimation from recorded data vs simulation

  • mas_estimate_check(truth, est, P) is the recorded route: truth is a reference trajectory or simulator log supplied by the caller; the tool never generates it. It computes NEES per step and per run, the two chi-square bands, bias, covariance hygiene, and innovation whiteness when innovation/S are supplied.
  • mas_ekf_check(model) is the simulated route: it draws truth from Qtrue/Rtrue and averages over runs. Use it to tune a filter design; use mas_estimate_check to judge a log. A simulated pass does not certify a recorded run.
  • Deliver the number, the band, the sample count and the verdict. halfMeans is reported but not graded: with serially correlated NEES its difference is not a test.

Environment and SKIP

Record before claiming: MATLAB release, toolbox license (mas_precheck), ROS/ROS 2 middleware and domain id, bag path and size, URDF/robot model and frame tree, sensor rates, and the seed for any Monte Carlo. Then:

  • No ROS Toolbox / bag / robot model / hardware → SKIP, with the missing item named.
  • Bag too large for the session → process a deterministic sample; report the sample window and never call the sampled result a full-bag validation.
  • Unverified timing or clock sync → state it; do not hide it inside a tolerance.

Legacy toolbox APIs

  • ROS/ROS 2: ros2bagreader, rosbagreader, message selectors.
  • Robotics: rigidBodyTree, inverseKinematics, manipulatorRRT.
  • Navigation: occupancy maps, planners, controllers, localization.
  • Sensor fusion: trackingKF, trackingEKF, trackingUKF, transformTree.
  • UAV: scenario, trajectory and sensor simulation APIs when installed.

Tests: tests/test_robotics_contract.m (162/162) and tests/test_robotics.m (31/31). Every expected value is a physical property recomputed independently — hand algebra, a second numerical route, or MATLAB's own implementation — never the tool under test.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Matlab Robotics Autonomy AI skill do?

MATLAB robotics and autonomy workflow for rigid-body transforms, quaternions, forward/inverse kinematics, trajectory planning, rigid-body dynamics, ROS/ROS 2 bags, sensor fusion, state estimation, SLAM, and reproducible robot experiments. Use whenever the user asks MATLAB to verify a rotation or quaternion, compute FK/IK/Jacobians, check a trajectory against waypoints and limits, check dynamics (M/C/g, energy), or judge whether a recorded state estimate is consistent with its covariance. Missing toolbox, bag, robot model or hardware means SKIP, never a claimed result.

Why use Matlab Robotics Autonomy on TypingMind?

Because you install it once and use it with any model. Matlab Robotics Autonomy is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Matlab Robotics Autonomy in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-robotics-autonomy. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Matlab Robotics Autonomy?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Matlab Robotics Autonomy?

As many as you like. As long as a model supports skills, you can use Matlab Robotics Autonomy with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Matlab Robotics Autonomy AI skill free?

Yes. It is published on GitHub by wzyn20051216 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇