激光SLAM理论与实践 - 第六期 第1章 激光SLAM简介 作业与心得

2024-02-24 11:50

本文主要是介绍激光SLAM理论与实践 - 第六期 第1章 激光SLAM简介 作业与心得,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

  1. 了解 Linux 系统:阅读《鸟哥的 Linux 私房菜》自学前三部分内容,或利用互联网进行学习,简答以下问题;(3 分)

    1. 列举三个你常用的 Linux 命令,并说明他们的功能。

      1. man 指令,是manual(操作说明)的缩写,该指令用于查看其他指令的详细说明;比如 $ man date ,就会出现有关 date 的详细说明。
      2. cd 指令,是change directory(改变目录)的缩写,该指令用于改变工作目录;比如 $ cd /home/tx-ubuntu64 ,就会将当前目录变为 /home/tx-ubuntu64
      3. mkdir 指令,是make directory(创建目录)的缩写,该指令用于创建新目录;比如 $ mkdir abc ,就会创建文件夹abc。
    2. 一句话简要介绍 Vim 的功能,如何在 Vim 中进行插入和删除,如何保存并退出 Vim?

      1. Vim 是 vi 进阶版本的文本编辑器,Vim 可以用颜色或底线等方式来显示一些特殊的信息。
      2. 在一般模式中,按下 i (i, I, o, O, a, A, r, R)进入编辑模式,开始编辑(包括插入和删除)文字,按下 Esc 即可退出编辑模式。
      3. 在一般模式中,按下 :wq 保存并退出Vim。
    3. 列举两种常用的 Linux 压缩和解压缩命令。

      1. tar 指令,解压 tar zxvf FileName.tar.gz ,压缩 tar zcvf FileName.tar.gz DirName
      2. unzip 指令与 zip 指令,解压 unzip FileName.zip ,压缩 zip -q -r FileName.zip FileName
  2. 了解 ROS:观看 ROS 免费公开课或前往 ROS 官网学习官方教程,安装好 ROS,提供运行小海龟跑的截图;(3 分)

