kalibr標定ZED2i雙目加imu

?一、錄制bag

本人使用的zed2i相機。

rosbag record -O 32 /zed2i/zed_node/imu/data /zed2i/zed_node/imdata_raw  /zed2i/zed_node/left/image_rect_color /zed2i/zed_node/right/image_rect_color /zed2i/zed_node/left_raw/image_raw_color /zed2i/zed_node/right_raw/image_raw_color

我錄制了相機自我去畸變和原本圖像的雙目圖像,如果你也使用的ZED相機,推薦查看這篇博客,了解各個話題的含義:

雙目立體視覺(3)- ZED2 & ROS Melodic 發布RGB圖像及深度信息_zed2官方文檔-CSDN博客

?我電腦18.04,cuda11.4,zedsdk 3.8??

?圖像分辨率,設置的1280*720,10hz? ,Imu 300hz 錄制1min左右,頻率官網說調到4hz最好,之前標定發現不改也可以,如果修改可以使用以下命令

舉例:

rosrun topic_tools throttle messages /zed2i/zed_node/right_raw/image_raw_color 4.0 /right/image_raw

?以下是我的配置文件,一些自己嘗試出來的注意事項,希望給大家避坑:

1、zed2i.yaml

# params/zed2i.yaml
# Parameters for Stereolabs ZED2 camera
---general:camera_model:               'zed2i'depth:min_depth:                  0.7             # Min: 0.2, Max: 3.0 - Default 0.7 - Note: reducing this value wil require more computational power and GPU memorymax_depth:                  10.0             # Max: 40.0pos_tracking:imu_fusion:                 true            # enable/disable IMU fusion. When set to false, only the optical odometry will be used.sensors:sensors_timestamp_sync:     false           # Synchronize Sensors messages timestamp with latest received frame 不能開,開會極大降低IMU頻率max_pub_rate:               200.            # max frequency of publishing of sensors data. MAX: 400. - MIN: grab rate imu的頻率,開到400實際值會在360附近publish_imu_tf:             true            # publish `IMU -> <cam_name>_left_camera_frame` TFobject_detection:od_enabled:                 false           # True to enable Object Detection [not available for ZED]model:                      0               # '0': MULTI_CLASS_BOX - '1': MULTI_CLASS_BOX_ACCURATE - '2': HUMAN_BODY_FAST - '3': HUMAN_BODY_ACCURATE - '4': MULTI_CLASS_BOX_MEDIUM - '5': HUMAN_BODY_MEDIUM - '6': PERSON_HEAD_BOXconfidence_threshold:       50              # Minimum value of the detection confidence of an object [0,100]max_range:                  15.             # Maximum detection rangeobject_tracking_enabled:    true            # Enable/disable the tracking of the detected objectsbody_fitting:               false           # Enable/disable body fitting for 'HUMAN_BODY_X' modelsmc_people:                  true            # Enable/disable the detection of persons for 'MULTI_CLASS_BOX_X' modelsmc_vehicle:                 true            # Enable/disable the detection of vehicles for 'MULTI_CLASS_BOX_X' modelsmc_bag:                     true            # Enable/disable the detection of bags for 'MULTI_CLASS_BOX_X' modelsmc_animal:                  true            # Enable/disable the detection of animals for 'MULTI_CLASS_BOX_X' modelsmc_electronics:             true            # Enable/disable the detection of electronic devices for 'MULTI_CLASS_BOX_X' modelsmc_fruit_vegetable:         true            # Enable/disable the detection of fruits and vegetables for 'MULTI_CLASS_BOX_X' modelsmc_sport:                   true            # Enable/disable the detection of sport-related objects for 'MULTI_CLASS_BOX_X' models

?2、common.yaml

