Problem with a simple Modul

Help
Anonymous
2011-03-23
2013-05-01

  • Anonymous
    2011-03-23

    Hi,

    i want to use  the Robotic toolbox to build a simple robotic modul.
    the code:

    ->L=list();
               // alpha    A  theta    D   sigma     
    ->L(1)=rt_link(,'sta');
    ->L(2)=rt_link(,'sta');

    ->r=rt_robot(L,"rp_A1");
    ->r.offset=;

    ->q=;
    ->VT=rt_fkine(r,q)
    ->xdel();

    ->h0 = scf(0); a0 = h0.children;              
    ->a0.tight_limits = "off";
    ->a0.rotation_angles = ;
    ->rt_plot(r,q,"base");

    the original DH-Parameters should be:

    J.N,  D,                A,    Alpha,    Theta,             Sigma
    1,       0,               0,   -%pi/2,  0+Variable,       0
    2,  1+Variable,   0,     0,            0,                     1

    Problems:
    1. I don't know whether i have right codes
    2. that was no base and TCP-coordinate in the Image
    3. how can i get the coordinates for the another joints in the Image

    I hope that you can understand me and help me to find the solution,thank's a lot

     
  • Matteo Morelli
    Matteo Morelli
    2011-03-29

    Hi,

    I apologize for the late reply

    1. I don't know whether i have right codes

    Yes, you have.

    that was no base and TCP-coordinate in the Image

    This is due to the simple heuristic figuring the maximum reach of the robot (line 126 in macros/rt_plot_options.sci). In your example, both the links have a 0 (zero) both in A and in D and the function is not able to guess the right workspace of the robot. Try to specify a workspace yourself, e.g.:

    rt_plot(r,q,"base", "workspace", [-2,2,-1,1,-1,1]);
    

    how can i get the coordinates for the another joints in the Image

    I'm not sure to understand exactly what you're asking here, but you can get the joint values of a robot that you have plotted by typing the following command:

    rt_plot(r),
    

    Let me know if you have other questions.

    Regards,

    • Matteo
     

  • Anonymous
    2011-04-04

    Hi,
    Thanks for the answers.
    It's great to know that i have the right codes.
    I have tried your tipps and it works.

    About the third point, i just want to draw  the coordinations of all joints in the Image, just like the xyz-coordination of TCP.

    I am doing my Bacholerworks currently about how to use this Toolbox  to  help the students understand Robots better. So i think that i will get more questions.
    Thanks  again for the help.
    Regards,
    -
    Ni

     
  • Matteo Morelli
    Matteo Morelli
    2011-04-06

    About the third point, i just want to draw the coordinations of all joints in the Image, just like the xyz-coordination of TCP

    Ah, ok. I see it, now.

    Unfortunately, this is not supported at the moment. The only reference frame you can visualize in a straightforward manner,  i.e. without changing anything of the standard graphics of RTSS, is the reference frame at the robot's end-effector.

    Anyway, for a 'static' picture of your robot in a given configuration, you may be interested in trying the following workaround:

    // ONLY FOR A SINGLE JOINT-SET
    // ===========================
    // 'unassemble' the robot model
    r1 = rt_robot([-%pi/2, 0, 0, 0], "1st link");
    r2 = rt_robot([0, 0, 0, 0, 1], "2nd link"); r2.offset = 1;
    // prepare a config for your robot
    q = [2*%pi*rand(1) - %pi, rand(1)];
    // -------------- <plotting> ----------------
    //
    // the plotting requires 2 steps:
    //
    // 1) update r2.base
    r2.base = rt_fkine(r1, q(1));
    // 2) perform the actual task of plotting
    rt_plot(r1, q(1), "noname", "base", "workspace", [-2,2,-1,1,-1,1]);
    rt_plot(r2, q(2), "noname", "nobase", "workspace", [-2,2,-1,1,-1,1]);
    // -------------- </plotting> ---------------
    

    Note that in order this workaround does work for another config, you have to clear the current figure before running the code above enclosed in

    <plotting>...</plotting>
    

    . I.e:

    // prepare a new config for your robot
    q = [2*%pi*rand(1) - %pi, rand(1)];
    // clear the current figure
    clf();
    // -------------- <plotting> ----------------
    ...
    // -------------- </plotting> ---------------
    

    Of course this workaround in unfeasible for animations. I will consider to change this behaviour in future releases.

    I am doing my Bacholerworks currently about how to use this Toolbox to help the students understand Robots better

    Great!

    For statistical and information purposes, we are in process of compiling a list of projects and courses which are using RTSS. If you are using RTSS for teaching purposes, we would be glad to add the name of your Institution to this list. If you like, you can provide further details of your work via email: mmorelli@users.sourceforge.net

    So i think that i will get more questions. Thanks again for the help.

    You are welcome.

    Regards,

    Matteo