首页 > 其他分享 >在自己的realsenseD435i上测试ORB_SLAM3

在自己的realsenseD435i上测试ORB_SLAM3

时间:2023-10-24 16:06:12浏览次数:37  
标签:-- data SLAM3 imu realsenseD435i && Tbc ORB Rotation


在自己的realsenseD435i上测试ORB_SLAM3_slam


文章目录

  • 硬件
  • 设置相机内参和外参
  • 设置IMU内参
  • 依赖
  • 标定
  • 可能遇到的问题


硬件

  • x86电脑
  • realsense d435i相机

设置相机内参和外参

安装ROS标定工具包

sudo apt install ros-melodic-camera-calibration

启动realsense相机

roslaunch realsense2_camera rs_camera.launch

打开标定窗口

rosrun camera_calibration cameracalibrator.py --size 10x8 --square 0.01 image:=/camera/color/image_raw camera:=/camera/color --no-service-check

PS:size为网格的横向、纵向的数量,square为网格的大小(单位m)

移动标定板会自动采集样本,当达到所需样本最小数量时,calibration按钮会变绿,点击按钮之后会进行标定。

在自己的realsenseD435i上测试ORB_SLAM3_bash_02

除了realsense的畸变系数需要标定,其他通过下列命令查询

rs-enumerate-devices -c

相机内参和畸变参数

在自己的realsenseD435i上测试ORB_SLAM3_slam_03


相机和IMU的外参

Rotation_Matrix (Extrinsic from "Gyro" To "Fisheye 1")  --> Tbc.data.R
Rotation_Matrix[0][0]  -->  Tbc.data[0][0]
Rotation_Matrix[0][1]  -->  Tbc.data[0][1]
Rotation_Matrix[0][2]  -->  Tbc.data[0][2]
Rotation_Matrix[1][0]  -->  Tbc.data[1][0]
Rotation_Matrix[1][1]  -->  Tbc.data[1][1]
Rotation_Matrix[1][2]  -->  Tbc.data[1][2]
Rotation_Matrix[2][0]  -->  Tbc.data[2][0]
Rotation_Matrix[2][1]  -->  Tbc.data[2][1]
Rotation_Matrix[2][2]  -->  Tbc.data[2][2]

Translation Vector (Extrinsic from "Gyro" To "Fisheye 1")  --> Tbc.data.t
Translation_Vector[0]  -->  Tbc.data[0][3]
Translation_Vector[1]  -->  Tbc.data[1][3]
Translation_Vector[2]  -->  Tbc.data[2][3]

在自己的realsenseD435i上测试ORB_SLAM3_git_04

设置IMU内参

依赖

Ceres

# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
sudo apt-get install libsuitesparse-dev
# Ceres
git clone https://github.com/ceres-solver/ceres-solver.git
cd ceres-solver && mkdir build && cd build && cmake .. && make -j32
sudo make install

libdw

sudo apt-get install libdw-dev

标定

录制rosbag包
终端1

mkdir -p imu_utils_ws/src && cd imu_utils_ws/src && git clone https://github.com/IntelRealSense/realsense-ros.git
cd .. && source /opt/ros/noetic/setup.bash && catkin_make && source devel/setup.bash
roslaunch realsense2_camera rs_t265.launch enable_gyro:=true enable_accel:=true unite_imu_method:=copy

终端2

rosbag record -O imu_calibration /camera/imu

生成IMU内参

终端1

mkdir -p imu_utils_ws/src && cd imu_utils_ws/src && git clone https://github.com/shanpenghui/imu_utils.git
cd .. && source /opt/ros/noetic/setup.bash && catkin_make && source devel/setup.bash
roslaunch imu_utils realsense.launch

终端2

rosbag play -r 200 imu_calibration.bag

可能遇到的问题

Q1

