matlab-plan-robot-motion

Plan collision-free manipulator paths and generate time-parameterized trajectories in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-plan-robot-motion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-plan-robot-motion
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/robotics-and-autonomous-systems/matlab-plan-robot-motion
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-plan-robot-motion

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Planning robot arm motion in MATLAB involves choosing the right planner, modeling collision environments, handling self-collision quirks, and converting paths into trajectories that respect velocity and acceleration limits. This Skill guides an AI agent through that entire workflow, preventing common mistakes like planning without collision meshes, misusing trajectory functions, or silently ignoring world collisions.

Core Features & Use Cases

  • Collision-Free Path Planning: Select and configure manipulatorRRT or manipulatorCHOMP based on environment representation (collision primitives, occupancyMap3D, meshtsdf, spherical obstacles).
  • Trajectory Generation: Convert planned paths into time-optimal trajectories with contopptraj (TOPPRA), constant-velocity profiles with trapveltraj, or minimum-jerk motion with minjerkpolytraj.
  • Self-Collision Resolution: Empirically build SkippedSelfCollisions lists for robots with articulated grippers using a documented sampling procedure.
  • Use Case: A user has IK solutions for a welding task and needs a constant-speed, collision-free trajectory between waypoints near a workpiece. The Skill models the workpiece as collision objects, plans with manipulatorRRT, shortens the path, parameterizes it with trapveltraj, and verifies every interpolated sample with checkCollision.

Quick Start

Ask your agent to plan a collision-free trajectory for the robot from its home configuration to a target pose while avoiding the table and pillar obstacles in the workspace.

Frequently Asked Questions about matlab-plan-robot-motion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plan a collision-free path for a robot arm in MATLAB?

Use manipulatorRRT with your rigidBodyTree robot and a cell array of collision objects, then call plan with start and goal configurations. Always call shorten afterward to remove jagged detours, and verify the robot has collision meshes and DataFormat set to row before planning.

manipulatorRRT vs manipulatorCHOMP: which motion planner should I use?

Use manipulatorRRT for collision primitives, occupancyMap3D, or point cloud environments and when paths must route around obstacles. Use manipulatorCHOMP with meshtsdf or spherical obstacles when you need inherently smooth trajectories, since it jointly optimizes smoothness and collision cost.

How do I generate a time-optimal trajectory that respects joint limits?

Use contopptraj, which implements the TOPPRA algorithm to produce truly time-optimal trajectories respecting velocity and acceleration limits. Pass the transposed path (numJoints by numWaypoints) along with per-joint velocity and acceleration limit matrices.

Why does my MATLAB planner report self-collision at a valid configuration?

Parent-child bodies and parallel-linkage gripper pairs often have permanently overlapping collision geometry. Start with SkippedSelfCollisions set to parent at planner construction; if collisions persist, build an explicit skip list empirically by sampling configurations and finding always-NaN pairs in the separation distance matrix.

Does checkCollision detect collisions with environment objects?

Yes, but with world objects checkCollision returns a 1-by-2 result of self-collision and world-collision flags. Using it directly in an if statement only tests the first element, so capture the result and check any(result) to catch world collisions.

When should I not use this motion planning workflow?

Do not use it for building or importing robot models, solving IK or FK, or configuring end-effectors, which belong to the robot kinematics modeling skill. It also excludes mobile robot navigation, dynamics simulation, and code generation deployment of planners.