在这里插入图片描述
这里需要注意ROS更新过key,最好使用英文版安装教程。

  1. 学习机器人姿态描述入门材料,完成坐标转换推导;(3 分)
    设机器人的世界坐标为 xa, ya,其相对于世界坐标系的方向为 θa(右手坐标系)。假设机器人旁边有一物体在世界坐标系下的位姿为(xb, yb, θb),请问:

    1. 该物体相对于机器人的位置和朝向是什么,即该物体在当前机器人坐标系下的位姿是多少?

      解:设世界坐标系为 { W } \{W\} {W} ,机器人坐标系为 { A } \{A\} {A} ,物体坐标系为 { B } \{B\} {B} ,则
      在这里插入图片描述

      B A T = W A T ⋅ B W T = A W T − 1 ⋅ B W T = [ A W R T − A W R T ⋅ A W P 0 1 ] ⋅ [ B W R B W P 0 1 ] = [ A W R T ⋅ B W R A W R T ⋅ B W P − A W R T ⋅ A W P 0 1 ] = [ A W R T ⋅ B W R A W R T ⋅ ( B W P − A W P ) 0 1 ] \begin{aligned} ^A_BT&=^A_WT\cdot^W_BT \\ &=^W_AT^{-1}\cdot^W_BT \\ &=\begin{bmatrix} ^W_AR^T & -^W_AR^T\cdot^W_AP \\ 0 & 1 \\ \end{bmatrix}\cdot\begin{bmatrix} ^W_BR & ^W_BP \\ 0 & 1 \\ \end{bmatrix} \\ &=\begin{bmatrix} ^W_AR^T\cdot^W_BR & ^W_AR^T\cdot^W_BP-^W_AR^T\cdot^W_AP \\ 0 & 1 \\ \end{bmatrix} \\ &=\begin{bmatrix} ^W_AR^T\cdot^W_BR & ^W_AR^T\cdot(^W_BP-^W_AP) \\ 0 & 1 \\ \end{bmatrix} \end{aligned} BAT=WATBWT=AWT1BWT=[AWRT0AWRTAWP1][BWR0BWP1]=[AWRTBWR0AWRTBWPAWRTAWP1]=[AWRTBWR0AWRT(BWPAWP)1]
      式中:
      A W R T ⋅ B W R = [ c o s θ a − s i n θ a s i n θ a c o s θ a ] T ⋅ [ c o s θ b − s i n θ b s i n θ b c o s θ b ] = [ c o s θ a s i n θ a − s i n θ a c o s θ a ] ⋅ [ c o s θ b − s i n θ b s i n θ b c o s θ b ] = [ c o s θ a c o s θ b + s i n θ a s i n θ b − c o s θ a s i n θ b + s i n θ a c o s θ b − s i n θ a c o s θ b + c o s θ a s i n θ b s i n θ a s i n θ b + c o s θ a c o s θ b ] = [ c o s ( θ b − θ a ) − s i n ( θ b − θ a ) s i n ( θ b − θ a ) c o s ( θ b − θ a ) ] \begin{aligned} ^W_AR^T\cdot^W_BR&=\begin{bmatrix} cos\theta_a & -sin\theta_a \\ sin\theta_a & cos\theta_a \\ \end{bmatrix}^T\cdot\begin{bmatrix} cos\theta_b & -sin\theta_b \\ sin\theta_b & cos\theta_b \\ \end{bmatrix} \\ &=\begin{bmatrix} cos\theta_a & sin\theta_a \\ -sin\theta_a & cos\theta_a \\ \end{bmatrix}\cdot\begin{bmatrix} cos\theta_b & -sin\theta_b \\ sin\theta_b & cos\theta_b \\ \end{bmatrix} \\ &=\begin{bmatrix} cos\theta_acos\theta_b+sin\theta_asin\theta_b & -cos\theta_asin\theta_b+sin\theta_acos\theta_b \\ -sin\theta_acos\theta_b+cos\theta_asin\theta_b & sin\theta_asin\theta_b+cos\theta_acos\theta_b \\ \end{bmatrix} \\ &=\begin{bmatrix} cos(\theta_b-\theta_a) & -sin(\theta_b-\theta_a) \\ sin(\theta_b-\theta_a) & cos(\theta_b-\theta_a) \\ \end{bmatrix} \end{aligned} AWRTBWR=[cosθasinθasinθacosθa]T[cosθbsinθbsinθbcosθb]=[cosθasinθasinθacosθa][cosθbsinθbsinθbcosθb]=[cosθacosθb+sinθasinθbsinθacosθb+cosθasinθbcosθasinθb+sinθacosθbsinθasinθb+cosθacosθb]=[cos(θbθa)sin(θbθa)sin(θbθa)cos(θbθa)]
      A W R T ⋅ ( B W P − A W P ) = [ c o s θ a − s i n θ a s i n θ a c o s θ a ] T ⋅ ( [ x b y b ] − [ x a y a ] ) = [ c o s θ a s i n θ a − s i n θ a c o s θ a ] ⋅ [ x b − x a y b − y a ] = [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] \begin{aligned} ^W_AR^T\cdot(^W_BP-^W_AP)&=\begin{bmatrix} cos\theta_a & -sin\theta_a \\ sin\theta_a & cos\theta_a \\ \end{bmatrix}^T\cdot(\begin{bmatrix} x_b \\ y_b \\ \end{bmatrix}-\begin{bmatrix} x_a \\ y_a \\ \end{bmatrix}) \\ &=\begin{bmatrix} cos\theta_a & sin\theta_a \\ -sin\theta_a & cos\theta_a \\ \end{bmatrix}\cdot\begin{bmatrix} x_b-x_a \\ y_b-y_a \\ \end{bmatrix} \\ &=\begin{bmatrix} (x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a \\ -(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a \\ \end{bmatrix} \end{aligned} AWRT(BWPAWP)=[cosθasinθasinθacosθa]T([xbyb][xaya])=[cosθasinθasinθacosθa][xbxaybya]=[(xbxa)cosθa+(ybya)sinθa(xbxa)sinθa+(ybya)cosθa]
      代入:
      B A T = [ c o s ( θ b − θ a ) − s i n ( θ b − θ a ) ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a s i n ( θ b − θ a ) c o s ( θ b − θ a ) − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a 0 0 1 ] \begin{aligned} ^A_BT&=\begin{bmatrix} cos(\theta_b-\theta_a) & -sin(\theta_b-\theta_a) & (x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a\\ sin(\theta_b-\theta_a) & cos(\theta_b-\theta_a) & -(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a\\ 0 & 0 & 1\\ \end{bmatrix} \end{aligned} BAT=cos(θbθa)sin(θbθa)0sin(θbθa)cos(θbθa)0(xbxa)cosθa+(ybya)sinθa(xbxa)sinθa+(ybya)cosθa1
      位姿为: ( ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a , − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a , θ b − θ a ) ((x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a,-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a,\theta_b-\theta_a) ((xbxa)cosθa+(ybya)sinθa,(xbxa)sinθa+(ybya)cosθa,θbθa)

    2. 机器人此时朝它的正前方(机器人坐标系 X 轴)行进了 d 距离,然后又转了 θd角,请问物体此时在这一时刻机器人坐标系下的位姿是多少?

      解:移动后的机器人坐标系为 { A ′ } \{A'\} {A} ,则
      在这里插入图片描述

      B A ′ T = A A ′ T ⋅ B A T = A ′ A T − 1 ⋅ B A T = [ A ′ A R T − A ′ A R T ⋅ A ′ A P 0 1 ] ⋅ [ B A R B A P 0 1 ] = [ A ′ A R T ⋅ B A R A ′ A R T ⋅ B A P − A ′ A R T ⋅ A ′ A P 0 1 ] = [ A ′ A R T ⋅ B A R A ′ A R T ⋅ ( B A P − A ′ A P ) 0 1 ] \begin{aligned} ^{A'}_BT&=^{A'}_AT\cdot^A_BT \\ &=^A_{A'}T^{-1}\cdot^A_BT \\ &=\begin{bmatrix} ^A_{A'}R^T & -^A_{A'}R^T\cdot^A_{A'}P \\ 0 & 1 \\ \end{bmatrix}\cdot\begin{bmatrix} ^A_BR & ^A_BP \\ 0 & 1 \\ \end{bmatrix} \\ &=\begin{bmatrix} ^A_{A'}R^T\cdot^A_BR & ^A_{A'}R^T\cdot^A_BP-^A_{A'}R^T\cdot^A_{A'}P \\ 0 & 1 \\ \end{bmatrix} \\ &=\begin{bmatrix} ^A_{A'}R^T\cdot^A_BR & ^A_{A'}R^T\cdot(^A_BP-^A_{A'}P) \\ 0 & 1 \\ \end{bmatrix} \end{aligned} BAT=AATBAT=AAT1BAT=[AART0AARTAAP1][BAR0BAP1]=[AARTBAR0AARTBAPAARTAAP1]=[AARTBAR0AART(BAPAAP)1]
      式中:
      A ′ A R T ⋅ B A R = [ c o s θ d − s i n θ d s i n θ d c o s θ d ] T ⋅ [ c o s ( θ b − θ a ) − s i n ( θ b − θ a ) s i n ( θ b − θ a ) c o s ( θ b − θ a ) ] = [ c o s θ d s i n θ d − s i n θ d c o s θ d ] ⋅ [ c o s ( θ b − θ a ) − s i n ( θ b − θ a ) s i n ( θ b − θ a ) c o s ( θ b − θ a ) ] = [ c o s θ d c o s ( θ b − θ a ) + s i n θ d s i n ( θ b − θ a ) − c o s θ d s i n ( θ b − θ a ) + s i n θ d c o s ( θ b − θ a ) − s i n θ d c o s ( θ b − θ a ) + c o s θ d s i n ( θ b − θ a ) s i n θ d s i n ( θ b − θ a ) + c o s θ d c o s ( θ b − θ a ) ] = [ c o s ( ( θ b − θ a ) − θ d ) − s i n ( ( θ b − θ a ) − θ d ) s i n ( ( θ b − θ a ) − θ d ) c o s ( ( θ b − θ a ) − θ d ) ] = [ c o s ( θ b − θ a − θ d ) − s i n ( θ b − θ a − θ d ) s i n ( θ b − θ a − θ d ) c o s ( θ b − θ a − θ d ) ] \begin{aligned} ^A_{A'}R^T\cdot^A_BR&=\begin{bmatrix} cos\theta_d & -sin\theta_d \\ sin\theta_d & cos\theta_d \\ \end{bmatrix}^T\cdot\begin{bmatrix} cos(\theta_b-\theta_a) & -sin(\theta_b-\theta_a) \\ sin(\theta_b-\theta_a) & cos(\theta_b-\theta_a) \\ \end{bmatrix} \\ &=\begin{bmatrix} cos\theta_d & sin\theta_d \\ -sin\theta_d & cos\theta_d \\ \end{bmatrix}\cdot\begin{bmatrix} cos(\theta_b-\theta_a) & -sin(\theta_b-\theta_a) \\ sin(\theta_b-\theta_a) & cos(\theta_b-\theta_a) \\ \end{bmatrix} \\ &=\begin{bmatrix} cos\theta_dcos(\theta_b-\theta_a)+sin\theta_dsin(\theta_b-\theta_a) & -cos\theta_dsin(\theta_b-\theta_a)+sin\theta_dcos(\theta_b-\theta_a) \\ -sin\theta_dcos(\theta_b-\theta_a)+cos\theta_dsin(\theta_b-\theta_a) & sin\theta_dsin(\theta_b-\theta_a)+cos\theta_dcos(\theta_b-\theta_a) \\ \end{bmatrix} \\ &=\begin{bmatrix} cos((\theta_b-\theta_a)-\theta_d) & -sin((\theta_b-\theta_a)-\theta_d) \\ sin((\theta_b-\theta_a)-\theta_d) & cos((\theta_b-\theta_a)-\theta_d) \\ \end{bmatrix} \\ &=\begin{bmatrix} cos(\theta_b-\theta_a-\theta_d) & -sin(\theta_b-\theta_a-\theta_d) \\ sin(\theta_b-\theta_a-\theta_d) & cos(\theta_b-\theta_a-\theta_d) \\ \end{bmatrix} \\ \end{aligned} AARTBAR=[cosθdsinθdsinθdcosθd]T[cos(θbθa)sin(θbθa)sin(θbθa)cos(θbθa)]=[cosθdsinθdsinθdcosθd][cos(θbθa)sin(θbθa)sin(θbθa)cos(θbθa)]=[cosθdcos(θbθa)+sinθdsin(θbθa)sinθdcos(θbθa)+cosθdsin(θbθa)cosθdsin(θbθa)+sinθdcos(θbθa)sinθdsin(θbθa)+cosθdcos(θbθa)]=[cos((θbθa)θd)sin((θbθa)θd)sin((θbθa)θd)cos((θbθa)θd)]=[cos(θbθaθd)sin(θbθaθd)sin(θbθaθd)cos(θbθaθd)]
      A ′ A R T ⋅ ( B A P − A ′ A P ) = [ c o s θ d − s i n θ d s i n θ d c o s θ d ] T ⋅ ( [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] − [ d 0 ] ) = [ c o s θ d s i n θ d − s i n θ d c o s θ d ] ⋅ [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] = [ [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] c o s θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] s i n θ d − [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] s i n θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] c o s θ d ] \begin{aligned} ^A_{A'}R^T\cdot(^A_BP-^A_{A'}P)&=\begin{bmatrix} cos\theta_d & -sin\theta_d \\ sin\theta_d & cos\theta_d \\ \end{bmatrix}^T\cdot(\begin{bmatrix} (x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a \\ -(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a \\ \end{bmatrix}-\begin{bmatrix} d \\ 0 \\ \end{bmatrix}) \\ &=\begin{bmatrix} cos\theta_d & sin\theta_d \\ -sin\theta_d & cos\theta_d \\ \end{bmatrix}\cdot\begin{bmatrix} (x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d \\ -(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a \\ \end{bmatrix} \\ &=\begin{bmatrix} [(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]cos\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]sin\theta_d \\ -[(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]sin\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]cos\theta_d \\ \end{bmatrix} \end{aligned} AART(BAPAAP)=[cosθdsinθdsinθdcosθd]T([(xbxa)cosθa+(ybya)sinθa(xbxa)sinθa+(ybya)cosθa][d0])=[cosθdsinθdsinθdcosθd][(xbxa)cosθa+(ybya)sinθad(xbxa)sinθa+(ybya)cosθa]=[[(xbxa)cosθa+(ybya)sinθad]cosθd+[(xbxa)sinθa+(ybya)cosθa]sinθd[(xbxa)cosθa+(ybya)sinθad]sinθd+[(xbxa)sinθa+(ybya)cosθa]cosθd]
      代入:
      B A ′ T = [ c o s ( θ b − θ a − θ d ) − s i n ( θ b − θ a − θ d ) [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] c o s θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] s i n θ d s i n ( θ b − θ a − θ d ) c o s ( θ b − θ a − θ d ) − [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] s i n θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] c o s θ d 0 0 1 ] \begin{aligned} ^{A'}_BT&=\begin{bmatrix} cos(\theta_b-\theta_a-\theta_d) & -sin(\theta_b-\theta_a-\theta_d) & [(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]cos\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]sin\theta_d\\ sin(\theta_b-\theta_a-\theta_d) & cos(\theta_b-\theta_a-\theta_d) & -[(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]sin\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]cos\theta_d\\ 0 & 0 & 1\\ \end{bmatrix} \end{aligned} BAT=cos(θbθaθd)sin(θbθaθd)0sin(θbθaθd)cos(θbθaθd)0[(xbxa)cosθa+(ybya)sinθad]cosθd+[(xbxa)sinθa+(ybya)cosθa]sinθd[(xbxa)cosθa+(ybya)sinθad]sinθd+[(xbxa)sinθa+(ybya)cosθa]cosθd1
      位姿为: ( [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] c o s θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] s i n θ d , − [ ( x b − x a ) c o s θ a + ( y b − y a ) s i n θ a − d ] s i n θ d + [ − ( x b − x a ) s i n θ a + ( y b − y a ) c o s θ a ] c o s θ d , θ b − θ a − θ d ) ([(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]cos\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]sin\theta_d,-[(x_b-x_a)cos\theta_a+(y_b-y_a)sin\theta_a-d]sin\theta_d+[-(x_b-x_a)sin\theta_a+(y_b-y_a)cos\theta_a]cos\theta_d,\theta_b-\theta_a-\theta_d) ([(xbxa)cosθa+(ybya)sinθad]cosθd+[(xbxa)sinθa+(ybya)cosθa]sinθd,[(xbxa)cosθa+(ybya)sinθad]sinθd+[(xbxa)sinθa+(ybya)cosθa]cosθd,θbθaθd)

    这题需要知道转换矩阵可以是坐标系的描述,也可以表示主动变换和被动变换;这里可以发现,在二维平面中,角度直接加减就可,在上面的坐标系中也可以比较明显得看出来。

  2. 完成基础数学坐标转换的代码作业。(3 分)

    这题的原理比较简单,就是已知 A O T ^O_AT AOT B O T ^O_BT BOT ,求 A B T ^B_AT ABT A B T = O B T ⋅ A O T = B O T − 1 ⋅ A O T ^B_AT=^B_OT\cdot^O_AT=^O_BT^{-1}\cdot^O_AT ABT=OBTAOT=BOT1AOT

    // TODO 参照第一课PPT
    // start your code here (5~10 lines)
    Eigen::Matrix3d TOA;
    TOA << cos(A(2)), -sin(A(2)), A(0),sin(A(2)),  cos(A(2)), A(1),0,          0,        1;
    Eigen::Matrix3d TBA = TBO * TOA;
    cout << TBA << std::endl;
    BA << TBA(0, 2),TBA(1, 2),atan2(TBA(1, 0), TBA(0, 0));
    // end your code here
    

    运行结果为:

    $ ./basicTransformStudy 
    TBA:
    -1.83697e-16           -1            21 -1.83697e-16            10            0            1
    The right answer is BA: 2 1 1.5708
    Your answer is BA:      2      1 1.5708
    

    详见代码仓库。

这篇关于激光SLAM理论与实践 - 第六期 第1章 激光SLAM简介 作业与心得的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/742012

相关文章

Spring Boot @RestControllerAdvice全局异常处理最佳实践

《SpringBoot@RestControllerAdvice全局异常处理最佳实践》本文详解SpringBoot中通过@RestControllerAdvice实现全局异常处理,强调代码复用、统... 目录前言一、为什么要使用全局异常处理?二、核心注解解析1. @RestControllerAdvice2

Spring事务传播机制最佳实践

《Spring事务传播机制最佳实践》Spring的事务传播机制为我们提供了优雅的解决方案,本文将带您深入理解这一机制,掌握不同场景下的最佳实践,感兴趣的朋友一起看看吧... 目录1. 什么是事务传播行为2. Spring支持的七种事务传播行为2.1 REQUIRED(默认)2.2 SUPPORTS2

Qt QCustomPlot库简介(最新推荐)

《QtQCustomPlot库简介(最新推荐)》QCustomPlot是一款基于Qt的高性能C++绘图库,专为二维数据可视化设计,它具有轻量级、实时处理百万级数据和多图层支持等特点,适用于科学计算、... 目录核心特性概览核心组件解析1.绘图核心 (QCustomPlot类)2.数据容器 (QCPDataC

Java中的雪花算法Snowflake解析与实践技巧

《Java中的雪花算法Snowflake解析与实践技巧》本文解析了雪花算法的原理、Java实现及生产实践,涵盖ID结构、位运算技巧、时钟回拨处理、WorkerId分配等关键点,并探讨了百度UidGen... 目录一、雪花算法核心原理1.1 算法起源1.2 ID结构详解1.3 核心特性二、Java实现解析2.

MySQL 中 ROW_NUMBER() 函数最佳实践

《MySQL中ROW_NUMBER()函数最佳实践》MySQL中ROW_NUMBER()函数,作为窗口函数为每行分配唯一连续序号,区别于RANK()和DENSE_RANK(),特别适合分页、去重... 目录mysql 中 ROW_NUMBER() 函数详解一、基础语法二、核心特点三、典型应用场景1. 数据分

深度解析Spring AOP @Aspect 原理、实战与最佳实践教程

《深度解析SpringAOP@Aspect原理、实战与最佳实践教程》文章系统讲解了SpringAOP核心概念、实现方式及原理,涵盖横切关注点分离、代理机制(JDK/CGLIB)、切入点类型、性能... 目录1. @ASPect 核心概念1.1 AOP 编程范式1.2 @Aspect 关键特性2. 完整代码实

MySQL 用户创建与授权最佳实践

《MySQL用户创建与授权最佳实践》在MySQL中,用户管理和权限控制是数据库安全的重要组成部分,下面详细介绍如何在MySQL中创建用户并授予适当的权限,感兴趣的朋友跟随小编一起看看吧... 目录mysql 用户创建与授权详解一、MySQL用户管理基础1. 用户账户组成2. 查看现有用户二、创建用户1. 基

Spring Boot 实现 IP 限流的原理、实践与利弊解析

《SpringBoot实现IP限流的原理、实践与利弊解析》在SpringBoot中实现IP限流是一种简单而有效的方式来保障系统的稳定性和可用性,本文给大家介绍SpringBoot实现IP限... 目录一、引言二、IP 限流原理2.1 令牌桶算法2.2 漏桶算法三、使用场景3.1 防止恶意攻击3.2 控制资源

springboot项目中整合高德地图的实践

《springboot项目中整合高德地图的实践》:本文主要介绍springboot项目中整合高德地图的实践,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一:高德开放平台的使用二:创建数据库(我是用的是mysql)三:Springboot所需的依赖(根据你的需求再

SpringBoot3应用中集成和使用Spring Retry的实践记录

《SpringBoot3应用中集成和使用SpringRetry的实践记录》SpringRetry为SpringBoot3提供重试机制,支持注解和编程式两种方式,可配置重试策略与监听器,适用于临时性故... 目录1. 简介2. 环境准备3. 使用方式3.1 注解方式 基础使用自定义重试策略失败恢复机制注意事项