使用Kalibr標定vins參數

這裏使用的是realsense D435,使用其灰階雙目的部分(把中間红外点阵投影仪遮住應該可以取得更好的效果),廠商有給相機的標定,但由於Kalibr裏可以直接標定相機和imu的相對位置,是vins需要的參數,比自己用尺子量還準,所以用kalibr標定,所以還是使用kalibr標定vins的參數。
主要步驟如下:
操作環境是ros noetic
1. 錄製rosbag(包含的topic包括),imu的發佈頻率200Hz,相機的部分,會用topic_tools降低頻率
2. 用kalibr標定相機
3. 取得realsense廠商標定的值,如果和剛剛標定的差不多(大部分情況應該是這樣的),直接用廠商的就好了
4. 用imu_utils 標定imu(這一步不一定需要做,我用N100直接用)
5. 取得4個文件後,用kalibr標定 相機和imu的相對位置
6. kalibr標定出來的 T_cam_imu 是imu的位置轉成相機座標的變換矩陣,如果是左眼可以視作 T_cam0_imu
7. vins的config文件的body_T_cam0 是 cam0轉成imu座標的變換矩陣,如果是左眼可以視作 T_imu_cam0,也就是kalibr標定出來的矩陣的逆矩陣。再把其他相機內參(用的是realsense廠商標定的值)寫進去就OK了。

----------------------------------------------------------------------------------------------------------------------------

第一步:
1.啓動realsense,查看/camera/infra1/image_rect_raw,/camera/infra2/image_rect_raw 是否正常發佈
2.啓動imu,頻率200Hz,topic設爲/mavros/imu/data_raw,用rostopic hz /mavros/imu/data_raw查看頻率是否是200Hz
3. 使用以下的命令將image的頻率降低,等會錄製的是降低頻率後的topic
 

export DecreaseFps_LEFT=/decrease_fps/infra1/image_rect_raw
rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 5.0 $DecreaseFps_LEFT
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 5.0 $DecreaseFps_RIGHT

這裏如果5.0改成4.0,頻率太低等會標定的時候可能會報錯
#Cameras are not connected through mutual observations, please check the dataset. Maybe adjust the approx. sync. tolerance.

使用rviz查看要錄製的image頻道是否正常發佈
錄製rosbag,注意只要錄製對應的頻道就可以裏,不要錄全部的topic,電腦可能會卡

#!/bin/bash

export LEFT_IMAGE_TOPIC=/camera/infra1/image_rect_raw
export RIGHT_IMAGE_TOPIC=/camera/infra2/image_rect_raw

export DecreaseFps_LEFT=/decrease_fps/infra1/image_rect_raw
export DecreaseFps_RIGHT=/decrease_fps/infra2/image_rect_raw



export IMU_TOPIC=/mavros/imu/data_raw


export TARTGET_PROJECT_DIR=/home/hao/Documents/WKS_Current/camera_imu_calib

export BAG_PATH=$TARTGET_PROJECT_DIR/rosbag/images_imu.bag

rm BAG_PATH

#這裏記錄降低Hz後的image topic
rosbag record $DecreaseFps_RIGHT $DecreaseFps_LEFT $IMU_TOPIC -O $BAG_PATH

然後把bag的名字從images_imu.bag改成images_imu_0319_4.bag,避免之後被覆蓋

----------------------------------------------------------------------------------------------------------------------------


第二步:
使用rosrun kalibr kalibr_calibrate_cameras 的命令標定

#!/bin/bash


export NEW_BAG_NAME=images_imu_0319_4.bag

# ------------------------------------------------------------------------------
export TARTGET_PROJECT_DIR=/home/hao/Documents/WKS_Current/camera_imu_calib
source $TARTGET_PROJECT_DIR/kalibr_workspace/devel/setup.bash
export NEW_BAG_PATH=$TARTGET_PROJECT_DIR/rosbag/$NEW_BAG_NAME

