安装ROS,天坑笔记

安装ROS

ubuntu修改文件权限

sudo chmod 600 ××× (只有所有者有读和写的权限)
sudo chmod 644 ××× (所有者有读和写的权限,组用户只有读的权限)
sudo chmod 700 ××× (只有所有者有读和写以及执行的权限)
sudo chmod 666 ××× (每个人都有读和写的权限)
sudo chmod 777 ××× (每个人都有读和写以及执行的权限)
chmod 440 /etc/sudoers   #退出保存/etc/sudoers文件
 su username                         #切换用户到指定用户

安装ROS

无法定位软件包 ros-kinetic-desktop-full
ROS有Melodic、Lunar、Kinetic不同的种类对应着不同的ubuntu版本,
Melodic 主要对应:Ubuntu Artful (17.10), Bionic (18.04 LTS) 以及Debian Stretch
Kinetic 主要对应:Ubuntu Wily (15.10) and Ubuntu Xenial (16.04 LTS)
步骤:
https://blog.csdn.net/sinat_34130812/article/details/81666728
安装ROS时执行到sudo rosdep init时出现sudo: rosdep:找不到命令提示

sudo apt install python-rosdep2
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.

法1:

 sudo apt-get install python-rosdep python-wstool ros-melodic-ros

(根据自己实际的ROS版本确定中间的名字)

法二:
报错原因是GitHub的raw.githubusercontent.com无法连接
需要解决GitHub的raw.githubusercontent.com无法连接问题
通过IPAddress.com首页,输入raw.githubusercontent.com查询到真实IP地址
修改hosts Ubuntu,

sudo vi /etc/hosts

添加以下内容保存即可

199.232.28.133 raw.githubusercontent.com
sudo rosdep init

成功

Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
	rosdep update

运行roscore时候报错 Unable to contact my own server at的解决方法

 export ROS_HOSTNAME=localhost
 export ROS_MASTER_URI=http://localhost:11311

报错

RLException: roscore cannot run as another roscore/master is already running.
Please kill other roscore/master processes before relaunching.
The ROS_MASTER_URI is http://localhost:11311/
The traceback for the exception was written to the log file

killall -9 roscore
killall -9 rosmaster

摄像头安装
报错

RLException: [usb_cam-test.get] is neither a launch file in package [usb_cam] nor is [usb_cam] a launch file name
The traceback for the exception was written to the log file

source ~/catkin_ws/devel/setup.bash

此处注意:
博客中的命令为:

roslaunch usb_cam usb_cam-test.get

而我的文件中的名字为

usb_cam-test.launch

报错

v4l2-ctl: not found

sudo apt-get install v4l-utils 

参考:
https://blog.csdn.net/sinat_34130812/article/details/81666728
https://blog.csdn.net/weixin_40772628/article/details/103377637
https://blog.csdn.net/weixin_43288910/article/details/105627358?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-3

你可能感兴趣的:(DSO)