Getting error in Inverse Kinematic block using robotics system toolbox for 2 DOF planner robot
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Danaish
el 1 de Jun. de 2023
Comentada: Danaish
el 1 de Jun. de 2023
I'm trying to control 2 DOF manipulator by providing xyz waypoints using signal builder. The robot model is imported from SolidWorks.
I have also tried to run simulation without IK block providing some input to joint q1 and q2 to check the simlation model and it shows no error. However with inverse kinematics it shows error.
The Simulink model is attached below;
And when I simulate the model it shows error as;
clicking the IKBlock line and following the code going to line 69 we get;
% Assign the robot internal property by instantiating from the structure
obj.TreeInternal = robotics.manip.internal.RigidBodyTree(obj.TreeStruct.NumBodies, obj.TreeStruct);
obj.IKInternal = inverseKinematics('RigidBodyTree', obj.TreeInternal, ... % ---------------line 69
'SolverAlgorithm', obj.SolverName, 'SolverParameters', obj.SolverParameters, ...
'UserTimer', obj.UserTimer);
end
I have tried few resources but couldn't get answer to solve this issue. Unfortuanelty, I am not sure how I can make the simulation work for 2 DOF model.Thank you.
0 comentarios
Respuesta aceptada
Walter Roberson
el 1 de Jun. de 2023
rename your MATLAB\inverseKinematics.m to a different name. The current name is interfering with a built-in model with the same name.
0 comentarios
Más respuestas (1)
Nathan Hardenberg
el 1 de Jun. de 2023
Your error seems to indicate, that you want to run a script as a function. While your setup looks good, it could be that you have a script named "inverseKinematics.m" or "inverseKinematics.mlx" in your working directory. Maybe MATLAB then confuses this with the desired function. (Link to related Post)
If this is the case, simply renaming this script should resolve the problem!
Otherwise the more time-efficient method is maybe calculating the inverse kinematics yourself with a MATLAB-function. Since it is only a 2-DOF Robot this should not be that difficult.
2 comentarios
Ver también
Categorías
Más información sobre Robotics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!