Skip to content
@mathworks-robotics

MathWorks Robotics

MATLAB and Simulink examples for robot manipulators, mobile and legged robots, ROS 2, drones, underwater vehicles, and off-road autonomy, from MathWorks.

MathWorks Robotics

MATLAB® and Simulink® examples, reference applications, toolbox extensions, and competition kits for robotics and autonomous systems. The repositories cover robot manipulators, legged and mobile robots, ROS and ROS 2, drones, underwater vehicles, and off-road machines such as tractors, excavators, and haul trucks. MathWorks engineers publish them to accompany Robotics System Toolbox, ROS Toolbox, Navigation Toolbox, UAV Toolbox, and Simscape Multibody.

Featured robotics repositories

Repository What it is
awesome-matlab-robotics A curated list of MATLAB and Simulink robotics examples, videos, add-ons, and community projects, sorted by application and toolbox.
mujoco-simulink-blockset A Simulink blockset for MuJoCo physics models (MJCF), with actuator inputs, sensor buses, and RGB and depth cameras.
trajectory-planning-robot-manipulators Task-space, joint-space, and time-scaled trajectory generation for a 7-DOF robot arm in MATLAB and Simulink.
msra-walking-robot Bipedal walking robot modeling in Simscape Multibody, with gait optimization, ZMP and MPC walking patterns, and reinforcement learning.
Offroad-Navigation-for-Autonomous-Haul-Trucks A planning and control stack that drives an autonomous haul truck through an open-pit mine, with an MPPI local planner and nonlinear MPC.

New in R2026b

R2026b adds off-road autonomy and new robot import options to Robotics System Toolbox, ROS 2 introspection and bag playback to ROS Toolbox, IMU models and GPS-denied navigation to Navigation Toolbox, and MAVLink microservices to UAV Toolbox. The R2026b release highlights cover every product.

Off-road autonomy (Robotics System Toolbox)

  • Tractors and haul trucks in Unreal Engine scenes. The Simulation 3D Agricultural Tractor and Simulation 3D Haul Truck blocks simulate these vehicles with ground following and output their ground-truth pose.
  • Off-road vehicle library. loadvehicle loads tractor, dump truck, and haul truck models as rigid body trees, with wheelbase and minimum turning radius.
  • Custom off-road vehicles and ground following. The Simulation 3D Offroad Vehicle block drives any rigid body tree, and ground-following blocks compute terrain-following poses from Unreal Engine scenes or a heightmap.

Documentation: Offroad Autonomy for Heavy Machinery and the autonomous haul truck example.

Related repositories: Offroad-Navigation-for-Autonomous-Haul-Trucks, autonomous-excavator, Tractor-Sprayer-Navigation-in-Vineyard.

Robot models and collision checking (Robotics System Toolbox)

  • Joint and appearance options in robot import. importrobot can convert unsupported joints to floating joints instead of fixed ones, name joints after their Simscape blocks, and keep colors and textures from DAE and CAD files.
  • Penetration depth. checkCollision returns penetration depth and witness points for colliding geometries.
  • Joint indices by name. jointPositionFromBodyName and jointPositionFromJointName return the configuration index for a joint.

Related repositories: msra-walking-robot, designing-robot-manipulator-algorithms, intelligent-bin-picking-example-with-simulink.

ROS 2 (ROS Toolbox)

  • ROS 2 introspection from MATLAB. The ros2 function runs topic, node, service, action, and parameter introspection commands without a separate ROS 2 terminal.
  • Bag playback. ros2bagplayer publishes bag messages to a ROS 2 network, with topic filtering, seeking, and rate control.
  • Faster bag reading. ros2bagreader opens large bags faster by building its message index in the background.
  • Asynchronous ROS 2 subscribers. The ROS 2 Subscribe block can run asynchronously in generated code and process each message as it arrives, and ROS 2 blocks accept callback groups.
  • Eclipse Zenoh. rmw_zenoh_cpp is available as a ROS 2 middleware option in ROS Toolbox preferences.

Related repositories: matlab-and-simulink-ros-tutorials, Support-and-Docker-Files-for-ROS-Toolbox, deep-learning-for-3D-object-detection.

Sensor fusion, GNSS, and path planning (Navigation Toolbox)

  • IMU models from datasheets. loadimupart configures an imuSensor for a specific manufacturer and part number.
  • GPS-denied navigation. A new example shows terrain-aided inertial sensor fusion for pose estimation without GPS.
  • RINEX 4.02 and faster grid planning. rinexread supports RINEX 4.02, and plannerAStarGrid plans about 2.3 times faster than in R2026a on the release notes' example map.

Related repositories: autonomous-navigation-ugv, mobile-robotics-simulation-toolbox.

Drones, PX4, and ArduPilot (UAV Toolbox)

  • MAVLink microservices. mavlinkmicroservice exchanges heartbeats, commands, parameters, missions, and files with PX4 and ArduPilot, and mavlinkio connects over serial ports.
  • ArduPilot. New blocks read ArduPlane estimator outputs, read and write parameters, communicate with I2C and serial peripherals, and log Simulink signals to DataFlash logs.
  • PX4. Support adds PX4 Autopilot firmware v1.16.1, a preconfigured WSL environment, multi-instance uORB topics, and MDF logging.