The following packages have unmet dependencies:
 libdw-dev : Depends: libelf-dev but it is not going to be installed
             Depends: libdw1 (= 0.165-3ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

A1

sudo apt-get install libelf1= 0.165-3ubuntu1
sudo apt-get install libelf-dev

Q2

error: aggregate 'std::ofstream out_t' has incomplete type and cannot be defined

A2

//添加保护头文件
#include <fstream>


标签:--,data,SLAM3,imu,realsenseD435i,&&,Tbc,ORB,Rotation
From: https://blog.51cto.com/u_15699099/8005187

相关文章

  • pytorch_Tensorboard的使用
     SummaryWriter()将什么写入文件中,如果不指定的话,就写入默认的需要两个方法writer.add_image()wruter.add_scalar() fromtorch.utils.tensorboardimportSummaryWriter#导入tensorboard,再导入SummaryWriter这个类writer=SummaryWriter("logs")#利用OpenC......
  • ORBSLAM3 安装及测试教程(Ubuntu20.04)
    1.准备工作1.1安装依赖sudoaptinstallgitcmakegccg++mlocate1.2下载ORBSLAM3源码可以去Github下载源码:https://github.com/UZ-SLAMLab/ORB_SLAM3或者终端内下载:gitclonehttps://github.com/UZ-SLAMLab/ORB_SLAM3.git2.安装Pangolin可以去Github下载源......
  • destoon提示http 403 forbidden解决方法
    近做了一个模拟http抓取网站,网址:https://www.clw9335.com/gl/ 去模拟抓取destoon站时候出现http403forbidden问题,必须要植入cookie才能抓取成功,最后找到问题所在。 找到/include/safe.func.php:    12345678function strip_key($array){  ......
  • ORB-SLAM3学习笔记
    在IMU初始化之前和之后,ORB-SLAM3的坐标系的定义是不同的:初始化之前:坐标系基于第一帧图像。它的定义完全基于视觉信息。Z轴正向视深度,X轴和Y轴与图像平面对齐。初始化之后:一旦IMU初始化成功,坐标系会调整以适应一个“世界坐标系”,其中重力方向定义为Z轴负方向。这样,X轴......
  • 题解: CF768D Jon and Orbs
    题解:CF768DJonandOrbs一句话体面:有k种不同的物品,每天等概率任取一种(不一定是新的种类)。q组询问,每组给出一个p,问取完这k件物品的概率不小于\(\frac{p}{2000}\)的最小天数不用说,肯定是概率DP了1.定义:\(f_{i,j}\)表示前\(i\)天选取了\(j\)种物品的概率(\(P.S.\)该定义不......
  • tensorboard 使用
    cmd打开命令tensorboard--logdir=logs--port=#在生成的log文件夹下打开到浏览器查看python使用方法`fromtorch.utils.tensorboardimportSummaryWriterwriter=SummaryWriter("logs")foriinrange(100):writer.add_scalar(tag="y=x^2函数",scalar_value=i**2,globa......
  • A Certain Forbidden Index
    不错的交互题。实际上这题是构造。理性分析,询问次数的下界是\(\frac{n}{2}\)的,因为每个叶子都一定要问到,而一个线段树区间询问至多包含\(2\)个叶子显然\([1,n],[1,1],[n,n]\)必须单独问为了尽量节省次数,我们考虑对叶子和非叶子结点匹配,这样找到之后就可以仅用一次询问找......
  • 完美解决ModuleNotFoundError: No module named ‘torch.utils.tensorboard‘
    完美解决ModuleNotFoundError:Nomodulenamed‘torch.utils.tensorboard’文章目录报错问题解决方法声明报错问题之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。问题描述如下:ModuleNotFoundError:Nomodulenamed‘torch.......
  • HTTP 错误 403.14 - ForbiddenWeb 服务器被配置为不列出此目录的内容
    出现以上这个错误可能有如下解决方法:1.将应用程序池设置成V4.02.在配置文件中加上以下几句代码:<system.webServer><modulesrunAllManagedModulesForAllRequests=“true”/><directoryBrowseenabled=“true”/></system.webServer>3.注册IIS:IIS是在安装完.netframe......
  • 【openEuler创新项目探索】一个Java端的向量化BLAS库VectorBLAS
    VectorBLAS简介VectorBLAS是一个使用Java语言实现的向量化BLAS高性能库,目前已在openEuler社区开源。VectorBLAS通过循环展开、矩阵分块和内存布局优化等算法优化,对BLAS函数进行了深度优化,并利用VectorAPIJDK提供的多种向量化API实现。可以理解为:VectorBLAS=VectorAPI+BLAS......