智能机器人与旋量代数(12)

news2024/9/30 11:40:44

Chapt 4. 旋量代数在机器人学中的应用

4.1 串联机器人正运动学的指数积(PoE, Product of Exponetial)公式

4.1.1 回顾:机器人正运动学的Denavit-Hartenberg (D-H)参数公式

D-H 建模法: D-H 建模方法是由 Denavit 和 Hartenberg (ASME, 1955) 提出的一种建模方法,主要用在机器人运动学上。此方法在机器人的每个连杆上建立一个坐标系,通过齐次坐标变换实现两个连杆上的坐标变换,建立多连杆串联系统中首末坐标系的变换关系。
在这里插入图片描述

D-H 建模方法的几个要点如下:

a. 建立连杆坐标系;

b.确定四个参数 α \alpha α, a a a, d d d, θ \theta θ

c. 列D-H参数表;

d.由参数表得到变换矩阵;

D-H 建模方法中,每个连杆使用 4 个参数 α \alpha α, a a a, d d d, θ \theta θ 来描述,2 个描述连杆本身,另外 2 个描述与相邻连杆的位姿(连接或几何关系)。

对于转动关节,其中 θ \theta θ 为关节变量,其他三个参数固定不变,为连杆参数;对于移动关节, d d d 为关节变量,其他三个为关节参数。

根据连杆坐标系和关节对应关系的不同,D-H 建模法可以分为传统 D-H (Classic DH) 和改进 D-H (Modified DH),二者的主要区别如下表所示。

区别Classic D-HModified D-H
连杆固定坐标系的位置后一个关节坐标系前一个关节坐标系
X X X 轴的确定方式当前坐标系 Z Z Z 轴和前一个坐标系 Z Z Z 轴的向量积后一个坐标系 Z Z Z 轴与当前坐标系 Z Z Z 轴的向量积
坐标系间的参数变换顺序 θ \theta θ, d d d, a a a, α \alpha α α \alpha α, a a a, θ \theta θ, d d d

Classic D-H:

Classic DH 的关节和坐标系关系中各个参数的含义如下:

θ i \theta_{i} θi: X i − 1 X_{i-1} Xi1 X i X_{i} Xi Z i − 1 Z_{i-1} Zi1旋转的角度;

d i d_{i} di: X i − 1 X_{i-1} Xi1 X i X_{i} Xi 沿 Z i − 1 Z_{i-1} Zi1 方向的距离;

a i a_{i} ai Z i − 1 Z_{i-1} Zi1 Z i Z_{i} Zi 沿 X i − 1 X_{i-1} Xi1 方向的距离;

α i \alpha_{i} αi: Z i − 1 Z_{i-1} Zi1 Z i Z_{i} Zi X i − 1 X_{i-1} Xi1 旋转的角度

坐标系 O i − 1 O_{i-1} Oi1 与关节 i i i 对齐,其 D-H 参数矩阵为:

i i − 1 T = [ cos ⁡ θ i − sin ⁡ θ i cos ⁡ α i sin ⁡ θ i sin ⁡ α i a i cos ⁡ θ i sin ⁡ θ i cos ⁡ θ i cos ⁡ α i − cos ⁡ θ i sin ⁡ α i a i sin ⁡ θ i 0 sin ⁡ α i cos ⁡ α i d i 0 0 0 1 ] _{i}^{i-1}T = \begin{bmatrix} \cos{\theta_{i}} & -\sin{\theta_{i}} \cos{\alpha_{i}} & \sin{\theta_{i}} \sin{\alpha_{i}} & a_{i} \cos{\theta_{i}} \\ \sin{\theta_{i}} & \cos{\theta_{i}} \cos{\alpha_{i}} & -\cos{\theta_{i}} \sin{\alpha_{i}} & a_{i} \sin{\theta_{i}} \\ 0 & \sin{\alpha_{i}} & \cos{\alpha_{i}} & d_{i} \\ 0 & 0 & 0 & 1 \end{bmatrix} ii1T= cosθisinθi00sinθicosαicosθicosαisinαi0sinθisinαicosθisinαicosαi0aicosθiaisinθidi1

Modified DH:

Modified D-H 的关节和坐标系关系中各个参数的含义如下:

α i − 1 \alpha_{i-1} αi1 Z i − 1 Z_{i-1} Zi1 Z i Z_{i} Zi X i − 1 X_{i-1} Xi1 旋转的角度;

a i − 1 a_{i-1} ai1 Z i − 1 Z_{i-1} Zi1 Z i Z_{i} Zi 沿 X i − 1 X_{i-1} Xi1 方向的距离;

θ i \theta_{i} θi X i − 1 X_{i-1} Xi1 X i X_{i} Xi Z i Z_{i} Zi 旋转的角度;

d i d_{i} di X i − 1 X_{i-1} Xi1 X i X_{i} Xi沿 Z i Z_{i} Zi 方向的距离。

坐标系 O i − 1 O_{i-1} Oi1 与关节 i − 1 i-1 i1 对齐,其 D-H 参数矩阵为:
在这里插入图片描述

i i − 1 T = [ cos ⁡ θ i − sin ⁡ θ i 0 a i − 1 sin ⁡ θ i cos ⁡ α i − 1 cos ⁡ θ i cos ⁡ α i − 1 − sin ⁡ α i − 1 − d i sin ⁡ α i − 1 sin ⁡ θ i sin ⁡ α i − 1 cos ⁡ θ i sin ⁡ α i − 1 cos ⁡ α i − 1 d i cos ⁡ α i − 1 0 0 0 1 ] _{i}^{i-1}T = \begin{bmatrix} \cos{\theta_{i}} & -\sin{\theta_{i}} & 0 & a_{i-1} \\ \sin{\theta_{i}} \cos{\alpha_{i-1}} & \cos{\theta_{i}} \cos{\alpha_{i-1}} & -\sin{\alpha_{i-1}} & -d_{i} \sin{\alpha_{i-1}} \\ \sin{\theta_{i}} \sin{\alpha_{i-1}} &\cos{\theta_{i}} \sin{\alpha_{i-1}} & \cos{\alpha_{i-1}} & d_{i} \cos{\alpha_{i-1}} \\ 0 & 0 & 0 & 1 \end{bmatrix} ii1T= cosθisinθicosαi1sinθisinαi10sinθicosθicosαi1cosθisinαi100sinαi1cosαi10ai1disinαi1dicosαi11

Modified DH 克服了 Classic DH 在用于树型结构机器人时可能出现的问题,比较常用,故之后主要介绍这种方法,并使用该方法进行建模。

机械臂连杆坐标系的建立

建立机械臂连杆坐标系的步骤:

a. 确定各个关节轴和连杆,坐标系的 Z Z Z 轴沿关节轴线方向;

b. 找出相邻两关节轴线的交点或公垂线,用于确定坐标系 { i } \{i\} {i} 的原点:以关节轴 i i i i + 1 i+1 i+1 的交点或公垂线与关节轴 i i i 的交点为原点;

c. 确定 X X X 轴:两轴线相交时, X i ⃗ = ± Z i + 1 ⃗ × Z i ⃗ \vec{X_{i}} = \pm \vec{Z_{i+1}} \times \vec{Z_{i}} Xi =±Zi+1 ×Zi ;两轴线不相交时, X i X_{i} Xi 轴与公垂线重合,方向为 i i i i + 1 i+1 i+1

d. 右手定则确定 Y i Y_{i} Yi 轴;

e. 确定基坐标系 { 0 } \{0\} {0}:为了简化问题, Z 0 Z_0 Z0 通常与关节 1 的轴线方向重合,且当关节变量 1 为 0 时,坐标系 { 0 } \{0\} {0} { 1 } \{1\} {1} 重合;

f. 确定末端坐标系 { n } \{n\} {n}:对于转动关节, θ n = 0 \theta_n = 0 θn=0 时, X n X_n Xn X n − 1 X_{n-1} Xn1 方向相同,选取原点使 d n = 0 d_n = 0 dn=0;对于移动关节,取 X n X_n Xn 方向使 θ n = 0 \theta_n = 0 θn=0,当 d n = 0 d_n = 0 dn=0 时,取 X n − 1 X_{n-1} Xn1 X n X_n Xn 的交点为原点。