Related repositories: scripts-patch-ardupilot-uav-toolbox, ardupilot, simulation-3d-joystick-calibrator.

R2026b compatibility considerations

  • The universalUR5e model from loadrobot uses new inertial parameters from the Universal Robots ROS 2 description, so dynamics results change.
  • ros2bagreader indexes in the background: NumMessages waits for indexing when you filter by time.
  • The PX4 board option "PX4 Pixhawk Series" is now "PX4 Generic Board", with the same behavior.
  • addCustomTerrain returns an error for an existing terrain name only when NameExistsRule is "error".

Full details are in the release notes for Robotics System Toolbox, ROS Toolbox, Navigation Toolbox, and UAV Toolbox.

Robotics posts from MathWorks blogs

Autonomous Systems blog

Student Lounge blog

Robotics repositories by topic

Robot manipulators

Repository What it is
trajectory-planning-robot-manipulators Trajectory generation for a 7-DOF arm in task space and joint space.
designing-robot-manipulator-algorithms URDF import, inverse kinematics, Stateflow logic, and torque control of a 4-DOF arm with Simscape Multibody.
intelligent-bin-picking-example-with-simulink Bin picking with a UR5e cobot in Simulink: task planning, perception, and CHOMP motion planning.
Intelligent-Bin-Picking-with-Universal-Robot Bin picking in MATLAB: YOLO v4 detection, point cloud pose estimation, and RRT motion planning on a UR5e over ROS.
matlab-support-for-niryo-ned2-robots MATLAB support for connecting to, controlling, and simulating a Niryo Ned2 educational arm.
mujoco-simulink-blockset MuJoCo physics models in Simulink.

Legged and mobile robots

Repository What it is
msra-walking-robot Bipedal walking: Simscape Multibody model, gait optimization, ZMP and MPC, and reinforcement learning.
mobile-robotics-simulation-toolbox 2D mobile robot kinematics, lidar and object detector simulation, and multi-robot visualization.
autonomous-navigation-ugv An autonomous navigation stack for a differential-drive ground vehicle, in simulation and with a TurtleBot3 in Gazebo.
robotics-playground Virtual robot environments and sensors in Simulink for teaching driver control, autonomy, and obstacle avoidance.

Off-road machines: mining, construction, and agriculture

Repository What it is
Offroad-Navigation-for-Autonomous-Haul-Trucks Planning and control for an autonomous haul truck in an open-pit mine.
autonomous-excavator A virtual testbench for an autonomous excavator: lidar in Unreal Engine, arm path planning, and a hydraulic Simscape arm.
Tractor-Sprayer-Navigation-in-Vineyard Simulink navigation for a sprayer-equipped tractor driving between vineyard rows in Unreal Engine.

ROS and ROS 2

Repository What it is
matlab-and-simulink-ros-tutorials ROS 2 basics in MATLAB and Simulink: nodes, topics, services, bags, custom messages, and deployment.
getting-started-ros Structuring MATLAB and Simulink code around ROS 1 topics, parameters, and standalone nodes.
Support-and-Docker-Files-for-ROS-Toolbox Dockerfiles and Gazebo worlds that give ROS Toolbox examples a ROS 1 Noetic or ROS 2 Jazzy network.
object-tracking-using-ros-and-simulink-on-raspberry-pi Object tracking on a Raspberry Pi: a vision-and-control algorithm deployed from Simulink as a ROS node.
ros-control A ros_control controller plugin that wraps Simulink-generated C++.

Perception and AI

Repository What it is
deep-learning-for-object-detection-yolov2 YOLO v2 object detection: training, simulation in Simulink, and deployment to NVIDIA Jetson.
deep-learning-for-3D-object-detection PointPillars lidar object detection, from point clouds to a generated ROS 2 node.
ai-robotics-workshop AI-based mobile robot development, from synthetic images to deployment on an NVIDIA JetBot.
obstacle-avoidance-using-camera Optical-flow obstacle avoidance for a drone in a 3D virtual world.

Drones, aircraft, and marine vehicles

Repository What it is
scripts-patch-ardupilot-uav-toolbox Scripts that patch ArduPilot Copter and Plane to build with Simulink-generated flight code.
ardupilot MathWorks branches proposed upstream to ArduPilot.
simulation-3d-joystick-calibrator A one-time joystick or RC transmitter calibration shared by fixed-wing, multirotor, and helicopter simulations.
modeling-and-simulation-of-an-AUV-in-Simulink Autonomous underwater vehicle design in Simulink, from requirements to hydrodynamics, control, and visualization.

Student competitions

Repository Competition
templates-robocup-robot-manipulation-challenge RoboCup ARM Challenge
RoboSub-Virtual-Environment RoboSub
developing-swerve-robot-drivetrains FIRST Robotics and other swerve-drive teams
controller-for-autonomous-boats RobotX
Virtual-Environment-for-SAE-Aero-Design- SAE Aero Design
robotics-playground BEST Robotics

