본문으로 건너뛰기
cccskills
무료GitHub에 공개

matlab-robotics-autonomy

MATLAB robotics and autonomy workflow for ROS Toolbox, Robotics System Toolbox, Navigation Toolbox, UAV Toolbox, sensor fusion, trajectory planning, simulation, and reproducible robot experiments. Use for ROS/ROS 2 bags, robot models, path planning, SLAM, state estimation, and autonomy prototyping.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(6)

  • SKILL.md6.5 KB
  • scripts/mas_ekf_check.m6.9 KB
  • scripts/mas_frame_check.m8.6 KB
  • scripts/mas_kin_check.m4.5 KB
  • scripts/mas_kin_ik.m6.1 KB
  • tests/test_robotics.m13.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

MATLAB Robotics Autonomy

Use this skill for robotics, autonomy, and ROS workflows.

Workflow

  1. Confirm environment: ROS or ROS 2, bag files, robot model, coordinate frames, sensors, and MATLAB toolboxes.
  2. Load data or simulator deterministically.
  3. Validate frames, units, timestamps, and message types before algorithms.
  4. Build the smallest loop first: read data, process one frame, save one metric.
  5. Scale to full trajectory, bag, or simulation only after the small loop passes.

Preferred APIs

  • ROS: ros2bagreader, rosbagreader, message readers, publishers, subscribers.
  • Robotics: rigidBodyTree, inverseKinematics, manipulatorRRT.
  • Navigation: occupancy maps, planners, controllers, localization.
  • Sensor fusion: Kalman filters, tracking filters, coordinate transforms.
  • UAV: scenario, trajectory, and sensor simulation APIs when installed.

Acceptance Checks

Use at least one:

  • Bag metadata and topic count parsed correctly.
  • Frame transform chain is valid.
  • Path has finite waypoints and no obvious obstacle collision.
  • State estimator output has finite covariance.
  • Trajectory tracking error is within tolerance.
  • Figures or videos are exported with reproducible scripts.

Risk Checklist

Watch for:

  • ENU/NED/body/world frame mixups.
  • Degrees vs radians.
  • Timestamp drift.
  • Sensor rate mismatch.
  • ROS domain ID or middleware mismatch.
  • Large bag files that need sampled processing.

Tools

r = mas_kin_check(L, q);                    % FK + Jacobian vs finite difference
r = mas_kin_ik(L, pTarget, q0, opts);       % DLS IK, joint limits, step diagnostics
r = mas_ekf_check(model);                   % NEES / NIS consistency, Monte Carlo
r = mas_frame_check(T);                     % SE(3)/SO(3) hygiene, chain closure

Check the Jacobian against something that is not the Jacobian

mas_kin_check returns the analytic Jacobian and a central-difference Jacobian computed by differentiating the forward kinematics, then reports the disagreement. Every consumer of J -- resolved-rate control, IK, singularity maps, the manipulability ellipsoid, force/torque mapping -- is built on it, and a sign error or a dropped outer sum does not throw and does not look wrong on a plot of the arm; it produces a controller that drives the tip the wrong way.

The analytic form: for a planar chain with absolute link 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)

The OUTER sum is the part that gets dropped: joint j moves every link from j outward. The test pins this by building the naive per-link Jacobian inline and asserting that the returned J disagrees with it while agreeing with the finite difference to ~1e-9.

IK: bounded steps, and the unbounded value still reported

mas_kin_ik solves dq = J'(JJ' + lambda^2 I)^{-1} e. The update is then clamped to stepLimit rad per joint, because J is a first-order model and a large Cartesian error produces a step that overshoots the region where that model holds.

Measured at a near-singular configuration (q2 = 1e-4, arm almost straight) with a target demanding radial motion:

q2cond(J)DLS raw stepnormal-equations raw step
0.014.9e23.7464.4
1e-34.9e30.41641
1e-44.9e40.126.4e3
1e-64.9e60.121.4e5