D-H 参数表

根据机械臂各个连杆间坐标系的关系,采用 Modified D-H 形式,得到的参数表如下。

i i i α i − 1 \alpha_{i-1} αi1 a i − 1 a_{i-1} ai1 θ i − 1 \theta_{i-1} θi1 d i d_{i} di θ \theta θ 的范围
1 0 ∘ 0^{\circ} 0 0 0 0 θ 1 \theta_{1} θ1 0 0 0 ( − 2 π 3 , 2 π 3 ) (-\frac{2 \pi}{3}, \frac{2 \pi}{3}) (32π,32π)
2 − 9 0 ∘ -90^{\circ} 90 a 1 a_{1} a1 θ 2 \theta_{2} θ2 0 0 0 ( − π 2 , 0 ) (-\frac{\pi}{2}, 0) (2π,0)
3 0 ∘ 0^{\circ} 0 a 2 a_{2} a2 θ 3 \theta_{3} θ3 0 0 0 ( − 2 π 3 , 2 π 3 ) (-\frac{2 \pi}{3}, \frac{2 \pi}{3}) (32π,32π)
4 0 ∘ 0^{\circ} 0 a 3 a_{3} a3 θ 4 \theta_{4} θ4 0 0 0 ( − 7 π 6 , π 6 ) (-\frac{7 \pi}{6}, \frac{\pi}{6}) (67π,6π)
5 − 9 0 ∘ -90^{\circ} 90 0 0 0 θ 5 \theta_{5} θ5 0 0 0 ( − 2 π 3 , 2 π 3 ) (-\frac{2 \pi}{3}, \frac{2 \pi}{3}) (32π,32π)

在这里插入图片描述

齐次变换矩阵

将 DH 参数表代入 Modified DH 的 DH 参数矩阵,可以得到各个坐标系间的齐次变换矩阵 1 0 T _{1}^{0}T 10T, 2 1 T _{2}^{1}T 21T, 3 2 T _{3}^{2}T 32T, 4 3 T _{4}^{3}T 43T 5 4 T _{5}^{4}T 54T 则可得基坐标系到末端坐标系的齐次变换矩阵:

5 0 T = 1 0 T 2 1 T 3 2 T 4 3 T 5 4 T = [ n x o x ; a x p x n y o y a y ; p y n z o z a z p z 0 0 0 1 ] _{5}^{0}T = {_{1}^{0}T} {_{2}^{1}T} {_{3}^{2}T} {_{4}^{3}T} {_{5}^{4}T} = \begin{bmatrix} n_{x} & o_{x} &;a_{x} & p_{x} \\ n_{y} & o_{y} & a_{y} &; p_{y} \\ n_{z} & o_{z} & a_{z} & p_{z} \\ 0 & 0 & 0 & 1 \end{bmatrix} 50T=10T21T32T43T54T= nxnynz0oxoyoz0;axayaz0px;pypz1

其中,
[ p x p y p z ] T \begin{bmatrix} p_{x} & p_{y} & p_{z} \end{bmatrix}^T [pxpypz]T
为机械臂末端在基坐标系中的位置,
[ n x n y n z ] T \begin{bmatrix} n_{x} & n_{y} & n_{z} \end{bmatrix}^T [nxnynz]T
为机械臂末端坐标系 X X X 轴在基坐标系中的方向矢量,
[ o x o y o z ] T \begin{bmatrix} o_{x} & o_{y} & o_{z} \end{bmatrix}^T [oxoyoz]T
为机械臂末端坐标系 Y Y Y 轴在基坐标系中的方向矢量,
[ a x a y a z ] T \begin{bmatrix} a_{x} & a_{y} & a_{z} \end{bmatrix}^T [axayaz]T
为机械臂末端坐标系 Z Z Z 轴在基坐标系中的方向矢量。