# params/common.yaml
# Common parameters to Stereolabs ZED and ZED mini cameras
---# Dynamic parameters cannot have a namespace
brightness:                 4                                   # Dynamic
contrast:                   4                                   # Dynamic
hue:                        0                                   # Dynamic
saturation:                 4                                   # Dynamic
sharpness:                  4                                   # Dynamic
gamma:                      8                                   # Dynamic - Requires SDK >=v3.1
auto_exposure_gain:         true                                # Dynamic
gain:                       100                                 # Dynamic - works only if `auto_exposure_gain` is false
exposure:                   100                                 # Dynamic - works only if `auto_exposure_gain` is false
auto_whitebalance:          true                                # Dynamic
whitebalance_temperature:   42                                  # Dynamic - works only if `auto_whitebalance` is false
depth_confidence:           30                                  # Dynamic
depth_texture_conf:         100                                 # Dynamic
pub_frame_rate:             10.0                                # Dynamic - frequency of publishing of video and depth data
point_cloud_freq:           10.0                                # Dynamic - frequency of the pointcloud publishing (equal or less to `grab_frame_rate` value)general:camera_name:                zed                             # A name for the camera (can be different from camera model and node name and can be overwritten by the launch file)zed_id:                     0serial_number:              0resolution:                 2                               # '0': HD2K, '1': HD1080, '2': HD720, '3': VGAgrab_frame_rate:            10                              # Frequency of frame grabbing for internal SDK operationsgpu_id:                     -1base_frame:                 'base_link'                     # must be equal to the frame_id used in the URDF fileverbose:                    false                           # Enable info message by the ZED SDKsvo_compression:            2                               # `0`: LOSSLESS, `1`: AVCHD, `2`: HEVCself_calib:                 true                            # enable/disable self calibration at startingcamera_flip:                falsevideo:img_downsample_factor:      1                             # Resample factor for images [0.01,1.0] The SDK works with native image sizes, but publishes rescaled image.縮放因子,例如0.5會縮小圖像長寬各一半extrinsic_in_camera_frame:  true                            # if `false` extrinsic parameter in `camera_info` will use ROS native frame (X FORWARD, Z UP) instead of the camera frame (Z FORWARD, Y DOWN) [`true` use old behavior as for version < v3.1]depth:quality:                    3                               # '0': NONE, '1': PERFORMANCE, '2': QUALITY, '3': ULTRA, '4': NEURAL
#控制深度圖的質量級別。'0': NONE:不生成深度圖。'1': PERFORMANCE:優先性能的深度圖生成模式,適用于需要較高幀率的應用。'2': QUALITY':優先質量的深度圖生成模式,適用于需要更準確深度信息的應用,但可能降低幀率。'3': ULTRA':最高質量的深度圖生成模式,提供最好的深度信息,但要求高計算能力。'4': NEURAL':使用神經網絡增強的深度圖生成模式,旨在提供更準確和詳細的深度信息。sensing_mode:               0                               # '0': STANDARD, '1': FILL (not use FILL for robotic applications)depth_stabilization:        1                               # `0`: disabled, `1`: enabledopenni_depth_mode:          false                           # 'false': 32bit float meters, 'true': 16bit uchar millimetersdepth_downsample_factor:    1                             # Resample factor for depth data matrices [0.01,1.0] The SDK works with native data sizes, but publishes rescaled matrices (depth map, point cloud, ...)pos_tracking:pos_tracking_enabled:       false                            # True to enable positional tracking from startpublish_tf:                 true                            # publish `odom -> base_link` TFpublish_map_tf:             true                            # publish `map -> odom` TFmap_frame:                  'map'                           # main frameodometry_frame:             'odom'                          # odometry framearea_memory_db_path:        'zed_area_memory.area'          # file loaded when the node starts to restore the "known visual features" map. save_area_memory_db_on_exit: false                          # save the "known visual features" map when the node is correctly closed to the path indicated by `area_memory_db_path`area_memory:                true                            # Enable to detect loop closurefloor_alignment:            false                           # Enable to automatically calculate camera/floor offsetinitial_base_pose:          [0.0,0.0,0.0, 0.0,0.0,0.0]      # Initial position of the `base_frame` -> [X, Y, Z, R, P, Y]init_odom_with_first_valid_pose: true                       # Enable to initialize the odometry with the first valid posepath_pub_rate:              2.0                             # Camera trajectory publishing frequencypath_max_count:             -1                              # use '-1' for unlimited path sizetwo_d_mode:                 false                           # Force navigation on a plane. If true the Z value will be fixed to "fixed_z_value", roll and pitch to zerofixed_z_value:              0.00                            # Value to be used for Z coordinate if `two_d_mode` is true    mapping:mapping_enabled:            false                           # True to enable mapping and fused point cloud publicationresolution:                 0.05                            # maps resolution in meters [0.01f, 0.2f]max_mapping_range:          -1                              # maximum depth range while mapping in meters (-1 for automatic calculation) [2.0, 20.0]fused_pointcloud_freq:      1.0                             # frequency of the publishing of the fused colored point cloudclicked_point_topic:        '/clicked_point'                # Topic published by Rviz when a point of the cloud is clicked. Used for plane detection