export LEFT_IMAGE_TOPIC=/camera/infra1/image_rect_raw
export RIGHT_IMAGE_TOPIC=/camera/infra2/image_rect_raw


export DecreaseFps_LEFT=/decrease_fps/infra1/image_rect_raw
export DecreaseFps_RIGHT=/decrease_fps/infra2/image_rect_raw



export YAML=$TARTGET_PROJECT_DIR/config/april/april_4x6_33x33mm.yaml

# ------------------------------------------------------------------------------

rosrun kalibr kalibr_calibrate_cameras \
    --target $YAML \
    --bag $NEW_BAG_PATH \
    --models pinhole-radtan pinhole-radtan \
    --topics $DecreaseFps_LEFT $DecreaseFps_RIGHT

取得標定後的文件images_imu_0319_4-camchain.yaml

cam0:
  cam_overlaps: [1]
  camera_model: pinhole
  distortion_coeffs: [0.002523328249852312, -0.004466313471172815, 0.00033642164779608326, 0.00018286390638593217]
  distortion_model: radtan
  intrinsics: [380.37233363299345, 380.1905369817509, 318.9785130142544, 245.5928492131154]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra1/image_rect_raw
cam1:
  T_cn_cnm1:
  - [0.9999999901664477, 8.91089059750877e-05, -0.00010828989704860977, -0.05220575204275552]
  - [-8.901819276146816e-05, 0.9999996454143176, 0.0008374049169301635, -3.378684260237077e-05]
  - [0.00010836447888656882, -0.0008373952689245711, 0.9999996435130853, 9.858524895562022e-05]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [0]
  camera_model: pinhole
  distortion_coeffs: [0.0015411597395611953, -0.002046041757877386, -1.5684484998354423e-05, 0.0006699072164490144]
  distortion_model: radtan
  intrinsics: [380.4869229059442, 380.30778002633, 319.44882039078743, 245.19338699710772]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra2/image_rect_raw

這裏標定的結果一般,網上一般說重投影午餐在0.2以下,但是沒關係,最後我們要用的是廠商標定的值,這裏只要確定和廠商標定的值差不多就行了

----------------------------------------------------------------------------------------------------------------------------

第三步:
獲取廠商的標定值
運行相機後,運行rostopic list查看相機發佈的topic
這裏我們要讀取的是
rostopic echo  /camera/infra1/camera_info
rostopic echo  /camera/infra2/camera_info

rostopic echo  /camera/infra1/camera_info
header:
  seq: 69
  stamp:
    secs: 1710820789
    nsecs: 283667326
  frame_id: "camera_infra1_optical_frame"