代入 D-H 参数,可得
n x = s 1 s 5 + c 1 c 2 c 3 c 4 c 5 − c 1 c 2 c 5 s 3 s 4 − c 1 c 3 c 5 s 2 s 4 − c 1 c 4 c 5 s 2 s 3 n y = c 2 c 3 c 4 c 5 s 1 − c 1 s 5 − c 2 c 5 s 1 s 3 s 4 − c 3 c 5 s 1 s 2 s 4 − c 4 c 5 s 1 s 2 s 3 n z = c 5 s 2 s 3 s 4 − c 2 c 4 c 5 s 3 − c 3 c 4 c 5 s 2 − c 2 c 3 c 5 s 4 o x = c 5 s 1 − c 1 c 2 c 3 c 4 s 5 + c 1 c 2 s 3 s 4 s 5 + c 1 c 3 s 2 s 4 s 5 + c 1 c 4 s 2 s 3 s 5 o y = c 2 s 1 s 3 s 4 s 5 − c 2 c 3 c 4 s 1 s 5 − c 1 c 5 + c 3 s 1 s 2 s 4 s 5 + c 4 s 1 s 2 s 3 s 5 o z = c 2 c 3 s 4 s 5 + c 2 c 4 s 3 s 5 + c 3 c 4 s 2 s 5 − s 2 s 3 s 4 s 5 a x = c 1 s 2 s 3 s 4 − c 1 c 2 c 4 s 3 − c 1 c 3 c 4 s 2 − c 1 c 2 c 3 s 4 a y = s 1 s 2 s 3 s 4 − c 2 c 4 s 1 s 3 − c 3 c 4 s 1 s 2 − c 2 c 3 s 1 s 4 a z = c 2 s 3 s 4 + c 3 s 2 s 4 + c 4 s 2 s 3 − c 2 c 3 c 4 p x = a 1 c 1 + a 2 c 1 c 2 + a 3 c 1 c 2 c 3 − a 3 c 1 s 2 s 3 p y = a 1 s 1 + a 2 c 2 s 1 + a 3 c 2 c 3 s 1 − a 3 s 1 s 2 s 3 p z = − a 2 s 2 − a 3 c 2 s 3 − a 3 c 3 s 2 n_{x} = s_{1} s_{5} + c_{1} c_{2} c_{3} c_{4} c_{5} - c_{1} c_{2} c_{5} s_{3} s_{4} - c_{1} c_{3} c_{5} s_{2} s_{4} - c_{1} c_{4} c_{5} s_{2} s_{3} \\ n_{y} = c_{2} c_{3} c_{4} c_{5} s_{1} - c_{1} s_{5} - c_{2} c_{5} s_{1} s_{3} s_{4} - c_{3} c_{5} s_{1} s_{2} s_{4} - c_{4} c_{5} s_{1} s_{2} s_{3} \\ n_{z} = c_{5} s_{2} s_{3} s_{4} - c_{2} c_{4} c_{5} s_{3} - c_{3} c_{4} c_{5} s_{2} - c_{2} c_{3} c_{5} s_{4} \\ o_{x} = c_{5} s_{1} - c_{1} c_{2} c_{3} c_{4} s_{5} + c_{1} c_{2} s_{3} s_{4} s_{5} + c_{1} c_{3} s_{2} s_{4} s_{5} + c_{1} c_{4} s_{2} s_{3} s_{5} \\ o_{y} = c_{2} s_{1} s_{3} s_{4} s_{5} - c_{2} c_{3} c_{4} s_{1} s_{5} - c_{1} c_{5} + c_{3} s_{1} s_{2} s_{4} s_{5} + c_{4} s_{1} s_{2} s_{3} s_{5} \\ o_{z} = c_{2} c_{3} s_{4} s_{5} + c_{2} c_{4} s_{3} s_{5} + c_{3} c_{4} s_{2} s_{5} - s_{2} s_{3} s_{4} s_{5} \\ a_{x} = c_{1} s_{2} s_{3} s_{4} - c_{1} c_{2} c_{4} s_{3} - c_{1} c_{3} c_{4} s_{2} - c_{1} c_{2} c_{3} s_{4} \\ a_{y} = s_{1} s_{2} s_{3} s_{4} - c_{2} c_{4} s_{1} s_{3} - c_{3} c_{4} s_{1} s_{2} - c_{2} c_{3} s_{1} s_{4} \\ a_{z} = c_{2} s_{3} s_{4} + c_{3} s_{2} s_{4} + c_{4} s_{2} s_{3} - c_{2} c_{3} c_{4} \\ p_{x} = a_{1} c_{1} + a_{2} c_{1} c_{2} + a_{3} c_{1} c_{2} c_{3} - a_{3} c_{1} s_{2} s_{3} \\ p_{y} = a_{1} s_{1} + a_{2} c_{2} s_{1} + a_{3} c_{2} c_{3} s_{1} - a_{3} s_{1} s_{2} s_{3} \\ p_{z} = -a_{2} s_{2} - a_{3} c_{2} s_{3} - a_{3} c_{3} s_{2} nx=s1s5+c1c2c3c4c5c1c2c5s3s4c1c3c5s2s4c1c4c5s2s3ny=c2c3c4c5s1c1s5c2c5s1s3s4c3c5s1s2s4c4c5s1s2s3nz=c5s2s3s4c2c4c5s3c3c4c5s2c2c3c5s4ox=c5s1c1c2c3c4s5+c1c2s3s4s5+c1c3s2s4s5+c1c4s2s3s5oy=c2s1s3s4s5c2c3c4s1s5c1c5+c3s1s2s4s5+c4s1s2s3s5oz=c2c3s4s5+c2c4s3s5+c3c4s2s5s2s3s4s5ax=c1s2s3s4c1c2c4s3c1c3c4s2c1c2c3s4ay=s1s2s3s4c2c4s1s3c3c4s1s2c2c3s1s4az=c2s3s4+c3s2s4+c4s2s3c2c3c4px=a1c1+a2c1c2+a3c1c2c3a3c1s2s3py=a1s1+a2c2s1+a3c2c3s1a3s1s2s3pz=a2s2a3c2s3a3c3s2