二、kalibr的使用

1、雙目相機標定

首先,安裝教程有很多,而且沒有明顯的坑,可以自己搜索,或者直接編譯我調整好的

報錯:ImportError: No module named igraph

解決方式: sudo apt-get install python2.7-igraph

先標定雙目:

rosrun kalibr kalibr_calibrate_cameras --bag '/home/lb/bag/3/32.bag' --topics  /zed2i/zed_node/left/image_rect_color /zed2i/zed_node/right/image_rect_color --models pinhole-radtan pinhole-radtan --target '/home/lb/calib/kalibr_workspace/april_6x6.yaml' 

命令含義(GPT生成):

  • rosrun:這是一個ROS命令,用于在ROS包中運行特定的節點。
  • kalibr:這是你要運行的ROS包的名稱。
  • kalibr_calibrate_cameras:這是 kalibr 包中你想要運行的特定節點或可執行文件。它似乎用于相機校準。
  • --bag '/home/lb/bag/3/32.bag':這指定了你要用于校準的ROS包文件。ROS包是存儲ROS消息數據的一種便捷方式。
  • --topics /zed2i/zed_node/left/image_rect_color /zed2i/zed_node/right/image_rect_color:這指定了你要用于校準的包文件中的主題。在這種情況下,似乎是左右相機圖像。
  • --models pinhole-radtan pinhole-radtan:這指定了你要用于校準的相機模型。在這里,你使用的是針孔-radial-tangential模型,用于左右兩個相機。
  • --target '/home/lb/calib/kalibr_workspace/april_6x6.yaml':這指定了校準目標的YAML文件。校準目標是具有已知幾何形狀的模式或物體,用于校準相機。

耐心等待之后

結果:

?重投影誤差1左右,可用

?2、Imu標定

使用 imu_utils 進行標定,它依賴ceres-solver優化庫,要先安裝ceres庫

另外,imu_utils是依賴于code_utils的,所以先編譯code_utils后再下載編譯imu_utils

?錄制2h左右,期間保持相機不動。

結果:

?新建一個imu.yaml

填入:

rostopic: /zed2i/zed_node/imu/data
update_rate: 300.0 #Hzaccelerometer_noise_density: 1.8370034577350359e-02
accelerometer_random_walk: 3.1364398099665192e-04
gyroscope_noise_density: 2.2804362845695965e-03
gyroscope_random_walk: 4.7394104123124287e-05

3、開始聯合標定

rosrun kalibr kalibr_calibrate_imu_camera --bag '/home/lb/bag/3/32.bag'? --target '/home/lb/calib/kalibr_workspace/april_6x6.yaml'? --cam '/home/lb/bag/3/32-camchain.yaml'? --imu '/home/lb/calib/kalibr_workspace/imu.yaml'

rosrun kalibr kalibr_calibrate_imu_camera --bag '/home/lb/bag/3/32.bag'  --target '/home/lb/calib/kalibr_workspace/april_6x6.yaml'  --cam '/home/lb/bag/3/32-camchain.yaml'  --imu '/home/lb/calib/kalibr_workspace/imu.yaml'

?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/719409.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/719409.shtml
英文地址,請注明出處:http://en.pswp.cn/news/719409.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Matlab|【免費】基于合作博弈的綜合能源系統利益分配優化調度

