[Matlab six-degree-of-freedom robot] Understanding of flexible workspace and reachable workspace (with MATLAB derivation code)

Past review

[Matlab six degrees of freedom robot]
1. Establish robot model
2. Kinematics positive solution
3. Construct workspace based on Monte Carlo Method

foreword

This article introduces the robot aboutflexible workspaceandaccessible workspace, how to understand flexible workspace and reachable workspace, and use the examples in the article to assist in understanding.


The following is the main text of this article, including the graphic understanding of flexible workspace and reachable workspace and the auxiliary understanding of code.

text

1. The definition and difference of the two working spaces

Definition: Workspace analysis is the first step in designing a robotic manipulator. The working space of the robot is the working area of ​​the robot manipulator, which is an important index to measure the performance of the robot. According to the posture characteristics of the manipulator when it is working, the workspace can be divided into reachable workspace and flexible workspace.

1. Accessible workspace

accessible workspacemeans that, for one degree of freedomGreater than 1As far as the mechanical structure is concerned, whether it is a translational joint structure or a rotary joint structure (except for ball joints), it will have a working range. During the movement of this joint, the points that can be swept by the coordinate system at the end can be regarded as the points that the mechanical mechanism can reach 位置. The non-reachable gesture, all of these things that can be reached 位置的点的集合, is the meaning of reachable workspace.

2. Flexible workspace

flexible workspacemeans that, for one degree of freedomgreater than 2mechanical structure, and isThere are more than 2 revolute joints in the same planeEach structure can reach a certain position with different postures (postures). During the motion of the revolving joint, the origin of the coordinate system at the end is at this point, but it arrives at a different attitude. The same position, in a different posture, that is different 位姿. And all of these can be reached at any point 位姿的点的集合, which is the meaning of flexible workspace.

小结:可达工作空间表示的是位置,灵活工作空间表示的是位姿。正是位置和位姿的两种不同表达方式将可达工作空间与灵活工作空间区分开。
Therefore, we can also see that for accessible workspaces, the conditions for realizing flexible workspaces are more stringent. However, both of these two workspaces contain a set of points in the position, and the set of points in the flexible workspace is obviously the set of points in the reachable workspace due to the harsh conditions.Subset.
Set of points in flexible space ⊆ Set of points in reachable space Set of points in flexible space ⊆ Set of points in reachable spaceA collection of points in a flexible spaceset of points in reachable space

2. Assist in understanding the code of the workspace

Take the planar link structure as an example to deepen the understanding of the workspace. The following is the planar linkage mechanism, the length of the first link is 120mm , and the length of the second link is 60mm .
Please add a picture description
code show as below:

%连杆偏移
d1 = 0;d2 = 0;d3 = 0;
%连杆长度
a1 = 0;a2 = 120;a3 = 60;
%连杆扭角
alpha1 = 0;alpha2 = 0;alpha3 = 0;
%建立机器人模型
%       theta  d        a        alpha     offset(关节变量偏移量)
L1=Link([0     d1       a1       alpha1    0     ],'modified');
L2=Link([0     d2       a2       alpha2    0     ],'modified');
L3=Link([0     d3       a3       alpha3    0     ],'modified');
%限制机器人的关节空间
L1.qlim = [(-165/180)*pi,(165/180)*pi];
L2.qlim = [(-95/180)*pi, (70/180) *pi];
L3.qlim = [(-85/180)*pi, (95/180) *pi];
%连接连杆,机器人取名平面连杆
robot=SerialLink([L1 L2 L3],'name','平面连杆');
robot.plot([0,0,0]);
%输出机器人模型,后面的三个角为输出时的theta姿态
robot.teach()

1. Code representation of reachable workspace

The reachable workspace expresses a set of given positions, and at least one direction (solution) at the end of the manipulator can reach the position in the set, then the set is the reachable space of the manipulator.

For the above-mentioned planar linkage mechanism, its reachable working space is as follows:accessible workspace
code show as below:

theta1min = -165;theta1max = 165;
theta2min = -95 ;theta2max = 70 ;
theta3min = -85 ;theta3max = 95 ;
n = 3000;
x = zeros;y = zeros;z = zeros;
for i = 1:n

    theta1 = theta1min*(pi/180) + (theta1max-theta1min)*(pi/180)*rand;
    theta2 = theta2min*(pi/180) + (theta2max-theta2min)*(pi/180)*rand;
    theta3 = theta3min*(pi/180) + (theta3max-theta3min)*(pi/180)*rand;
        
    Tws = robot.fkine([theta1,theta2,theta3]);
    x(i) = Tws.t(1,1);
    y(i) = Tws.t(2,1);
    z(i) = Tws.t(3,1);
