1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. General Category - Robot Forum
  4. Robot Geometry, Linear Algebra, Forward and Inverse Kinematics
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Trajectory planning for robot manipulator

  • TeChNoRoBoT
  • February 9, 2021 at 2:41 PM
  • Thread is Unresolved
  • TeChNoRoBoT
    Guest
    • February 9, 2021 at 2:41 PM
    • #1

    Hello again!

    How to do trajectory planning via MATLAB?

    What is the best way to do this?

    I have computed by hand the forward kinematics via D-H, also the forward differential kinematics (Jacobian matrix) and inverse differential kinematics, but I'm not sure if inverse kinematics is correct.

    So I don't want to use inverse kinematics for trajectory planning.

    Thanks in advance!

  • BOTTECH
    Reactions Received
    9
    Trophies
    3
    Posts
    109
    • February 10, 2021 at 11:14 AM
    • #2

    Matlab has an inbuilt inverse kinematics solver function that you can use and can also specify the algorithm that you want to use to solve. You just need to model your system as a RigidBodyTree model

    Check out:

    https://www.mathworks.com/help/robotics/…tem-object.html

  • BOTTECH
    Reactions Received
    9
    Trophies
    3
    Posts
    109
    • February 10, 2021 at 11:28 AM
    • #3

    For example here is a sample of the creation of a RigidBody joint for the MCP joint on an index finger that is attached to a body called "hand"

    Code
    %Index MCP joint
    body = robotics.RigidBody('IndexL1');
    %Indicate as reolutionary joint
    joint = robotics.Joint('IndexMCP', 'revolute');
    %rotation limits
    joint.PositionLimits = [0 pi/2];
    %Set location
    setFixedTransform(joint,trvec2tform([0 0 0]));
    %rotation axis
    joint.JointAxis = [0 1 0];
    body.Joint = joint;
    %connect to index knuckle
    addBody(hand, body, 'base2Index');
    Display More
  • TeChNoRoBoT
    Guest
    • February 10, 2021 at 2:46 PM
    • #4

    I'm going to check it! Thank you very much!

  • TeChNoRoBoT
    Guest
    • February 11, 2021 at 2:23 PM
    • #5

    I tried it and manage to create rigidbodytree and find inverse kinematics, but I don't know how to do trajectory planning.

    This is my code so far

    Code
    %% *** Robot (kinematic) model parameters for Kuka 6-dof *** 
    clear all; close all; clc;
    % Lengths of robot links in mm
    l0 = 810;
    l1 = 200; 
    l2 = 600;
    l3 = 30;
    l4 = 140;
    l5 = 550;
    l6 = 100;
    l7 = 100;
    
    %% D-H parameters 
    % columns:   a,    alpha,   d,    theta
    dhparams = [l1     -pi/2    l0       0;
                l2       0       l3      -pi/2;
                l4       -pi/2    0        0;
                0       pi/2    l5      0;
                0      -pi/2    l6      0;
                0      0       l7      0];
            
    %% Create RigidBodyTree for Kuka
    Kuka = rigidBodyTree;
    body1 = rigidBody('body1');
    q1 = rigidBodyJoint('q1','revolute');
    setFixedTransform(q1,dhparams(1,:),'dh');
    body1.Joint = q1;
    addBody(Kuka,body1,'base');
    body2 = rigidBody('body2');
    q2 = rigidBodyJoint('q2','revolute');
    body3 = rigidBody('body3');
    q3 = rigidBodyJoint('q3','revolute');
    body4 = rigidBody('body4');
    q4 = rigidBodyJoint('q4','revolute');
    body5 = rigidBody('body5');
    q5 = rigidBodyJoint('q5','revolute');
    end_effector = rigidBody('end_effector');
    q6 = rigidBodyJoint('q6','revolute');
    setFixedTransform(q2,dhparams(2,:),'dh');
    setFixedTransform(q3,dhparams(3,:),'dh');
    setFixedTransform(q4,dhparams(4,:),'dh');
    setFixedTransform(q5,dhparams(5,:),'dh');
    setFixedTransform(q6,dhparams(6,:),'dh');
    body2.Joint = q2;
    body3.Joint = q3;
    body4.Joint = q4;
    body5.Joint = q5;
    end_effector.Joint = q6;
    addBody(Kuka,body2,'body1');
    addBody(Kuka,body3,'body2');
    addBody(Kuka,body4,'body3');
    addBody(Kuka,body5,'body4');
    addBody(Kuka,end_effector,'body5');
    showdetails(Kuka);
    figure(1)
    axis([-1000,1000,-1000,1000,-1000,1000])
    axis off
    
    %% Compute Inverse Kinematics
    homeConfig = Kuka.homeConfiguration;
    tform = getTransform(Kuka,homeConfig,'base','end_effector');
    ik = inverseKinematics('RigidBodyTree',Kuka);
    weights = [0.25 0.25 0.25 1 1 1];
    initialguess = Kuka.homeConfiguration;
    [config,Info] = ik('end_effector',tform,weights,initialguess)
    show(Kuka,config);
    Display More
  • BOTTECH
    Reactions Received
    9
    Trophies
    3
    Posts
    109
    • February 11, 2021 at 3:14 PM
    • #6

    So you now have an inverse kinematics solver for your robot but the trajectory planning depends on how you want to do it because it can be as complicated or as simple as you want to make it, it just depends on what you are trying to achieve.

    You could define a path in point space and then use your IK solver to get the joint angles at that target point and then compute the difference between your current position and your target location on the path, then step through the robot joint angles until you reach that point, putting certain constraints around them so you define the direction the axis is to move +/- and so you don't have two axis' come into contact with each other or don't rotate past the limits of the simulated motors.

    With a multi DoF robot you will also have the possibility of reaching a point in various different ways so you will need to consider adding in parameters to define the way in which you want the robot to reach the point e.g. imagine reaching your hand out to grab something on your desk, you could reach the object with your elbow facing toward the ceiling but could also reach it with your elbow facing the floor.

    Then to add further to that you can then dive into optimization techniques on how to optimize your path planning based on specific parameters.

    Check out this video and it will help you:

    https://www.mathworks.com/videos/traject…6705635398.html

  • TeChNoRoBoT
    Guest
    • February 12, 2021 at 10:57 PM
    • #7

    I did everything but did not get anything out of it, I was constantly confused and started all over again.

    I'm noob on robotics toolbox.

    for example I saw all these links:

    https://www.mathworks.com/help/supportpk…ndeffector.html

    https://www.mathworks.com/matlabcentral/…ot-manipulators

    https://www.mathworks.com/help/robotics/…idbodytree.html

    https://www.mathworks.com/help/robotics/…a5-59f2ff1a4c68

    https://www.mathworks.com/help/robotics/….html#d122e8296

    This is that I want to do:

  • BOTTECH
    Reactions Received
    9
    Trophies
    3
    Posts
    109
    • February 15, 2021 at 9:36 AM
    • #8

    Did you look at the video in the link that I sent you? it has everything that you need and even has the files to download to do it

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • inverse kinematics
  • Trajectory planning
  • D-H
  • forward kinematics
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download