2-D Kinematic robot example code
조회 수: 11 (최근 30일)
이전 댓글 표시
Good Afternoon,
I have three questions.
1) I am using the following code, https://www.mathworks.com/help/robotics/ug/2d-inverse-kinematics-example.html and I am struggling to move the base from the coordinates 0,0. I can move the other links however how can I change the coordinates in the base to any location in this workspace?
2) When using this code I see the following in line 62---> points = center + radius*[cos(theta) sin(theta) zeros(size(theta))];
What does the cos(theta) sin(theta) mean and why is this specific equation relevant to this movement as opposed to other kinematic equations?
3) I would like to show how the end effector can be in a position to measure a certain area of a figure. Is it possible to merge a figure from another script so that the kinematics appear to be acting on that specific figure?
Thank you,
Evan
댓글 수: 0
채택된 답변
Remo Pillat
2021년 4월 13일
Hi Evan,
Line 62 defines the shape of the figure that the robot should draw (a circle in the case of this example). Points on a unit circle (with radius 1 and center point [0,0]) are defined by x = cos(theta) and y = sin(theta). The equation is simply multiplying by the radius to scale the circle and moving it to a different center point. See https://en.wikipedia.org/wiki/Unit_circle.
This equation generates a number of discrete points on the circle and the rest of the example uses those discrete points to calculate inverse kinematics solutions for the robot arm to reach these points. You could replace the circle with any other figure you have, as long as you have a way to calculate discrete points on the figure that the robot can follow.
For your question (1): for inverse kinematics purposes, the coordinates that the end effector should reach are always relative to the robot base. If you have global coordinates for end effector poses, you need to convert them to coordinates relative to the robot base and then you should be able to use that code.
Hope this helps,
Remo
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Robotics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!