Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

new robot.Configuration using Manipulator Shape Tracing in MATLAB and Simulink

1 Ansicht (letzte 30 Tage)
slowlearner
slowlearner am 1 Mai 2022
Geschlossen: slowlearner am 7 Mai 2022
as the title suggests i'm utilizing the "Manipulator Shape Tracing in MATLAB and Simulink" basicaly copied everything point for point. however, i'm not using the same robot sence i'm using the universalUR5 and i've gone through some of the documentation regarding homeConfiguration. But i fail to see how i can implement my own start configuration rather then the [0,0,0,0,0,0]' vector it has now.
I've tried implementing it in the "show" function:
qi = [5.7098 4.7468 1.5401 -2.9748 -4.9925 0.5846]'; % new joint config
ax = show(robot,qi,'PreservePlot',false, 'Frames', 'off');
then adding it as the ikInitGuess:
%% Setup Inverse Kinemtics Solver
ik = inverseKinematics('RigidBodyTree', robot);
%
qi = num2cell(qi);
ikInitGuess = homeConfiguration(robot);
[ikInitGuess.JointPosition] = qi{:};
%
ikWeights = [1 1 1 1 1 1];
as well as:
%% Define the orientation so that the end effector is oriented down
tf = getTransform(robot,qi, 'wrist_2_link','base_link');
robotOrientation = tf(1:3,1:3);% need some form of axang2rotm value for alignment with -z
but it results in a fairly amusing show of what i think are singularities
  2 Kommentare
Karsh Tharyani
Karsh Tharyani am 2 Mai 2022
Hi @slowlearner,
Could you clarify your question? It doesn’t look like you are calling the solver in the above snippet. You have created an instance of the solver, yes, but you haven’t called the step method on the solver which will output a joint configuration given an end-effector pose and an initial guess. In the example we have chosen the home configuration of the robot, as an initial guess, but you could provide others should you feel they could lead to faster solving times.
slowlearner
slowlearner am 7 Mai 2022
hi sorry i can be a bit unclear sometimes but yes thank you for pointing that out i edited the code to include the homeConfiguration(robot).

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by