• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    MATLAB
  • Created about 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Trajectory Planning of Robot Manipulators with MATLAB and Simulink

Copyright 2019 The MathWorks, Inc.

Description

This submission consists of educational MATLAB and Simulink examples for trajectory generation and evaluation of robot manipulators.

All examples feature the 7-DOF Kinova Gen3 Ultra lightweight robotic manipulator: https://www.kinovarobotics.com/en/products/robotic-arms/gen3-ultra-lightweight-robot

There is a presaved MATLAB rigid body tree model of the Kinova Gen3; however, you can access the 3D model description from the Kinova Kortex GitHub repository: https://github.com/Kinovarobotics/ros_kortex

For more information on the Robotics System Toolbox functionality for manipulators, see the documentation: https://www.mathworks.com/help/robotics/manipulators.html

For more background information on trajectory planning, refer to this presentation: https://cw.fel.cvut.cz/old/_media/courses/a3m33iro/080manipulatortrajectoryplanning.pdf

If you have any questions, email us at [email protected].

Files

To get started, run the startupExample.m script. This will configure the MATLAB search path so all the examples run correctly.

matlab Folder

Contains MATLAB examples for trajectory planning.

  • manipTrajCartesian.m - Task space (translation only) trajectories
  • manipTrajJoint.m - Joint space trajectories. Contains an includeOrientation variable to toggle waypoint orientations on or off.
  • manipTrajLinearRotation.m - Task space (translation only) trajectories with linearly interpolated orientation
  • manipTrajTransform.m - Linearly interpolated transform trajectories (translation and orientation)
  • manipTrajTransformTimeScaling.m - Transform trajectories (translation and orientation) interpolated using nonlinear time scaling
  • compareTaskVsJointTraj.m - Comparison script that illustrates the difference between task space and joint space trajectories

NOTE: All the scripts above are configurable:

  • createWaypointData.m script - Generates sample waypoints, trajectory times, and other necessary planning variables.
  • trajType variable - Used to switch the trajectory type
  • plotMode variable - Used to switch the waypoint/trajectory visualization type

simulink Folder

Contains Simulink examples for trajectory planning.

  • manipCartesianTrajectory.slx - Task space (translation only) trajectories
  • manipJointTrajectory.slx - Joint space trajectories.
  • manipRotationTrajectory.slx - Task space (translation only) trajectories with linearly interpolated orientation
  • manipTransformTrajectory.slx - Linearly interpolated transform trajectories (translation and orientation)
  • manipTransformTrajectoryTimeScaling.slx - Transform trajectories (translation and orientation) interpolated using nonlinear time scaling

NOTE: There are also models that work with Robot Operating System (ROS), which are identically named with the ros prefix. Instead of using variables in the MATLAB base workspace, waypoint information is communicated using ROS messages. To test this, you can use the Waypoint Publisher App or the publishWaypoints script (see the next section).

The ROS topics and message types are:

  • /waypoints - List of waypoints, message type geometry_msgs/PoseArray
  • /waypoint_times - List of waypoint target times, message type std_msgs/Float64MultiArray

utilities Folder

Contains several utilities for the MATLAB and Simulink examples above.

  • createWaypointData.m - Creates sample waypoints, waypoint times, and other necessary planning variables. If you want to change the waypoints or other trajectory reference values, modify this script (or we suggest creating a copy)
  • cylinder.stl - "Dummy" mesh file representing the end effector attached the arm
  • gen3.mat - Presaved rigid body tree containing the 3D model of the robot arm
  • gen3positions.mat - Presaved joint and end effector configurations for the "home" and "retract" positions of the robot arm
  • importGen3Model.m - Function to import the Kinova Gen3 manipulator model. Not needed by this example; you can use this if you want to import a new model yourself from the source URDF file.
  • plotTrajectory.m - Utility function to plot generated trajectory profiles (used with MATLAB examples)
  • publishWaypoints.m - Tests the publishing of waypoint information as ROS messages
  • trajExampleUtils.slx - Block library containing common components for the Simulink examples
  • visualizeRobot.m - Utility function used by the library above to plot the manipulator from a Simulink model
  • waypointPublisher.mlapp - MATLAB app used to modify waypoints and publish them to the base workspace or as ROS messages