Simple D-H in matlab

function [T] = dh_transform(a, alpha, d, theta, standard_dh)
% dh_transform computes the Denavit-Hartenberg transformation matrix
% Given:
%   a (also written as 'r') - distance between origin(i) and origin(i-1)
%                             about z(i-1)
%
%   alpha(?) - angle from z(i-1) to z(i) about x(i)
%
%   d - the link offset betwen origin(i) with respect to origin(i-1)
%     along z(i-1)
%
%   theta (?) - joint angle between from x(i-1) to x(i) about z(i-1)
%
%
%
%   standard_dh - uses standard DH convention if 1 or if this
%                       parameter is not provided. Uses modified DH
%                       if this value is 0
% OR given:
%           a = DH parameter matrix
%           i.e. for SCARA manipulator a will look like as follows
%           syms q1 q2 d3 q4 a1 a2
%           a =         [ 0             0            0          q1;
%                        a1             0            0          q2;
%                        a2             0            -d3        0 ;
%                        0              0            0          q4];
%
%

if (nargin <= 2)
    if (nargin == 1)
        standard_dh = 1;
    else
        standard_dh = alpha;
    end
    
    dh_parameter_matrix = a;
    for row = 1:size(dh_parameter_matrix,1)
        dh_row = dh_parameter_matrix(row,:);
        a = dh_row(1);
        alpha = dh_row(2);
        d = dh_row(3);
        theta = dh_row(4);
        T(:,:,row) = dh_transform(a, alpha, d, theta, standard_dh);
    end
    
    if (isa(T,'sym'))
        T_out = sym(eye(4,4));
    else  
         T_out = eye(4,4);
    end
    
    for i=1:size(T,3)
            T_out = T_out * T(:,:,i);
    end
    T = T_out;

        
else if (nargin >= 4)
            if (nargin < 5)
                standard_dh = 1;
            end
            if standard_dh  % Standard DH convention computation
                T = [cos(theta)  -sin(theta)*cos(alpha)  sin(theta)*sin(alpha) a*cos(theta);
                    sin(theta)   cos(theta)*cos(alpha)   -cos(theta)*sin(alpha) a*sin(theta);
                    0          sin(alpha)               cos(alpha)            d;
                    0          0                        0                     1];
            else  % Modified DH convention computation
                T = [cos(theta)  -sin(theta)  0  a;
                    sin(theta)*cos(alpha) cos(theta)*cos(alpha) -sin(alpha) -d*sin(alpha);
                    sin(theta)*sin(alpha) cos(theta)*sin(alpha) cos(alpha) d*cos(alpha);
                    0   0   0   1];
            end
        end
        
    end

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1407207.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【AI视野·今日NLP 自然语言处理论文速览 第七十五期】Thu, 11 Jan 2024