height: 480
width: 640
distortion_model: "plumb_bob"
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [383.7328186035156, 0.0, 320.62640380859375, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [383.7328186035156, 0.0, 320.62640380859375, 0.0, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

*********************************************************************************************
rostopic echo  /camera/infra2/camera_info

---
header:
  seq: 48
  stamp:
    secs: 1710820898
    nsecs: 994056225
  frame_id: "camera_infra1_optical_frame"
height: 480
width: 640
distortion_model: "plumb_bob"
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [383.7328186035156, 0.0, 320.62640380859375, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [383.7328186035156, 0.0, 320.62640380859375, -19.216720581054688, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

其中的K就是我們要的內參

K: [383.7328186035156, 0.0, 320.62640380859375, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 1.0]

K: [383.7328186035156, 0.0, 320.62640380859375, 0.0, 383.7328186035156, 244.07247924804688, 0.0, 0.0, 1.0]

和剛剛標定的
  intrinsics: [380.37233363299345, 380.1905369817509, 318.9785130142544, 245.5928492131154]
  intrinsics: [380.4869229059442, 380.30778002633, 319.44882039078743, 245.19338699710772]
....差異不大...是吧?

----------------------------------------------------------------------------------------------------------------------------

第四步:
使用imu_utils標定,時間至少2小時,如果vins運行偏差不大,這一步不一定需要

----------------------------------------------------------------------------------------------------------------------------

第五步:
用kalibr標定 相機和imu的相對位置,這裏需要3個yaml , 和剛剛用過的rosbag

#!/bin/bash
export TARTGET_PROJECT_DIR=/home/hao/Documents/WKS_Current/camera_imu_calib
source $TARTGET_PROJECT_DIR/kalibr_workspace/devel/setup.bash


export APRIL_YAML=$TARTGET_PROJECT_DIR/config//april/april_4x6_33x33mm.yaml
export CAM_YAML=$TARTGET_PROJECT_DIR/config/camera/0319_4/images_imu_0319_4-camchain.yaml
export IMU_YAML=$TARTGET_PROJECT_DIR/config/imu/wheeltec_imu_param.yaml

export BAG_PATH=$TARTGET_PROJECT_DIR/rosbag/images_imu_0319_4.bag

rosrun kalibr kalibr_calibrate_imu_camera \
--target $APRIL_YAML \
--cam $CAM_YAML \
--imu $IMU_YAML \
--bag $BAG_PATH

其中 APRIL_YAML 是圖形的,可以到這裏https://calib.io/ 在線生成後貼到牆上

april_4x6_33x33mm.yaml

target_type: 'aprilgrid' #gridtype
tagCols: 6               #number of apriltags
tagRows: 4               #number of apriltags
tagSize: 0.033           #size of apriltag, edge to edge [m]
tagSpacing: 0.3          #ratio of space between tags to tagSize

images_imu_0319_4-camchain-imucam.yaml

cam0:
  T_cam_imu:
  - [0.0034284049324164734, 0.9995733722504649, 0.02900550857085149, 0.03935877158851322]
  - [0.005143224197809104, -0.029022921129674084, 0.9995655142580464, 0.005894251744585931]
  - [0.9999808964597631, -0.0032777335058043477, -0.005240532281598431, -0.0946975587360723]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [1]
  camera_model: pinhole
  distortion_coeffs: [0.002523328249852312, -0.004466313471172815, 0.00033642164779608326, 0.00018286390638593217]
  distortion_model: radtan
  intrinsics: [380.37233363299345, 380.1905369817509, 318.9785130142544, 245.5928492131154]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra1/image_rect_raw
  timeshift_cam_imu: 0.0032990921924898058
cam1:
  T_cam_imu:
  - [0.003320575377456475, 0.9995711311657842, 0.029095145971751668, -0.012836200822067947]
  - [0.005980306103215982, -0.02911463584384641, 0.9995581893609758, 0.005777658963943309]
  - [0.9999766045853646, -0.003145110432898224, -0.006074418679215959, -0.09459961045442837]
  - [0.0, 0.0, 0.0, 1.0]
  T_cn_cnm1:
  - [0.9999999901664488, 8.91089059750877e-05, -0.00010828989704860977, -0.05220575204275552]
  - [-8.901819276146816e-05, 0.9999996454143187, 0.0008374049169301635, -3.378684260237077e-05]
  - [0.00010836447888656882, -0.0008373952689245711, 0.9999996435130865, 9.858524895562022e-05]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [0]
  camera_model: pinhole
  distortion_coeffs: [0.0015411597395611953, -0.002046041757877386, -1.5684484998354423e-05, 0.0006699072164490144]
  distortion_model: radtan
  intrinsics: [380.4869229059442, 380.30778002633, 319.44882039078743, 245.19338699710772]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra2/image_rect_raw
  timeshift_cam_imu: 0.003275118484076564
wheeltec_imu_param.yaml

wheeltec_imu_param.yaml的內容可以從廠商哪裏取得或自己標定

#Accelerometers
accelerometer_noise_density: 1.0909715156015328e-02   #Noise density (continuous-time)
accelerometer_random_walk: 4.0347767978459928e-04   #Bias random walk

#Gyroscopes
gyroscope_noise_density: 8.0226069504443656e-04   #Noise density (continuous-time)
gyroscope_random_walk: 4.4153147263889589e-05   #Bias random walk

rostopic: /mavros/imu/data_raw #the IMU ROS topic
update_rate: 200.0 #Hz (for discretization of the values above)

標定後得到文件images_imu_0319_4-camchain-imucam.yaml

cam0:
  T_cam_imu:
  - [0.0034284049324164734, 0.9995733722504649, 0.02900550857085149, 0.03935877158851322]
  - [0.005143224197809104, -0.029022921129674084, 0.9995655142580464, 0.005894251744585931]
  - [0.9999808964597631, -0.0032777335058043477, -0.005240532281598431, -0.0946975587360723]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [1]
  camera_model: pinhole
  distortion_coeffs: [0.002523328249852312, -0.004466313471172815, 0.00033642164779608326, 0.00018286390638593217]
  distortion_model: radtan
  intrinsics: [380.37233363299345, 380.1905369817509, 318.9785130142544, 245.5928492131154]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra1/image_rect_raw
  timeshift_cam_imu: 0.0032990921924898058
cam1:
  T_cam_imu:
  - [0.003320575377456475, 0.9995711311657842, 0.029095145971751668, -0.012836200822067947]
  - [0.005980306103215982, -0.02911463584384641, 0.9995581893609758, 0.005777658963943309]
  - [0.9999766045853646, -0.003145110432898224, -0.006074418679215959, -0.09459961045442837]
  - [0.0, 0.0, 0.0, 1.0]
  T_cn_cnm1:
  - [0.9999999901664488, 8.91089059750877e-05, -0.00010828989704860977, -0.05220575204275552]
  - [-8.901819276146816e-05, 0.9999996454143187, 0.0008374049169301635, -3.378684260237077e-05]
  - [0.00010836447888656882, -0.0008373952689245711, 0.9999996435130865, 9.858524895562022e-05]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [0]
  camera_model: pinhole
  distortion_coeffs: [0.0015411597395611953, -0.002046041757877386, -1.5684484998354423e-05, 0.0006699072164490144]
  distortion_model: radtan
  intrinsics: [380.4869229059442, 380.30778002633, 319.44882039078743, 245.19338699710772]
  resolution: [640, 480]
  rostopic: /decrease_fps/infra2/image_rect_raw
  timeshift_cam_imu: 0.003275118484076564

----------------------------------------------------------------------------------------------------------------------------

 第六步:
 將Kalibr標定出來的相機和imu的矩陣,求出逆矩陣後,寫入vins的參數裏

也就是分別求出以下的逆矩陣,直接用Sophus求即可
cam0:
  T_cam_imu:
  - [0.0034284049324164734, 0.9995733722504649, 0.02900550857085149, 0.03935877158851322]
  - [0.005143224197809104, -0.029022921129674084, 0.9995655142580464, 0.005894251744585931]
  - [0.9999808964597631, -0.0032777335058043477, -0.005240532281598431, -0.0946975587360723]
  - [0.0, 0.0, 0.0, 1.0]

cam1:
  T_cam_imu:
  - [0.003320575377456475, 0.9995711311657842, 0.029095145971751668, -0.012836200822067947]
  - [0.005980306103215982, -0.02911463584384641, 0.9995581893609758, 0.005777658963943309]
  - [0.9999766045853646, -0.003145110432898224, -0.006074418679215959, -0.09459961045442837]
  - [0.0, 0.0, 0.0, 1.0]

求出的逆矩陣分別是
body_T_cam0:
   data: [0.0034284,0.00514322,0.999981,0.0945305,0.999573,-0.0290229,-0.00327773,-0.0394813,0.0290055,0.999566,-0.00524053,-0.00752958,0., 0., 0., 1. ]


body_T_cam1:
     data: [ 0.00332058,0.00598031,0.999977,0.0946055,0.999571, -0.0291146, -0.00314511, 0.0127014,0.0290951, 0.999558, -0.00607442, -0.00597627,0., 0., 0., 1. ]

----------------------------------------------------------------------------------------------------------------------------

第七步:
修改vins的config,一般需要三個文件

ego_planner_d435_wheeltecImu.yaml

%YAML:1.0


#common parameters
#support: 1 imu 1 cam; 1 imu 2 cam: 2 cam; 
imu: 1         
num_of_cam: 2

imu_topic: "/mavros/imu/data_raw"
image0_topic: "/camera/infra1/image_rect_raw"
image1_topic: "/camera/infra2/image_rect_raw"

#這個文件需要創建
output_path: "~/Documents/vins_output"

cam0_calib: "left.yaml"
cam1_calib: "right.yaml"
image_width: 640
image_height: 480
   

# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 1   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
                        # 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.

body_T_cam0: !!opencv-matrix
   rows: 4
   cols: 4
   dt: d
   data: [0.0034284,0.00514322,0.999981,0.0945305,0.999573,-0.0290229,-0.00327773,-0.0394813,0.0290055,0.999566,-0.00524053,-0.00752958,0., 0., 0., 1. ]









body_T_cam1: !!opencv-matrix
   rows: 4
   cols: 4
   dt: d

   data: [ 0.00332058,0.00598031,0.999977,0.0946055,0.999571, -0.0291146, -0.00314511, 0.0127014,0.0290951, 0.999558, -0.00607442, -0.00597627,0., 0., 0., 1. ]


#Multiple thread support
multiple_thread: 1

#feature traker paprameters
max_cnt: 150            # max feature number in feature tracking
min_dist: 30            # min distance between two features 
freq: 10                # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image 
F_threshold: 1.0        # ransac threshold (pixel)
show_track: 1           # publish tracking image as topic
flow_back: 1            # perform forward and backward optical flow to improve feature tracking accuracy

#optimization parameters
max_solver_time: 0.04  # max solver itration time (ms), to guarantee real time
max_num_iterations: 8   # max solver itrations, to guarantee real time
keyframe_parallax: 10.0 # keyframe selection threshold (pixel)

#imu parameters       The more accurate parameters you provide, the better performance
acc_n: 0.1          # accelerometer measurement noise standard deviation. #0.2   0.04
gyr_n: 0.01         # gyroscope measurement noise standard deviation.     #0.05  0.004
acc_w: 0.001         # accelerometer bias random work noise standard deviation.  #0.002
gyr_w: 0.0001       # gyroscope bias random work noise standard deviation.     #4.0e-5
g_norm: 9.805         # gravity magnitude

#unsynchronization parameters
estimate_td: 1                      # online estimate time offset between camera and imu
td: -0.05                             # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)

#loop closure parameters
load_previous_pose_graph: 0        # load and reuse previous pose graph; load from 'pose_graph_save_path'
pose_graph_save_path: "/home/fast/savedfiles/output/pose_graph/" # save and load path
save_image: 1                   # save image in pose graph for visualization prupose; you can close this function by setting 0 

left.yaml

%YAML:1.0
---
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
distortion_parameters:
   k1: 0.0
   k2: 0.0
   p1: 0.0
   p2: 0.0

# D435 廠商標定
projection_parameters:
   fx: 383.7328186035156
   fy: 383.7328186035156
   cx: 320.62640380859375
   cy: 244.07247924804688

right.yaml

%YAML:1.0
---
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
distortion_parameters:
   k1: 0.0
   k2: 0.0
   p1: 0.0
   p2: 0.0

# D435 廠商標定

projection_parameters:
   fx: 383.7328186035156
   fy: 383.7328186035156
   cx: 320.62640380859375
   cy: 244.07247924804688

然後就可以跑vins了

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

MySQL数据库概念及安装

一、数据库的基本概率 1.1 数据 记录每个人的信息 或者记录数据 1.2 表 存放信息的集合 或者存放行和列的信息 1.3 数据库 表的集合 二、数据库管理系统(DBMS) 2.1 DBMS定义 (DBMS)是一种软件,用于创建和管理…

【开发环境】Ubuntu 18.04 搭建 QT编译环境详细步骤 【亲测有效】

目录 1 查看Ubuntu系统中Qt版本 2 下载Ubuntu系统Qt版本安装包 3 Qt安装 3.1 Qt 安装步骤 3.2 安装qt发现Ubuntu空间不足,怎么去扩容呢? 3.2.1 硬盘操作步骤(需要关闭虚拟机进行操作) 3.2.2 Ubuntu命令操作:安装…

Python 实现1~100之间的偶数求和

result0 for i in range(101):if i%20:result result i print(result) 或者 result0 for i in range(2,101,2):result result i print(result)

海外代理IP在跨境电商中的五大应用场景

在我国跨境电商的发展中,海外代理IP的应用日益广泛,它不仅帮助商家成功打入国际市场,还为他们在多变的全球电商竞争中保持优势。下面是海外代理IP在跨境电商中五个关键的应用场景。 1、精准的市场分析 了解目标市场的消费者行为、产品趋势以…

数据库系统概论-练手题集合【期末复习|考研复习】

前言 总结整理不易,希望大家点赞收藏。 给大家整理了一下数据库系统概论中的练手题,以供大家期末复习和考研复习的时候使用。 数据库系统概论系列文章传送门: 第一章 绪论 第二/三章 关系数据库和标准语言SQL 第四/五章 数据库安全性和完整性…

Nodejs 第五十九章(文件流下载)

文件流下载是一种通过将文件内容以流的形式发送给客户端,实现文件下载的方法。它适用于处理大型文件或需要实时生成文件内容的情况。 安装依赖 npm install express #启动服务 提供接口 npm install cors #解决跨域nodejs 完整版代码 核心知识响应头 Content-Ty…

考研失败, 学点Java打小工_Day3_卫语句_循环

1 编码规范——卫语句 表达异常分支时&#xff0c;少用if-else方式。   比如成绩判断中对于非法输入的处理&#xff1a; /*>90 <100 优秀>80 <90 良好>70 <80 一般>60 <70 及格<60 不及格*/Testpu…

C++作业day6

编程1&#xff1a; 封装一个动物的基类&#xff0c;类中有私有成员&#xff1a;姓名&#xff0c;颜色&#xff0c;指针成员年纪 再封装一个狗这样类&#xff0c;共有继承于动物类&#xff0c;自己拓展的私有成员有&#xff1a;指针成员&#xff1a;腿的个数&#xff08;整型 …

JVM常用垃圾收集器

JVM 4.1 哪些对象可以作为GC ROOT? 虚拟机栈&#xff08;栈帧中的局部变量表&#xff09;中引用的对象本地方法栈中引用的对象方法区静态变量引用的对象方法区常量引用的对象被同步锁持有的对象JNI&#xff08;Java Native Interface&#xff09;引用的对象 4.2 常用垃圾收集…

【C语言进阶篇】自定义类型:结构体(上)

目录 1. 结构体类型的声明 ​编辑 1.1 结构体的创建和初始化 1.2 结构体的特殊声明 1.3 结构体的自引用 2. 结构体内存对齐 2.1 对齐规则 2.2 为什么存在内存对齐 2.3 修改默认对齐数 在我们描述简单对象的时候&#xff0c;使用已有的类型就足够了&#xff0c;比如: 但是当我们…

竞争优势:大型语言模型 (LLM) 如何重新定义业务策略

人工智能在内容创作中的突破 在当今快节奏的商业环境中&#xff0c;像 GPT-4 这样的大型语言模型 (LLM) 不再只是一种技术新颖性&#xff1b; 它们已成为重新定义跨行业业务战略的基石。 从增强客户服务到推动创新&#xff0c;法学硕士提供了企业不容忽视的竞争优势。 1. 加强…

量子计算+HPC!ORNL与Riverlane、Rigetti合作研发

内容来源&#xff1a;量子前哨&#xff08;ID&#xff1a;Qforepost&#xff09; 编辑丨慕一 编译/排版丨沛贤 1000字丨8分钟阅读 近日&#xff0c;英国量子计算初创公司Riverlane和美国量子计算公司Rigetti Computing宣布将参与由美国能源部橡树岭国家实验室&#xff08;OR…

【工具】vscode终端打不开

问题 1The terminal process failed to launch: A native exception occurred during launch (forkpty(3) failed.). 参考方案 下面参考链接是针对windows系统上vscode 出现的相同问题的解答 参考链接&#xff1a;https://blog.csdn.net/weixin_40921421/article/details/122…

Linux(openEuler)部署SpringBoot前后端分离项目(Nginx负载均衡)

假如数据库在本地&#xff0c;没有放在Linux中 1.先把数据库中root的主机改成% 2.项目中的数据库链接配置换成本机ip 3.打包 4.把打包好的jar包放到Linux中 一般把jar包放到opt下 5.把前端部分拷贝到Linux的nginx中 5.1在package.json中修改build的值为图中这样 5.2同时由于在…

理论学习:with torch.no_grad()

如果不加上“with torch.no_grad():”&#xff0c;模型参数会发生改变吗&#xff1f; 如果不使用with torch.no_grad():&#xff0c;在进行模型推理&#xff08;即计算outputs_cls net(inputs[batch_size//2:])这一步&#xff09;时&#xff0c;模型参数不会发生改变&#xf…

Linux进程优先级

一.什么是优先级 1.1 概念 优先级是指定进程获取某种资源的先后顺序 cpu资源分配的先后顺序&#xff0c;就是指进程的优先权&#xff08;priority&#xff09;。优先权高的进程有优先执行权利。配置进程优先权对多任务环境的linux很有用&#xff0c;可以改善系统性能。还可以…

项目五 实现对学生信息的简单查询

项目五 实现对学生信息的简单查询 1&#xff0c;查询数据库中部分字段的信息 使用select语句对表的选择及连接等操作&#xff0c;结构会生成一个临时表&#xff0c;将select结果存放到临时表中 查询数据表中所有字段的值 #格式&#xff1a;(*:表示所有列) select * from 表…

CTF题型 SSTI(2) Flask-SSTI典型题巩固

CTF题型 SSTI(2) Flask-SSTI典型题巩固 文章目录 CTF题型 SSTI(2) Flask-SSTI典型题巩固前记1.klf__sstiSSTI_Fuzz字典&#xff08;网上收集自己补充&#xff09; 2.klf_2数字问题如何解决了&#xff1f;|count |length都被禁&#xff1f; 3.klf_3 前记 从基础到自己构造paylo…

算法笔记p154最大公约数和最小公倍数

目录 最大公约数辗转相除法证明例子代码实现 最小公倍数代码实现 最大公约数 正整数a与b的最大公约数是指a与b的所有公约数中最大的那个公约数&#xff0c;一般用gcd(a, b)表示a和b的最大公约数。 辗转相除法 设a、b均为正整数&#xff0c;则gcd(a, b) gcd(b, a % b)。即被…

如何突破差旅补助管控盲区,让业务快人一步?

差旅补助一直是个热门话题&#xff0c;在差旅管理中备受关注。然而&#xff0c;由于补助场景分散&#xff0c;无法实现统一管理&#xff0c;以及补助也总是要经过反复核实才能发放等问题&#xff0c;使得差旅补助一直是个难题。 一、差旅补助管理存在以下三个主要痛点&#xff…