目錄 主要內容 部分代碼 結果一覽 下載鏈接 主要內容 該程序實現的模型為綜合能源系統利益分配優化調度&#xff0c;采用合作博弈方法&#xff0c;模型針對IES系統的P2G、電解槽、甲烷反應器、儲氫罐、CHP和燃氣鍋爐等設備進行建模&#xff0c;實現基于合作博弈的…

std::shared_from_this注意事項:exception bad_weak_ptr

1.不可以在構造函數中調用shared_from_this() 因為它的實現是&#xff1a; _LIBCPP_INLINE_VISIBILITYshared_ptr<_Tp> shared_from_this(){return shared_ptr<_Tp>(__weak_this_);}也就是它依賴的__weak_this_此時還未創建完成。 2.一定要public繼承 class MyTy…

大數據開發(Java面試真題-卷二)

大數據開發&#xff08;Java面試真題&#xff09; 1、請簡要說明Java中equeals()和hashCode()的作用及區別&#xff1f;2、Java中的四種訪問修飾符及它們之間的區別&#xff1f;3、請解釋Java中的異常處理機制&#xff0c;包括checked exception和unchecked exception?4、Java…

Linux 學習筆記(10)

十、 進程管理 進程就是運行中的程序&#xff0c;一個運行著的程序&#xff0c;可能有多個進程。 比如 LinuxSir.Org 所用的 WWW 服務器是 apache 服務器&#xff0c;當管理員啟動服務后&#xff0c;可能會有好多人來訪問&#xff0c;也就是說許多用戶來同時請 求 htt…

QT debug編譯失敗:xxx/bin/ld.exe: cannot find -lxxd1

原因&#xff1a;由于編譯時&#xff0c;使用debug模式下&#xff0c;動態庫沒有對應的lxxd1中的xx庫 解決方案1&#xff1a;改為release編譯&#xff1b; 解決方案2&#xff1a;在引用的三方pri文件中&#xff0c;去掉多余的d #修改前 if(!debug_and_release|build_pass):CON…

沃德的背包

題目描述 沃德進入源碼世界的路上有很多寶石&#xff0c;可是沃德的背包只能背總重量不超過m的寶石&#xff0c;路上一共有n個寶石&#xff0c;每個寶石的重量為wi&#xff0c;請你幫沃德選擇盡量多的寶石裝進背包&#xff0c;請注意寶石的總重量不超過m。 輸入描述 第一行輸…

Django官網項目 二

官網地址&#xff1a;Writing your first Django app, part 2 | Django documentation | Django 創建模組&#xff1a; 注冊model &#xff08;bug&#xff1a;沒有加后面的逗號&#xff09; 在manage.py 的目錄下&#xff1a; python manage.py makemigrations polls pyth…

redis09 集群(cluster)

思維草圖 為什么要使用集群 單臺redis內存容量的限制單臺redis并發寫量太大有性能瓶頸 redis集群認識 redis集群是對redis的水平擴容&#xff0c;即啟動N個redis節點&#xff0c;將整個數據分布存儲在這個N個節點中&#xff0c;每個節點存儲總數據的1/N。 如下圖&#xff1…

C++ 根據公式計算橢圓任意點到中心的距離

#include <iostream> using namespace std;double fact(int x) //定義階乘函數。注意是double類型 {double y x; //注意是double類型for (int i x-1; i > 0; i--)y * i;return y; };double My_sin(int x) //定義sin函數。注意是double類型 {double y 0; //注意是do…

【視頻圖像取證篇】Amped FIVE專業法醫圖像和視頻增強軟件之模糊圖像去隔行功能

【視頻圖像取證篇】Amped FIVE專業法醫圖像和視頻增強軟件之模糊圖像去隔行功能 法醫圖像和視頻增強軟件&#xff0c;專業又強大&#xff01;&#xff01;&#xff01;超過 140 種過濾器和工具&#xff0c;用于分析、恢復和增強數字圖像和視頻。Amped FIVE能夠穩定抖動的視頻&…

Linux:ansible-playbook配置文件(劇本)(進階)