AI视野今日CS.NLP 自然语言处理论文速览 Thu, 11 Jan 2024 Totally 36 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Computation and Language Papers Leveraging Print Debugging to Improve Code Generation in Large Language Models Authors Xueyu Hu, Kun K…

3.jmeter接口关联及实战

1.当所传参数包含键值对和json文件时&#xff0c;键值对放在链接后&#xff0c;参数放在消息体数据中 2.当查看结果树返回乱码时&#xff0c;修改请求中内容编码为utf-8 一、jmeter接口关联 1.正则表达式提取器 接口2.3传递的参数中需要用到接口1的返回值 禁用接口2.3&#…

如何在美国硅谷高防服务器上运行自定义的脚本和应用程序

在美国硅谷高防服务器上运行自定义的脚本和应用程序需要一定的技术和知识。下面我们将介绍一些关键步骤&#xff0c;帮助您顺利地在这些服务器上运行自定义应用程序和脚本。 确保您有对服务器的访问权限&#xff0c;并且已经通过SSH等方式连接到服务器。接下来&#xff0c;您可…

Dify学习笔记-基础介绍(一)

1、简介 Dify AI是一款强大的LLMOps&#xff08;Language Model Operations&#xff09;平台&#xff0c;专为用户提供便捷的人工智能应用程序开发体验。 该平台支持GPT系列模型和其他模型&#xff0c;适用于各种团队&#xff0c;无论是用于内部还是外部的AI应用程序开发。 它…

司铭宇老师:门店销售人员培训:门店销售的素质要求:打造高绩效销售团队的秘诀

门店销售人员培训&#xff1a;门店销售的素质要求&#xff1a;打造高绩效销售团队的秘诀 在市场竞争日益激烈的今天&#xff0c;门店销售作为企业盈利的重要渠道&#xff0c;其地位日益凸显。然而&#xff0c;门店销售的成败与否&#xff0c;很大程度上取决于销售人员的素质。…

数据库查询练习

数据准备 #建学生信息表student create table student ( sno varchar(20) not null primary key, sname varchar(20) not null, ssex varchar(20) not null, sbirthday datetime, class varchar(20) ); #建立教师表 create table teacher ( tno varchar(20) not null primary…

云轴科技ZStack位列IDC云系统软件市场教育行业TOP2

近日&#xff0c;全球IT市场研究和咨询公司IDC发布 《中国云系统软件市场跟踪报告2023H1》 ZStack作为产品化的云基础软件提供商 位居云系统软件市场第一梯队 市场份额位列独立云厂商*第一 营收同比增速最快 教育行业TOP2 在教育行业&#xff0c;云计算已成为教育行业信息化的…

21.云原生之ArgoCD CICD实战(部分待补充)

云原生专栏大纲 文章目录 部署项目介绍项目结构介绍GitLab CI/CDGitLab CI/CD主要特点和功能 部署测试argocd的cd过程CICD工作流准备工作github中工作流文件创建gitlab中工作流文件创建【实操待补充】GitLab CI示例 数据加密之seale sealedBitnami Sealed Secrets介绍Bitnami …

元数据管理在数据仓库中的实践应用

一、什么是数据仓库的元数据管理? 1、什么是元数据? 元数据(Metadata),又称中介数据、中继数据,为描述数据的数据(data about data)。 抽象的描述:一组用于描述数据的数据组,该数据组的一切信息都描述了该数据的某方面特征,则该数据组即可被称为元数据。 举几个…

JRTWeb对Excel的支持

之前实现的是Excel的客户端导出模板协议&#xff0c;有的情况需要从Web直接把数据弄成Excel文件下载&#xff0c;或者有时候需要导入Excel数据进入系统&#xff0c;为此需要一个List得到Excel文件的封装和一个Excel文件得到Json串供界面做解析的方法。 测试效果&#xff0c;把…

