一丶标定板的准备 棋盘格规格使用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://:
"
and rerun the command. See additional methods in the following link.
Add the server to the list of repositories:
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
```bashsudo 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-dkmssudo 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-devsudo 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 updatesudo 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-setuptoolssudo pip3 install -U setuptoolssudo 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( ': 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' targetCols: 6 targetRows: 7 rowSpacingMeters: 0.05 colSpacingMeters: 0.05
修改成自己棋盘格的参数即可。
设置从激光到相机的静态转换
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无人驾驶软件安装遇见的坑与解决