Linux&#xff1a;ansible-playbook配置文件&#xff08;劇本&#xff09;_ansible-playbook -i參數-CSDN博客https://blog.csdn.net/w14768855/article/details/132579492?ops_request_misc%257B%2522request%255Fid%2522%253A%2522170930036016800215061982%2522%252C%2522s…

LaTeX排版論文的常見問題匯總(持續更新中)

文章目錄 LaTeX排版論文的常見問題匯總&#xff08;持續更新中&#xff09;1.如何上傳期刊或會議提供的LaTeX模板&#xff1f;2.模板中各文件的說明3.LaTeX中如何設置字體大小&#xff1f;3.1如何設置表格中的字體大小&#xff1f;3.2如何設置表格、圖片標題的字體大小&#xf…

A/D轉換

硬件電路模型 模數轉換代碼 main.c #include <REGX52.H> #include "LCD1602.h" #include "Delay.h" #include "XPT2046.h"unsigned int ADValue; int main(){LCD_Init();LCD_ShowString(1,1,"ADJ NTC RG");while(1){ADValue …

什么是Vue的服務端渲染(SSR)?它有什么作用?

Vue的服務端渲染&#xff08;SSR&#xff09;是指將Vue組件在服務器端進行渲染&#xff0c;然后將已經渲染好的頁面返回給瀏覽器&#xff0c;相比于傳統的客戶端渲染&#xff0c;SSR可以更好地優化SEO和加速首屏加載速度。在傳統的客戶端渲染中&#xff0c;瀏覽器需要加載所有的…

【MySQL系列】在 MacOS 上安裝 MySQL

在 MacOS 上有兩種方式安裝 MySQL 服務器&#xff1a;通過 brew 安裝和通過安裝包安裝。 文章目錄 1、通過 brew 安裝 MySQL1.1、安裝 MySQL1.2、啟動 MySQL 服務器1.3、配置 MySQL 服務器1.4、MySQL 服務器管理命令 2、通過安裝包安裝 MySQL2.1、下載安裝包2.2、安裝 MySQL2.3…

深入理解快速排序算法:從原理到實現

目錄 1. 引言 2. 快速排序算法原理 3. 快速排序的時間復雜度分析 4. 快速排序的應用場景 5. 快速排序的優缺點分析 5.1 優點&#xff1a; 5.2 缺點&#xff1a; 6. Java、JavaScript 和 Python 實現快速排序算法 6.1 Java 實現&#xff1a; 6.2 JavaScript 實現&#…

30、類和接口

文章目錄 接口概念接口和類之間有何關系&#xff1f; 可以使用接口來約束類接口繼承接口接口還可以繼承類接口為什么可以繼承類內層原因&#xff1a;接口為什么可以繼承類 用得出的結論解釋最初的demo接口繼承類的一些限制 接口概念 接口&#xff08;Interfaces&#xff09;可…

【大廠AI課學習筆記NO.61】環境部署的選擇

主要是選擇單機和分布式、生產和開發環境的規劃等。 開發環境、測試環境、預發布環境和生產環境是軟件開發和部署過程中常見的幾個環境&#xff0c;它們各自的定義、區別、聯系以及實現的關鍵技術如下&#xff1a; 1. 開發環境&#xff08;Development Environment&#xff09…

Ai 快捷鍵學習

Ai 快捷鍵學習 Ait 鼠標滾輪 實現頁面的放大和縮小 空格鼠標左鍵 抓手工具 ctrl r 調出標尺&#xff0c;可以通過標尺來對其圖片 ctrl &#xff1b; 隱藏標尺 ctrl ‘ 調用網格標尺 再按一次就是取削 ctrl shiftz 反向撤回 tab 快速全屏 ctsls / ctrlshift…

完全解析淘寶天貓詳情接口API:購物小白也能秒變高手

在如今的電商領域中&#xff0c;淘寶和天貓是最為重要和熱門的平臺之一。作為購物平臺的用戶&#xff0c;我們通常只是瀏覽商品的頁面&#xff0c;點擊購買和支付&#xff0c;卻未能深入了解背后的技術信息。然而&#xff0c;淘寶天貓詳情接口API的了解和運用&#xff0c;聯訊數…