More competitions and software offers are on Competitions and Hackathons.

Robotics teaching and curriculum

awesome-robotics-teaching lists MATLAB and Simulink robotics curriculum, courses, and hardware by topic and level.

Get help

Pinned Loading

  1. awesome-matlab-robotics awesome-matlab-robotics Public

    This is a list of awesome demos, tutorials, utilities and overall resources for the robotics community that use MATLAB and Simulink.

    1.9k 293

  2. mujoco-simulink-blockset mujoco-simulink-blockset Public

    Blocks for accessing MuJoCo physics engine within Simulink

    C++ 86 14

  3. trajectory-planning-robot-manipulators trajectory-planning-robot-manipulators Public

    MATLAB and Simulink examples for trajectory generation and evaluation of robot manipulators.

    MATLAB 168 43

  4. msra-walking-robot msra-walking-robot Public

    Forked from mathworks/msra-walking-robot

    Example files for MATLAB and Simulink Robotics Arena walking robot videos.

    MATLAB 135 48

  5. Offroad-Navigation-for-Autonomous-Haul-Trucks Offroad-Navigation-for-Autonomous-Haul-Trucks Public

    Planning and control for an autonomous haul truck in an open-pit mine with MATLAB and Simulink: terrain maps, MPPI local planning, and nonlinear MPC.

    MATLAB 34 6

  6. designing-robot-manipulator-algorithms designing-robot-manipulator-algorithms Public

    MATLAB and Simulink files for modeling and simulation of ROBOTIS OpenManipulator

    MATLAB 59 27

Repositories

Showing 10 of 35 repositories
  • .github Public
    mathworks-robotics/.github's past year of commit activity
    0 0 0 0 Updated Nov 22, 2026
  • simulation-3d-joystick-calibrator Public

    Calibrate USB joysticks, RC controllers, and flight sticks once, then reuse the configuration across Fixed-Wing, Multirotor, and Helicopter simulation input blocks.

    mathworks-robotics/simulation-3d-joystick-calibrator's past year of commit activity
    MATLAB 1 BSD-3-Clause 0 0 0 Updated Nov 12, 2026
  • Support-and-Docker-Files-for-ROS-Toolbox Public

    Dockerfiles and Gazebo worlds that provide ROS 1 Noetic and ROS 2 Jazzy networks for ROS Toolbox examples in MATLAB and Simulink.

    mathworks-robotics/Support-and-Docker-Files-for-ROS-Toolbox's past year of commit activity
    Makefile 13 3 1 0 Updated Oct 26, 2026
  • scripts-patch-ardupilot-uav-toolbox Public

    Scripts to Patch ArduPilot for UAV Toolbox

    mathworks-robotics/scripts-patch-ardupilot-uav-toolbox's past year of commit activity
    MATLAB 2 BSD-3-Clause 0 0 0 Updated Oct 14, 2026
  • awesome-matlab-robotics Public

    This is a list of awesome demos, tutorials, utilities and overall resources for the robotics community that use MATLAB and Simulink.

    mathworks-robotics/awesome-matlab-robotics's past year of commit activity
    1,896 293 0 0 Updated Oct 12, 2026
  • ardupilot Public Forked from ArduPilot/ardupilot

    ArduPlane, ArduCopter, ArduRover, ArduSub source

    mathworks-robotics/ardupilot's past year of commit activity
    C++ 1 GPL-3.0 21,966 0 0 Updated Oct 7, 2026
  • Tractor-Sprayer-Navigation-in-Vineyard Public

    Getting started with driving a tractor-sprayer in a vineyard using Unreal Engine® and MATLAB®.

    mathworks-robotics/Tractor-Sprayer-Navigation-in-Vineyard's past year of commit activity
    MATLAB 5 BSD-3-Clause 1 0 0 Updated Sep 30, 2026
  • RoboSub-Virtual-Environment Public

    Simulink 6-DOF AUV model and Unreal Engine pool for RoboSub teams to test autonomy before pool time.

    mathworks-robotics/RoboSub-Virtual-Environment's past year of commit activity
    MATLAB 13 BSD-3-Clause 9 1 0 Updated Sep 22, 2026
  • Virtual-Environment-for-SAE-Aero-Design- Public

    This repository contains a MATLAB® Project and associated files for a virtual aircraft simulation environment developed to support SAE Aero Design® student teams. SAE Aero Design® is an annual aircraft design, build, and fly competition organized by SAE International®.

    mathworks-robotics/Virtual-Environment-for-SAE-Aero-Design-'s past year of commit activity
    MATLAB 2 BSD-3-Clause 0 0 0 Updated Sep 3, 2026
  • mujoco-simulink-blockset Public

    Blocks for accessing MuJoCo physics engine within Simulink

    mathworks-robotics/mujoco-simulink-blockset's past year of commit activity
    C++ 86 14 4 0 Updated Aug 26, 2026