参考:https://www.cnblogs.com/su1961117443/p/12419892.html
或者https://www.bilibili.com/video/BV1zt411G7Vn?p=2
可以安装vmtools,界面显示窗口自适应。
注:因为ubuntu是16.04的,所以这里我们安装Kinetic版本的ROS.
参考链接:https://blog.csdn.net/sinat_39416814/article/details/88343714
通信机制:
开发工具:
应用功能:
生态系统:
注:这些来自古月居视频内容
https://www.bilibili.com/video/BV1zt411G7Vn?p=2
更为详情的入门请观看其视频。
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
注:可能第一次安装会有个别包没有安装上,需要再次运行即可。—时间有点长!!!!
sudo rosdep init
注:这里可能会出现如下错误:
错误:
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down
原因: 由于raw.githubusercontent.com被墙,程序无法下载相应的文件。解决方法就是使raw.githubusercontent.com能够被正常访问。这个网站被墙的方式是dns污染,所以我们只要能够找到这个网站的正确ip就可以了,
解决: 修改hosts文件
1.sudo gedit /etc/hosts
2.把下面这些地址拷贝到hosts文件末尾,然后保存。
192.30.253.118 gist.github.com
185.199.110.153 github.io
151.101.113.194 github.global.ssl.fastly.net
52.216.227.168 github-cloud.s3.amazonaws.com
52.74.223.119 github.com
199.232.28.133 avatars1.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
199.232.28.133 avatars0.githubusercontent.com
199.232.28.133 avatars3.githubusercontent.com
199.232.28.133 raw.githubusercontent.com
199.232.28.133 user-images.githubusercontent.com
199.232.28.133 avatars.githubusercontent.com
199.232.28.133 github.map.fastly.net
199.232.28.133 avatars7.githubusercontent.com
54.239.31.69 aws.amazon.com
54.239.30.25 console.aws.amazon.com
54.239.96.90 ap-northeast-1.console.aws.amazon.com
54.240.226.81 ap-southeast-1.console.aws.amazon.com
54.240.193.125 ap-southeast-2.console.aws.amazon.com
54.239.54.102 eu-central-1.console.aws.amazon.com
177.72.244.194 sa-east-1.console.aws.amazon.com
176.32.114.59 eu-west-1.console.aws.amazon.com
54.239.31.128 us-west-1.console.aws.amazon.com
54.240.254.230 us-west-2.console.aws.amazon.com
54.239.38.102 s3-console-us-standard.console.aws.amazon.com
54.231.49.3 s3.amazonaws.com
52.219.0.4 s3-ap-northeast-1.amazonaws.com
54.231.242.170 s3-ap-southeast-1.amazonaws.com
54.231.251.21 s3-ap-southeast-2.amazonaws.com
54.231.193.37 s3-eu-central-1.amazonaws.com
52.218.16.140 s3-eu-west-1.amazonaws.com
52.92.72.2 s3-sa-east-1.amazonaws.com
54.231.236.6 s3-us-west-1.amazonaws.com
54.231.168.160 s3-us-west-2.amazonaws.com
52.216.80.48 github-cloud.s3.amazonaws.com
54.231.40.3 github-com.s3.amazonaws.com
52.216.20.171 github-production-release-asset-2e65be.s3.amazonaws.com
52.216.228.168 github-production-user-asset-6210df.s3.amazonaws.com
3.再干一件事,执行sudo gedit /etc/resolv.conf,将原有的nameserver这一行注释,并添加以下两行
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器
4.再次执行sudo rosdep init,这次会报一个问题,就是文件已存在:
ERROR: default sources list file already exists: /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
5.这时候直接删除这个文件sudo rm /etc/ros/rosdep/sources.list.d/20-default.list,再次执行sudo rosdep init,我至今操作过很多次,没有出现不成功的状态,如果实在不成功,试试换手机热点,多执行几次,最后输出如下信息就OK了:
wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
rosdep update
注:其实上面一步一般可以解决问题,换手机热点挺好使的。
rosdep update
注:这个命令主要也是网络的问题,一般是读取超时,一般换手机热点、延长时间、以及fq多试试几次就可以了(这些方法参考https://www.cnblogs.com/zxzmnh/p/11758103.html),但是如果上面不行,还有一种方法,就是先下载到本地,在配置, 这个问题困扰了我两天,最后看到大佬们的解决方法,实在是妙。。。
具体操作:
链接: https://pan.baidu.com/s/19OCXIUgZ1RNHV33noc1auw
提取码: tnn9
从上面直接下载,解压到/etc/ros目录下。需要超级权限。
其所在的目录是:/etc/ros/rosdep/sources.list.d/
之前的内容:
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
现在的内容:
# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///etc/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
#gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
yaml file:///etc/ros/rosdistro/master/rosdep/base.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/python.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro file:///etc/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
sudo 打开/usr/lib/python2.7/dist-packages/rosdistro/init.py这个文件,按照下面的代码进行修改。
# index information
#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///etc/ros/rosdistro/master/index-v4.yaml'
这样我就成功了!!!!!!不容易。
参考链接:https://blog.csdn.net/super_sean/article/details/105433250
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
(1)CTRL+ALT+T打开终端(Termial),输入以下命令,初始化ROS环境
roscore
(2)再 打开一个新的终端(Termial),输入以下命令,弹出一个小乌龟窗口:
rosrun turtlesim turtlesim_node
(3)出现一个小乌龟的LOGO后,再 打开一个新的终端(Termial),输入以下命令
rosrun turtlesim turtle_teleop_key
(4) 打开新的Termial,输入以下命令,可以查看ROS节点信息:
rosrun rqt_graph rqt_graph
标定代码:
https://github.com/XidianLemon/calibration_camera_lidar
创建工作环境:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
注:catkin_ws可以任意起名字,但是src不可以。后面的编译工作环境这里就不用了弄了,这些操作在5.2编译功能包实现即可。
编译工作环境:
cd ~/catkin_ws/
catkin_make
设置环境变量:
source devel/setup.bash
检查环境变量:
echo $ROS_PACKAGE_PATH
注:这部分可以参考https://www.bilibili.com/video/BV1zt411G7Vn?p=9
将下面代码
https://github.com/XidianLemon/calibration_camera_lidar
下载到本地,这部分代码就是标定的功能包,所以不需要自己创建功能包了,直接使用编译即可,在前面我们已经创建好了工作环境catkin_ws,接下来将解压后的代码文件夹Is_calibration放到src文件下,然后返回到catkin_ws路径下,重新编译:catkin_make,报一下错
解决: sudo apt install ros-kinetic-jsk-recognition-msgs
安装nlopt:
https://github.com/stevengj/nlopt
按照其步骤走一遍,即可。
roscore
另一个终端:
source ~/catin_ws/devel/setup.bash
rosrun calibration_camera_lidar calibration_toolkit
成功:
参考链接:https://blog.csdn.net/qq_43509129/article/details/109327157?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161950636016780271540331%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=161950636016780271540331&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_v2~rank_v29-1-109327157.first_rank_v2_pc_rank_v29&utm_term=autoware1.14.0%E8%81%94%E5%90%88&spm=1018.2226.3001.4187
解决: 直接删除anaconda3,因为冲突!!!!
参考链接:https://blog.csdn.net/qq_34213260/article/details/107423121
解决方法:虚拟机配置增加内存容量,这里我将2G提高我3G可以了。有时候多试几遍也可以,因为计算机的内存可能还没来得及清理,所以导致这时候的内存比较大。
home/x/catkin_ws/devel/lib/calibration_camera_lidar/calibration_toolkit: error while loading shared libraries: libnlopt.so.0: cannot open shared object file: No such file or directory
这是因为链接问题(因为libnlopt.so.0的链接位置不对)
解决:
cd /etc/ld.so.conf.d
sudo touch libnlopt.conf
sudo gedit libnlopt.conf
在libnlopt.conf文件中添加内容为:/usr/local/lib,
最后使配置生效:
sudo ldconfig
因为autoware1.14只能在ubuntu18.04上安装并且依赖于ROS melodic,因此需要对calibration_camera_lidar功能包下的CMakeLists.txt进行修改,把所有的
if ("${ROS_VERSION}" MATCHES "(indigo|jade|kinetic)")
改成:
if ("${ROS_VERSION}" MATCHES "(indigo|jade|kinetic|melodic)")
历史版本简要回顾:
v1.2.0 支持ROS Kinetic版本,用于激光雷达追踪的kalman滤波,基于yolo_v2视觉跟踪,增加imu驱动,为NDT定位增加IMU和里程计选项,点云距离滤波,rosbag数据预处理;
v1.3.0 增加基于A*算法的避障,GPU的欧式聚类,基于DNN的交通灯识别;
v1.4.0 增加点云的地面滤波;
v1.5.0 增加Web-Ui,多斑马线检测器,ENet图像语义分割,开始支持aarch64架构,支持NVIDIA DrivePX2,为A*路径规划算法增加虚拟障碍物仿真;
v1.6.0 增加GPU-NDT匹配算法,可以控制一些机动车了,新的Rviz模型,增加了ray地面滤波(也就是多线激光雷达的点云地面滤波),增强了DecisionMarker,基于规则控制机动车,存在激光雷达旋转时NDT匹配算法不工作的问题;
v1.7.0 支持定位多种交通标志,支持IDS-imaging相机,支持北阳2D雷达,增加了多雷达标定工具,相机-雷达联合标定工具,支持Velodyne的32线激光雷达,支持AVT相机,基于MxNet的信号灯识别,增加yolo-v3检测器,增加了车辆状态节点和话题,NDT匹配算法的安全监视器,基于IMM-UKF-PDA的多目标跟踪算法,路径点速度重规划工具;
v1.8.0 开始有相应的demo视频公布在油管;新功能:视觉检测与点云检测的信息融合(YOLOV3)和数据融合(点云着色),为Nvidia Drive PX2和其他aach64架构提供交叉编译,支持西克Sick的LD-MRS激光雷达,点云地图的网格划分,现在可以限制NDT建图算法的最大扫描距离了;一些提升:欧式聚类区分点云更精确,最多支持8个激光雷达,加速point2image(应该是用了OpenMP提速)
v1.9.0 开始逐步弃用ROS indigo版本,基于简单的运动估计来估计物体运动,点云地图中静态目标的过滤(应该是和预建地图做差分),L-shape拟合稳定跟踪多辆车,速腾雷达驱动,无需英伟达的sdk也可以交叉编译
v1.10.0 不再支持ROS indigo,可以过滤掉离自身车辆较远的点云,增加FLIR ADK相机驱动,Ouster激光雷达驱动
v1.11.0 catkin不再支持编译源码,改用colcon;点云快速编码用于目标检测,百度的CNN用于点云分割,基于点云的外形/姿态估计;改进的混合A*算法和代价图;
v1.12.0 v1.13.0 v1.14.0都未有说明
https://blog.csdn.net/qq_27493341/article/details/106646054