LMS151-10100单线激光雷达与RealSense双目相机的联合标定

一丶标定板的准备

棋盘格规格使用A4纸大小,角点(图7中红色、绿色圆圈标记)数分别为8个及6个,单个棋盘格为0.024mm*0.024mm的正方形。
在这里插入图片描述
将打印出的高清A4大小棋盘格粘贴在平整、坚硬的平面上。

二丶SICK激光雷达的使用

本次标定的激光雷达为LMS151-10100,首先在官网上下载SOPAS Engineering Tool,并安装LMS15x的SOPAS驱动SSD。
在这里插入图片描述
安装完成后将Ethernet网线接入电脑,配置激光雷达的IP地址使其与电脑处于同一网段中,LMS的默认IP地址为192.168.0.1。

使用ubuntu连接获得激光数据:
1.下载ROS-LMS1xx驱动
2.编译完成并修改环境变量后启动节点,连接激光

roscore

3.新打开终端,启动节点
(一般需要指定ip rosrun lms1xx LMS1xx_node _host:=192.168.1.14,已经指定跳过)

roslaunch lms1xx LMS1xx.launch

显示已经成功连接到 laser。

4.打印scan话题 激光信息

rostopic echo /scan

三丶RealSense双目相机的安装

RealSense官方文档

Register the server’s public key:

sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

In case the public key still cannot be retrieved, check and specify proxy settings: export http_proxy="http://<proxy>:<port>"

and rerun the command. See additional methods in the following link.

Add the server to the list of repositories:

#Ubuntu 16 LTS:
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u

```bash
#Ubuntu 18 LTS:
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u

Install the libraries (see section below if upgrading packages):

sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils

The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.
Optionally install the developer and debug packages:

sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg

With dev package installed, you can compile an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2 or an IDE of your choice.

Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.
Verify that the kernel is updated :

modinfo uvcvideo | grep "version:" should include realsense string

在这里插入图片描述

四丶Autoware的安装

引用博客 Autoware安装使用教程

系统:ubuntu16.04
ROS:kinetic

opencv 和 Qt 的安装。
1.安装依赖:

sudo apt-get update
sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin libmosquitto-dev gksu

2.克隆库

cd $HOME
git clone https://github.com/CPFL/Autoware.git --recurse-submodules

3.创建colcon

sudo apt-get install -y python3-pip python3-setuptools
sudo pip3 install -U setuptools

sudo apt-get install -y python3-colcon-common-extensions

在安装setuptools时出现如下错误:

The directory '/home/ilook/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ilook/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

添加 -H 后依然报错

 sudo -H pip3 install -U setuptools
You are using pip version 8.1.1, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

更新python下的pip版本:

python3 -m pip install --upgrade pip

出现如下错误:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/c3/a9/5dc32465951cf4812e9e93b4ad2d314893c2fa6d5f66ce5c057af6e76d85/setuptools-49.6.0-py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4226006748>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

输入如下安装命令:

pip install --user report

再输入sudo pip3 install -U setuptools ,安装成功!!!

4.编译

cd ~/Autoware/ros/
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
./colcon_release

rosdep update 时,好像是翻墙被拦截一直不行,按照网上说法改了IP地址也不行,就直接放弃安装整个autoware,只安装其标定部分lidar_camera_calibration。从autoware官网工具中直接下载安装,但是需要改一下Cmakelist.txt。

五丶获得Realsense相机内参,棋盘格yaml

需要启动相机节点,参考以下博客继续安装ROS功能包。

https://blog.csdn.net/weixin_40628128/article/details/90376767
https://blog.csdn.net/sinat_16643223/article/details/107710249
https://www.cnblogs.com/ljxislearning/p/13434204.html

roslaunch realsense2_camera rs_camera.launch //打开相机节点
rostopic echo /camera/color/camera_info //查看相机内参

在这里插入图片描述

棋盘格参数在官网上可以直接下载,https://github.com/ethz-asl/kalibr/wiki/downloads
格式如下:

target_type: 'checkerboard' #gridtype
targetCols: 6               #number of internal chessboard corners
targetRows: 7               #number of internal chessboard corners
rowSpacingMeters: 0.05      #size of one chessboard square [m]
colSpacingMeters: 0.05      #size of one chessboard square [m]

修改成自己棋盘格的参数即可。

设置从激光到相机的静态转换

rosrun tf_2ros static_transform_publisher 0 0 1 0 0 /camera_link /laser 

六丶采集ROS包和联合标定参照下博客

手把手教你使用Autoware标定SICK-2D激光雷达和相机
新版:使用Autoware进行(双目)相机与激光雷达的联合标定
使用autoware获得相机内参并与雷达联合标定

在最新版autoware工具下,需要使用相机内参yaml文件,因此首先对相机内参标定

rosrun autoware_camera_lidar_calibrator cameracalibrator.py --square 0.035 --size 11x8 image:=/camera/color/image_raw

其中square是标定板格子的尺寸,size为角点的数量,image为相机发布的节点,本次直接开启相机节点标定,使用录制的rosbag标定无法显示,参考中的博客是可以使用录制的bag的。
在这里插入图片描述输入命令后打开display,不断移动相机或者标定板,使右边X,Y,Size,Skew满足要求后,CAUBRATE按钮会变亮,点击之后等待一段时间,SAVE按钮变亮,点击保存,得到相机的内参文件,文件保存在HOME目录下,如下图所示:


启动相机和激光雷达节点,后运行标定工具。

roslaunch autoware_camera_lidar_calibrator camera_lidar_calibration.launch intrinsics_file:=/home/20200819_1024_autoware_camera_calibration.yaml image_src:=/camera/color/image_raw

对于单线激光雷达,尝试再使用老版本的toolkit工具进行标定。
未发现单独的标定工具包,因此直接安装autoware,参考以下博客:
Autoware 进行 Robosense-16 线雷达与 ZED 双目相机联合标定!

但是在使用rosdep出现问题,首先是无法访问的问题,需要添加IP,参照博客:ros 安装遇到 raw.githubusercontent.com无法访问,被墙的问题,尝试有效解决方案
如果还是不行,可以改一下IP地址再试试,在http://site.ip138.com中挑选,而且一定要重启终端再试!!!

Autoware无人驾驶软件安装遇见的坑与解决

  • 2
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

秃头队长

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值