Library / SDK
petercorke/robotics-toolbox-matlab avatar
petercorke/robotics-toolbox-matlab

Robotics Toolbox for MATLAB: serial robots, planning and localization

Robotics Toolbox for MATLAB

1,575 stars464 forksMATLABLGPL-2.1

At a glance

What is it?
Robotics Toolbox for MATLAB provides MATLAB objects and algorithms for serial-link robots, mobile robots, planning, localization and mapping. It is aimed at MATLAB users and teaching, although the README states that the project is no longer actively developed.
Who is it for?
Adopt this toolbox for MATLAB-based robotics coursework, readable reference implementations and existing serial-link or mobile-robot code. Do not choose it for a new product that needs current support, when using the MATLAB edition of the third edition of Robotics, Vision & Control, or when Python is the preferred environment.
Can I use it commercially?
Yes, with conditions. LGPL-2.1 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 21 days ago.
What is it written in?
Mainly MATLAB, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

MATLAB robotics work covered by the toolbox

This project is for MATLAB users who need robotics algorithms without implementing every model from scratch. Its main audience includes students, teachers, researchers and engineers working with serial-link manipulators or mobile robots. The toolbox describes robot data as MATLAB objects, while also providing standalone algorithms for motion models, path planning, localization, mapping and Simulink examples.

The serial-link side is centered on user-created `robot` objects. The README says these objects can represent any serial-link manipulator, with examples included for Kinova, Universal Robots, Rethink robots, Puma 560 and the Stanford arm. This makes the toolbox useful when a course or project needs to express Denavit-Hartenberg parameters, joint types and robot-specific characteristics as MATLAB data rather than as unrelated procedural scripts.

The mobile-robot portion is broader. The README lists unicycle and bicycle motion models, Bug, distance transform, D* and PRM path planners, lattice, RRT and other kinodynamic planning methods, EKF and particle-filter localization, EKF map building, and EKF simultaneous localization and mapping. It also mentions a Simulink model for a non-holonomic vehicle and a detailed quadrotor model. These are separate capabilities connected by a common MATLAB environment, not one integrated application with a single command-line interface.

Object-based kinematics and dynamics data flow

For a serial-link manipulator, the core flow begins with a MATLAB robot object and a configuration vector. Forward kinematics maps joint values into a homogeneous transformation matrix. The README's Puma example creates the `p560` object and then calls `p560.fkine([0 0 0 0 0 0])`. The displayed result is a 4 by 4 matrix with a rotation block in the first three rows and columns and the position vector in the last column. This is the pose representation used in the example, although the README does not describe the implementation internals further.

Inverse kinematics runs in the opposite direction. The path example computes `p560.ikine6s(T, 'ru')` from a target transform `T`, then passes the resulting joint configurations to `jtraj` for trajectory interpolation. The toolbox therefore connects robot kinematics, inverse kinematics and path generation as separate operations. The code also uses `transl`, `troty` and `plot_sphere`, showing that pose and visualization operations are part of the surrounding MATLAB workflow.

The repository layout includes `RobotArm.m`, `Link.m`, `Revolute.m`, `Prismatic.m`, `Frame.m`, `URDF.m`, `DHFactor.m` and the `@SerialLink` directory. These names indicate object and model components for serial robots and imported models. The README also states that release 10 moved pose representation into the separate `Spatial Math Toolbox`, which is now a dependency. That dependency is important for installation and for reproducing examples that call functions such as `transl` and `troty`.

The code is described as straightforward, with possible computational expense. For MATLAB implementations where execution time matters, the README suggests compiling an M-file or creating a MEX version. That is an explicit trade-off: readability and instructional value come first, while production workloads may require optimization work outside the standard toolbox path.

Installing RTB.mltbx and running the Puma example

The README directs MATLAB users to the release 10.4 archive, named `RTB.mltbx`. It instructs users to open that file in MATLAB, where it installs itself. No separate command-line installation command is documented, so the archive-opening procedure is the installation step that can be confirmed from the README. The toolbox also depends on the `Spatial Math Toolbox`, so a new installation should confirm that this dependency is available before expecting the release 10 examples to work.

After installation, the shortest documented first use is the Puma 560 example. The following MATLAB commands create the robot object and evaluate its forward kinematics at the zero joint configuration. In the README's example, the command output identifies `p560` as a six-axis Puma 560 and displays the resulting homogeneous transform.

matlab
mdl_puma560
p560
p560.fkine([0 0 0 0 0 0])

The first line loads the example model, the second displays the robot and its parameter table, and the third requests forward kinematics. The exact numeric transform should not be generalized to another robot because the object is specifically configured for Puma 560 parameters.

For a slightly broader first use, the README shows a target pose and inverse-kinematics call. `T` is constructed from a translation and a rotation about the y-axis, `ikine6s` finds joint values, and `jtraj` creates a trajectory from the initial configuration `qr` to `qqr`.

matlab
p = [0.8 0 0];
T = transl(p) * troty(pi/2);
qr(1) = -pi/2;
qqr = p560.ikine6s(T, 'ru');
qrt = jtraj(qr, qqr, 50);

This is a useful teaching sequence because it exposes the data boundaries between pose representation, inverse kinematics and trajectory generation. It is not a complete application deployment guide, and the README does not document error handling for failed inverse-kinematics solutions.

Planning, localization and Simulink examples

The non-manipulator capabilities are exposed through separate functions and classes rather than a single unified robot object. Planning examples include `Astar.m`, `Dstar.m`, `Lattice.m`, `PRM.m` and `RRT.m`. Mobile motion models include `Unicycle.m`, `Bicycle.m`, `Vehicle.m` and `ReedsShepp.m`. Localization is represented by `EKF.m` and `ParticleFilter.m`, while `LandmarkMap.m`, `PoseGraph.m` and `OccGrid.m` support mapping-related workflows. This layout is more useful for a toolbox review than a claim of a single unified simulator, because each algorithm remains accessible as MATLAB code.

