rlober / tcfm

The matlab examples used in my glorious thesis!
0 stars 0 forks source link

Error in RunExampleCase (line : eePositionTask = EETask(robot, 1.0, 10.0, 0.2);) #1

Closed moucrob closed 7 years ago

moucrob commented 7 years ago

Can't run RunExampleCase. What matlab says, after i ran add_compatibility_and_feasability_path (no prob), then RunExampleCase :

Index exceeds matrix dimensions.

Error in EETask (line 15) obj.pos_ref = obj.pos_ref(1:3,4);

Error in RunExampleCase (line 33) eePositionTask = EETask(robot, 1.0, 10.0, 0.2);

Then, by removing the semicolon in end of the line line 14, so that it displays me obj.pos_ref = obj.R.fkine(qn) :

obj =

EETask with properties:

                         R: [1×1 SerialLink]
                    weight: 1
                        kp: 10
                        kd: 6.3246
                         J: []
                         E: []
                         f: []
                   acc_des: []
                       tau: []
                   acc_ref: [3×1 double]
                   vel_ref: [3×1 double]
                   **pos_ref: [1×1 SE3]**
          using_trajectory: 0
   using_spline_trajectory: []
                   pos_des: []
                 start_pos: []
                     alpha: []
      pointToPointDuration: 0
           first_traj_call: []
                        t0: []
                references: {}
     desired_accelerations: {}
desired_acceleration_norms: {}
                   max_vel: 0.2000
                qp_options: [1×1 struct]
                  real_pos: []
               spline_traj: []

what does obj.R.fkine(qn) please?

rlober commented 7 years ago

obj.R.fkine(qn) computes the forward kinematics of the manipulator and gives you the pose of the end effector.

instead of removing the semicolon from line 14, obj.pos_ref = obj.R.fkine(qn), please add the following:

obj.pos_ref = obj.R.fkine(qn);
disp(obj.pos_ref)
obj.pos_ref = obj.pos_ref(1:3,4);

The output should look like this:


         0    0.0000    1.0000    0.5963
   -0.0000    1.0000   -0.0000   -0.1501
   -1.0000   -0.0000    0.0000   -0.0144
         0         0         0    1.0000
rlober commented 7 years ago

Also, did you fix the robotics toolbox path?

moucrob commented 7 years ago

About the path, i moved the repository rvctools out of the repository tcfm-master. Now i have both on my desktop.

About your displayer, i dit what you said, and it still shows me :

add_compatibility_and_feasibility_path Robotics, Vision & Control: (c) Peter Corke 1992-2011 http://www.petercorke.com

  • Robotics Toolbox for MATLAB (release 10.1)
  • ARTE contributed code: 3D models for robot manipulators (C:\Users\Mathias\Desktop\rvctools\robot\data\ARTE)
  • pHRIWARE (release 1.1): pHRIWARE is Copyrighted by Bryan Moutrie (2013-2017) (c) Run rtbdemo to explore the toolbox ans =
'running example: temporally_incompatible_tasks'

Index exceeds matrix dimensions.

Error in EETask (line 16) obj.pos_ref = obj.pos_ref(1:3,4);

Error in RunExampleCase (line 33) eePositionTask = EETask(robot, 1.0, 10.0, 0.2);

So i don't have your output sorry

rlober commented 7 years ago

The error was caused by a version difference between the robotics toolboxes used. Versions >9 use SE3 group objects instead of 4x4 matrices.