end
figure('color',[1 1 1]);
plot3(x,y,z,'b.','MarkerSize',0.5)
hold on
xlabel('x轴(millimeter)','color','k','fontsize',15);
ylabel('y轴(millimeter)','color','k','fontsize',15);
zlabel('z轴(millimeter)','color','k','fontsize',15);
grid on

2. Code Representation of Flexible Workspace

The flexible workspace expresses a given set of positions, and any direction (solution) at the end of the manipulator can reach the position in the set, then the set is the secondary workspace of the manipulator.

For the above planar linkage mechanism, for a certain position point [ x , y ] [x,y][x,y ] The flexible workspace formula is derived as follows:
Notice:The position point [ x , y ] [x,y][x,y ] On the linear equation
{ L 1 = 120 L 2 = 60 x = L 1 cos Θ 1 + L 2 cos ( Θ 1 + Θ 2 ) y = L 1 sin Θ 1 + L 2 sin ( Θ 1 + Θ 2 ) \left\{ \begin{aligned} L_1&=120\\ L_2&=6 0\\ x&=L_1cos\Theta_1+L_2cos(\Theta_1+\Theta_2)\\ y&=L_1sin\Theta_1+L_2sin(\Theta_1+\Theta_2) \end{aligned} \right.L1L2xy=120=60=L1cosΘ1+L2c o s ( Th1+Th2)=L1sinΘ1+L2s i n ( Th1+Th2)
For the above formula usesolveThe function is solved, and the values ​​corresponding to theta1 and theta2 are obtained
code show as below:

syms theta1 theta2
l1 = 120;
l2 = 60;
eq1 = x == l1*cos(theta1)+l2*cos(theta1+theta2);
eq2 = y == l1*sin(theta1)+l2*sin(theta1+theta2);
s = solve(eq1,eq2,[theta1,theta2]);
s1 = [s.theta1(1) s.theta2(1)];
s2 = [s.theta1(2) s.theta2(2)];

Solutions have to:
s 1 = { t h e t a 1 = 2 ∗ a t a n ( ( 240 ∗ y − ( 3600 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) + ( x 2 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) + ( y 2 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) ) / ( x 2 + 240 ∗ x + y 2 + 10800 ) ) t h e t a 2 = − 2 ∗ a t a n ( ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) / ( x 2 + y 2 − 3600 ) ) s1=\left\{ \begin{aligned} theta1&=2*atan((240*y - (3600*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600) + (x^2*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600) + (y^2*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600))/(x^2 + 240*x + y^2 + 10800)) \\ theta2&=-2*atan((-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2)/(x^2 + y^2 - 3600)) \end{aligned} \right. page 1={ theta1t h e t a 2=2a t a n ( ( _ _ _y(3600((x2+y23600)(x2+y232400))(1/2))/(x2+y23600)+(x2((x2+y23600)(x2+y232400))(1/2))/(x2+y23600)+(y2((x2+y23600)(x2+y232400))(1/2))/(x2+y23600))/(x2+240x+y2+10800))=2a t a n ( ( ( x2+y23600)(x2+y232400))(1/2)/(x2+y23600))
s 2 = { t h e t a 1 = 2 ∗ a t a n ( ( 240 ∗ y + ( 3600 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) − ( x 2 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) − ( y 2 ∗ ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) ) / ( x 2 + y 2 − 3600 ) ) / ( x 2 + 240 ∗ x + y 2 + 10800 ) ) t h e t a 2 = 2 ∗ a t a n ( ( − ( x 2 + y 2 − 3600 ) ∗ ( x 2 + y 2 − 32400 ) ) ( 1 / 2 ) / ( x 2 + y 2 − 3600 ) ) s2=\left\{ \begin{aligned} theta1&=2*atan((240*y + (3600*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600) - (x^2*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600) - (y^2*(-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2))/(x^2 + y^2 - 3600))/(x^2 + 240*x + y^2 + 10800)) \\ theta2&=2*atan((-(x^2 + y^2 - 3600)*(x^2 + y^2 - 32400))^(1/2)/(x^2 + y^2 - 3600)) \end{aligned} \right. s 2={ theta1t h e t a 2=2a t a n ( ( _ _ _y+(3600((x2+y23600)(x2+y232400))(1/2))/(x2+y23600)(x2((x2+y23600)(x2+y232400))(1/2))/(x2+y23600)(y2((x2+y23600)(x2+y232400))(1/2))/(x2+y23600))/(x2+240x+y2+10800))=2a t a n ( ( ( x2+y23600)(x2+y232400))(1/2)/(x2+y23600))


Summarize

The above is about the content of flexible workspace and accessible workspace. This article introduces in detail how to understand the definition and difference of workspace, and uses graphics and codes to assist in understanding.

references

  1. Workspace Analysis
  2. Primary WorkSpace and Secondary WorkSpace
  3. Two working space understandings of the robotic arm
  4. Matlab solves equations solve

Guess you like

Origin blog.csdn.net/AlbertDS/article/details/123861656