The Reeds-Shepp example demonstrates configuration-space motion for a car-like vehicle. It defines initial and final configurations as `[x y theta]'`, sets `maxcurv = 1/5`, and calls `ReedsShepp` with a step of `0.05`. The result is passed to `plot_vehicle` for animation. This approach is appropriate when the relevant problem is finding a vehicle path under curvature constraints, not when the objective is arbitrary six-axis manipulator trajectory generation.

The particle-filter example uses `Vehicle`, `RandomPath`, `Map` and `ParticleFilter`. It constructs covariance matrices, adds a random driver, creates a particle filter with 1000 particles, and runs 100 iterations. The README points to `demos/particlefilt.mlx` as a fully commented version. This indicates that the examples are also intended as instructional material. The README does not specify computational scaling, parameter-selection guidance beyond the shown matrices, or a production deployment interface for the localization stack.

For animation, the README provides `sl_quadrotor` for a quadrotor Simulink model and several MATLAB plotting examples. Simulink support is therefore part of the toolbox's documented scope, but the repository does not provide installation or compatibility requirements for specific Simulink releases.

Limitations and the cost of operating an older toolbox

The clearest limitation is project status. The repository is not archived, and the recorded last push was on 2026-10-01. However, the README labels the project inactive, states that it is no longer actively developed, and warns that questions and issues may go unanswered. For an engineer, this means compatibility questions, bug reports and new MATLAB features may not receive a predictable response. The absence of an archive status should not be read as a promise of ongoing support.

The toolbox also targets a specific audience. The README says users starting something new should use the separate Robotics Toolbox for Python, while MATLAB users working with the second edition of Robotics, Vision & Control should use this release 10.4 toolbox. It explicitly says that users of the MATLAB version of the third edition should use MathWorks' Robotics System Toolbox and related products instead. This is an important routing decision because the project documentation itself distinguishes these use cases.

Performance is another limitation. The README describes the routines as straightforward but notes that this may come at the expense of computational efficiency. It recommends compiling an M-file or creating a MEX version for performance-sensitive work. That adds implementation and maintenance work, and the documentation does not claim that every algorithm has a ready-made compiled path.

The release history also contains legacy archives for RTB 9.10 and 10.3.1, alongside the 10.4.7 release entry. This is evidence of versioned distribution, not evidence of current compatibility across all MATLAB versions. The README does not document a rollback procedure or a supported version matrix, so those points need direct verification before migrating an existing codebase.

LGPL terms and alternative MATLAB or Python choices

The repository metadata identifies the license as `LGPL-2.1`, while the README badge says `LGPL v3` and links to the GNU LGPL version 3 page. The repository also contains `LGPL-LICENCE.txt` and `LICENSE`, but their contents are not included in the available repository excerpt. This discrepancy should be resolved against the actual repository files before redistribution or integration decisions. The license identifier is a compliance issue, not a recommendation about which toolbox to choose, and this article does not provide legal advice.

The documented alternative is MathWorks' Robotics System Toolbox, which the README describes as a supported commercial product and recommends for the MATLAB version of the third edition of Robotics, Vision & Control. Its approach differs in several concrete ways: it is distributed as a vendor-supported commercial product rather than this free, open source toolbox, and the README directs third-edition MATLAB users to it. The README does not provide a feature-by-feature comparison, performance comparison or pricing information.

For new work outside MATLAB, the README recommends the Robotics Toolbox for Python and gives the installation command `pip install roboticstoolbox-python`. That is a different ecosystem and a different adoption path, so Python users should not assume this MATLAB repository is their intended package. Among the choices documented by the project, this toolbox is most closely aligned with MATLAB users and the second-edition course context, while the alternatives are explicitly tied to newer Python work or the MathWorks product line.

Editorial conclusion

Adopt this toolbox for MATLAB-based robotics coursework, readable reference implementations and existing serial-link or mobile-robot code. Do not choose it for a new product that needs current support, when using the MATLAB edition of the third edition of Robotics, Vision & Control, or when Python is the preferred environment. Verify the `RTB.mltbx` installation, the `Spatial Math Toolbox` dependency, MATLAB path configuration and the applicable `LGPL` terms before adoption. Based on the repository status, the last push was on 2026-10-01, while the README labels the project inactive and says questions and issues may go unanswered.

Frequently asked questions

How do I install the Robotics Toolbox for MATLAB?

The README says to open `RTB.mltbx` in MATLAB, where it installs itself. It also says that release 10 depends on the `Spatial Math Toolbox` for pose representation.

How do I create and use a Puma 560 robot object?

Run `mdl_puma560` to load the example, then inspect `p560` and call `p560.fkine([0 0 0 0 0 0])` for forward kinematics at the zero joint configuration. The README shows `ikine6s`, `jtraj` and plotting functions for a more complete example.

Does the Robotics Toolbox for MATLAB support mobile robots, localization and path planning?

The README lists unicycle and bicycle models, Bug, distance transform, D*, PRM, lattice and RRT planning, EKF and particle-filter localization, map building, SLAM and a vehicle Simulink model. It also provides a commented `demos/particlefilt.mlx` example.

Official sources

  1. Issues
  2. License: LGPL-2.1
  3. petercorke/robotics-toolbox-matlab on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/petercorke-robotics-toolbox-matlab.svg)](https://hysenlabs.com/projects/petercorke-robotics-toolbox-matlab)

Was this useful?