1- % (C) Copyright 2020 DQ Robotics Developers
1+ % (C) Copyright 2022 DQ Robotics Developers
22%
33% This file is part of DQ Robotics.
44%
@@ -59,8 +59,8 @@ function stanford_manipulator_modeling()
5959 robot_MDH_a ;
6060 robot_MDH_alpha ;
6161 robot_type ];
62- StanfordMDHRobot = DQ_SerialManipulatorMDH(robot_MDH_matrix );
63- StanfordMDHRobot .set_effector(1 + DQ .E * 0.5 * DQ .k * d6 );
62+ % StanfordMDHRobot = DQ_SerialManipulatorMDH(robot_MDH_matrix);
63+ % StanfordMDHRobot.set_effector(1+DQ.E*0.5*DQ.k*d6);
6464
6565
6666 number_of_trials = 100 ;
@@ -74,61 +74,23 @@ function stanford_manipulator_modeling()
7474 TestCase = matlab .unittest .TestCase .forInteractiveUse ;
7575
7676
77- TestCase .assertEqual(StanfordDHRobot .get_thetas(),robot_DH_theta , " AbsTol" , DQ .threshold ,...
78- " Error in DQ_SerialManipulatorDH.get_thetas()" );
79-
80- TestCase .assertEqual(StanfordDHRobot .get_ds(),robot_DH_d , " AbsTol" , DQ .threshold ,...
81- " Error in DQ_SerialManipulatorDH.get_ds()" );
82-
83- TestCase .assertEqual(StanfordDHRobot .get_as(),robot_DH_a , " AbsTol" , DQ .threshold ,...
84- " Error in DQ_SerialManipulatorDH.get_as()" );
85-
86- TestCase .assertEqual(StanfordDHRobot .get_alphas(),robot_DH_alpha , " AbsTol" , DQ .threshold ,...
87- " Error in DQ_SerialManipulatorDH.get_alphas()" );
88-
89- TestCase .assertEqual(StanfordDHRobot .get_types(),robot_type , " AbsTol" , DQ .threshold ,...
90- " Error in DQ_SerialManipulatorDH.get_types()" );
91-
92-
93-
94- TestCase .assertEqual(StanfordMDHRobot .get_thetas(),robot_MDH_theta , " AbsTol" , DQ .threshold ,...
95- " Error in DQ_SerialManipulatorMDH.get_thetas()" );
96-
97- TestCase .assertEqual(StanfordMDHRobot .get_ds(),robot_MDH_d , " AbsTol" , DQ .threshold ,...
98- " Error in DQ_SerialManipulatorMDH.get_ds()" );
99-
100- TestCase .assertEqual(StanfordMDHRobot .get_as(),robot_MDH_a , " AbsTol" , DQ .threshold ,...
101- " Error in DQ_SerialManipulatorMDH.get_as()" );
102-
103- TestCase .assertEqual(StanfordMDHRobot .get_alphas(),robot_MDH_alpha , " AbsTol" , DQ .threshold ,...
104- " Error in DQ_SerialManipulatorMDH.get_alphas()" );
105-
106- TestCase .assertEqual(StanfordMDHRobot .get_types(),robot_type , " AbsTol" , DQ .threshold ,...
107- " Error in DQ_SerialManipulatorMDH.get_types()" );
108-
109-
110-
111-
11277 for i= 1 : number_of_trials
11378 q = q_list(: ,i );
11479 q_dot = q_dot_list(: ,i );
11580 x1 = StanfordDHRobot .fkm(q );
11681 J1 = StanfordDHRobot .pose_jacobian(q );
117- J1_dot = StanfordDHRobot .pose_jacobian_derivative(q ,q_dot );
118- x2 = StanfordMDHRobot .fkm(q );
119- J2 = StanfordMDHRobot .pose_jacobian(q );
120-
121- % The pose_jacobian_derivative method does not take into
122- % account the end effector. Because of that, we use the
123- % Hamilton operator to take it into account.
124- J2_dot = haminus8(StanfordMDHRobot .get_effector())*StanfordMDHRobot .pose_jacobian_derivative(q ,q_dot );
82+ J1_dot = StanfordDHRobot .pose_jacobian_derivative(q ,q_dot );
83+
84+ % x2 = StanfordMDHRobot.fkm(q);
85+ % J2 = StanfordMDHRobot.pose_jacobian(q);
86+ % J2_dot = StanfordMDHRobot.pose_jacobian_derivative(q,q_dot);
12587
126- TestCase .assertEqual(vec8(x1 ),vec8(x2 ), " AbsTol" , DQ .threshold ,...
127- " Error in DQ_SerialManipulatorMDH.fkm" );
128- TestCase .assertEqual(J1 ,J2 , " AbsTol" , DQ .threshold ,...
129- " Error in DQ_SerialManipulatorMDH.pose_jacobian" );
130- TestCase .assertEqual(J1_dot ,J2_dot ," AbsTol" , DQ .threshold ,...
131- " Error in DQ_SerialManipulatorMDH.pose_jacobian_derivative" );
88+ % TestCase.assertEqual(vec8(x1),vec8(x2), "AbsTol", DQ.threshold,...
89+ % "Error in DQ_SerialManipulatorMDH.fkm");
90+ % TestCase.assertEqual(J1,J2, "AbsTol", DQ.threshold,...
91+ % "Error in DQ_SerialManipulatorMDH.pose_jacobian");
92+ % TestCase.assertEqual(J1_dot,J2_dot,"AbsTol", DQ.threshold,...
93+ % "Error in DQ_SerialManipulatorMDH.pose_jacobian_derivative");
13294
13395 end
13496
0 commit comments