服务器托管在数据中心,如何有效避免中勒索病毒?

当服务器托管在数据中心时&#xff0c;安全措施需要更加严密&#xff0c;以确保服务器免受勒索病毒的攻击。 当服务器托管在数据中心时&#xff0c;安全措施需要更加严密&#xff0c;以确保服务器免受勒索病毒的攻击。以下是一些有效的策略和措施&#xff0c;帮助您降低风险&am…

Linux下的gcc与g++

文章目录 一.Linux gcc与g1.gcc如何生成可执行程序&#xff08;g同&#xff09;2.函数库 二.Linux项目自动化构建工具-make/makefile 一.Linux gcc与g 1.gcc如何生成可执行程序&#xff08;g同&#xff09; 预处理&#xff08;宏定义替换,展开头文件代码,条件编译,去注释&…

04-了解所有权

上一篇&#xff1a; 03-常用编程概念 所有权是 Rust 最独特的特性&#xff0c;对语言的其他部分有着深刻的影响。它使 Rust 可以在不需要垃圾回收器的情况下保证内存安全&#xff0c;因此了解所有权的工作原理非常重要。在本章中&#xff0c;我们将讨论所有权以及几个相关特性&…

BGV/BFV 的统一自举算法

参考文献&#xff1a; [GV23] Geelen R, Vercauteren F. Bootstrapping for BGV and BFV Revisited[J]. Journal of Cryptology, 2023, 36(2): 12.Bit Extraction and Bootstrapping for BGV/BFV 文章目录 Bootstrapping for BGV and BFVDecryption FunctionBGVBFV Bootstrapp…

初识汇编指令

1. ARM汇编指令 目的 认识汇编, 从而更好的进行C语言编程 RAM指令格式: 了解 4字节宽度 地址4字节对齐 方便寻址 1.1 指令码组成部分 : condition: 高4bit[31:28] 条件码 0-15 &#xff08;16个值 &#xff09; 条件码: 用于指令的 条件执行 , ARM指定绝大部分 都可…

Kubernetes/k8s之HPA,命名空间资源限制

Horizontal Pod Autoscaling:po的水平自动伸缩 这是k8s自带的模块 pod占用cpu比例达到一定的阀值&#xff0c;会触发伸缩机制。 根据cpu的阀值触发伸缩机制 replication controller 副本控制器 控制pod的副本数 deployment controller 节点控制器 部署pod hpa控制副本的数…

Android开发--状态栏布局隐藏的方法

1.问题如下&#xff0c;安卓布局很不协调 2.先将ActionBar设置为NoActionBar 先打开styles.xml 3.使用工具类 package com.afison.newfault.utils;import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.graph…

【Elasticsearch篇】详解使用RestClient操作索引库的相关操作

文章目录 &#x1f354;什么是Elasticsearch&#x1f33a;什么是RestClient&#x1f386;代码操作⭐初始化RestClient⭐使用RestClient操作索引库⭐使用RestClient删除索引库⭐使用RestClient判断索引库是否存在 &#x1f354;什么是Elasticsearch Elasticsearch是一个开源的分…

【设计并实现一个满足 LRU (最近最少使用) 缓存约束的数据结构】

文章目录 一、什么是LRU&#xff1f;二、LinkedHashMap 实现LRU缓存三、手写LRU 一、什么是LRU&#xff1f; LRU是Least Recently Used的缩写&#xff0c;意为最近最少使用。它是一种缓存淘汰策略&#xff0c;用于在缓存满时确定要被替换的数据块。LRU算法认为&#xff0c;最近…

MySQL两个表的亲密接触-连接查询的原理

MySQL对于被驱动表的关联字段没索引的关联查询&#xff0c;一般都会使用 BNL 算法。如果有索引一般选择 NLJ 算法&#xff0c;有 索引的情况下 NLJ 算法比 BNL算法性能更高。 关系型数据库还有一个重要的概念&#xff1a;Join&#xff08;连接&#xff09;。使用Join有好处&…