More Repositories

1

awesome-matlab-robotics

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

modeling-and-simulation-of-an-AUV-in-Simulink

This repository contains a variety of demonstration example models associated with the Design, Modeling and Simulation of Autonomous Underwater Vehicles webinar and video series.
MATLAB
68
star
3

mobile-robotics-simulation-toolbox

MATLAB and Simulink utilities for vehicle kinematics, visualization, and sensor simulation.
MATLAB
64
star
4

mujoco-simulink-blockset

Blocks for accessing MuJoCo physics engine within Simulink
C++
49
star
5

robotics-playground

MATLAB and Simulink library of virtual environments designed to aid in the teaching of basic concepts in robotics such as driver control, autonomy programming, obstacle avoidance and object interactions.
MATLAB
41
star
6

designing-robot-manipulator-algorithms

MATLAB and Simulink files for modeling and simulation of ROBOTIS OpenManipulator
MATLAB
37
star
7

autonomous-navigation-ugv

Examples for creating autonomous navigation software stacks for mobile robots and UGV using MATLAB and Simulink
MATLAB
31
star
8

deep-learning-for-object-detection-yolov2

Code Files for "Deep Learning for Object Detection" video series
MATLAB
27
star
9

getting-started-ros

Resources for getting started with MATLAB and Simulink and the Robot Operating System (ROS).
MATLAB
24
star
10

obstacle-avoidance-using-camera

Obstacle avoidance for UAV/UGV using optical flow algorithm calculated using the vehicle's front view camera.
MATLAB
21
star
11

matlab-and-simulink-ros-tutorials

MATLAB and Simulink tutorials for learning how to program and develop robots powered by ROS™
MATLAB
20
star
12

awesome-robotics-teaching

Collection of curriculum and useful examples for robotics and autonomous systems education using MATLAB® and Simulink® for different stages of learning.
20
star
13

templates-robocup-robot-manipulation-challenge

This GitHub repository contains MATLAB and Simulink utilities and templates to get started developing algorithms for the RoboCup Virtual Robot Manipulation Challenge. The templates include how to control the simulated robot in Gazebo using ROS and how to obtain data from the available robot sensors to be used in perception algorithms.
MATLAB
19
star
14

object-tracking-using-ros-and-simulink-on-raspberry-pi

The example showcases deployment of a object tracking algorithm using ROS on the Raspberry Pi. The example intends to show the functionality of deploying ROS nodes on Pi and monitoring the values on a system on the same network.
17
star
15

intelligent-bin-picking-example-with-simulink

Intelligent bin picking with Simulink® for Universal Robots UR5e Cobot
MATLAB
14
star
16

ai-robotics-workshop

Hands-on workshop on learning how to develop AI-based autonomous mobile robot
MATLAB
13
star
17

Offroad-Navigation-for-Autonomous-Haul-Trucks

MATLAB
13
star
18

Intelligent-Bin-Picking-with-Universal-Robot

This MATLAB example shows how we can do Intelligent Bin picking with an Universal Robot URSeries Cobot
MATLAB
4
star
19

developing-swerve-robot-drivetrains

Simulink® models for design and development of robot swerve drivetrains. Use these models to simulate different drivetrain configurations under different environmental parameters, derive motor specifications, test maximum pushing forces, and evaluate control algorithms for autonomous and remote-controlled applications.
3
star
20

Support-and-Docker-Files-for-ROS-Toolbox

Makefile
3
star
21

autonomous-excavator

This repo contains a virtual testbench to develop and test autonomous algorithms for heavy offroad vehicles. The specific example included shows how to do motion planning for an autonomous excavator.
MATLAB
1
star
22

perception-for-manufacturing-objects

Starter code for detecting manufacturing objects
1
star