DLS stays bounded; (J'J)\J'e grows like 1/q2. method='normal' is kept deliberately as that negative control, and both maxStep (applied) and stepRawMax (requested) are returned, because suppressing the unbounded value would hide the information that tells you the configuration is bad.

A target outside the reachable annulus returns feasible=false and runs zero iterations. A target reachable only by violating the joint limits returns converged=false with limitHit=true -- it does not return the clamped pose as if it had succeeded.

Is the filter's uncertainty honest?

A filter can be stable, smooth, and confidently wrong. mas_ekf_check answers the one question that the estimate plot cannot:

eps_k = (x_k - xhat_k)' P_k^{-1} (x_k - xhat_k)          E[eps] = n

It draws ground truth from Qtrue/Rtrue and gives the filter Q/R, averages NEES over nRuns independent runs, and applies the two-sided band from N*ANEES ~ chi2(N*n).

Measured (2-state constant-velocity model, 120 runs x 60 steps, band 1.66..2.38):

caseANEESverdict
correctly tuned1.92PASS
R_filter = R_true/100107FAIL
Q_filter = Q_true/10051FAIL
R_filter = R_true*1000.81FAIL

The band is two-sided on purpose: "close to n" is not the same as "consistent", and a filter tuned by inflating R is pessimistic, not correct. The verdict also checks the fraction of time steps inside the band, since a filter can have the right mean while being inconsistent during transients.

Frames: the two checks that catch convention errors

mas_frame_check reports orthErr = max|R'R - I| and det(R) separately, because they catch different defects. A matrix stretched 0.1 % along one column still has det(R) = 1.001 -- det alone calls it a rotation -- while orthErr reads 2.0e-3. Conversely a reflection has orthErr = 0 and det(R) = -1.

Euler sequence is part of the data: the same three numbers mean different orientations under ZYX and XYZ, so .seq is required and never defaulted, and the sequence used is reported back. Where Robotics System Toolbox is licensed the result is cross-checked against eul2rotm / quat2rotm and the deviation reported (measured: 0 and 1.1e-16). Absence is reported as crossCheck.checked = false, never faked. angleUnit='rad' rejects input whose magnitude exceeds 2*pi, which is what degree-valued data looks like.

tests/test_robotics.m — cases are graded against an independent value, with a negative control for every metric that could pass vacuously.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

MATLAB code generation and deployment workflow for MATLAB Coder, Simulink Coder, Embedded Coder, GPU Coder, HDL Coder, fixed-point conversion, MEX validation, and embedded deployment readiness. Use whenever the user asks to generate C/C++/CUDA/HDL/code, deploy algorithms, or validate generated code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB workflow for control systems, system identification, robust control, MPC, Simulink Control Design, parameter tuning, constrained optimization, and numerical validation. Use whenever the user asks for controllers, transfer functions, state-space models, tuning, identification, optimal control, or solver-based engineering.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB data analysis workflow for tables, timetables, statistics, fitting, optimization-assisted analysis, visualization, report artifacts, and reproducible paper figures. Use whenever the user asks MATLAB to analyze data, plot results, fit models, process CSV/Excel/MAT files, or reproduce figures.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB agentic workflow router. Use this whenever the user asks for MATLAB, Simulink, .m/.mlx/.slx work, toolbox-driven engineering, paper reproduction, simulation, code generation, data analysis, control, robotics, signal/image/AI workflows, or wants an end-to-end automated MATLAB task with validation. For Simulink tasks on this machine, default to a visible workflow: open MATLAB/Simulink windows first so the user can watch modeling, simulation, tuning, and plotting progress.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

Run MATLAB tasks from Codex with reliable MCP-based execution, logs, artifacts, toolbox inventory, smoke tests, and reproducible validation. Use whenever MATLAB code, .m/.mlx scripts, MATLAB tests, local toolbox probing, or command-line automation is needed.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB workflow for signal processing, DSP, image processing, computer vision, lidar, medical imaging, deep learning, and AI-assisted reproducible experiments. Use for filters, spectrograms, wavelets, object detection, segmentation, classification, training, inference, and generated figures.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

wzyn20051216의 스킬 모두 보기

이 스킬의 문제 신고