Giter Site home page Giter Site logo

lavender-lee / trajectory-planning-robot-manipulators Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mathworks-robotics/trajectory-planning-robot-manipulators

0.0 0.0 0.0 1.77 MB

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

MATLAB 100.00%

trajectory-planning-robot-manipulators's Introduction

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

trajectory-planning-robot-manipulators's People

Contributors

sea-bass avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.