[失败]尝试六:重装ubuntu16.04.5 & ROS kinetic[失败]
文章目录
- 1、重装ubuntu16.04及基本搭建
- 2、安装ROS kinetic
- 3、创建工作空间并编译
- 4、测试uuv_simulator
- 5、安装roboware
- 6、新机器上面重走ros教程
- 7、虚拟环境下探索搭建深度学习框架
插U盘重新启动电脑的话,最好先关机、再开机,不要直接重启。
1、重装ubuntu16.04及基本搭建
重装ubuntu之后,先处理拼音:
参考20180711_ubuntu 16.04 安装googlepinyin中文输入法
安装nvidia驱动非常顺利:
参考20180712_Ubuntu16.04安装NVIDIA驱动、实现GPU加速
安装anaconda3:
参考20180601_Anaconda在Ubuntu16.04下安装与卸载,并创建虚拟环境:
conda create -n py27 python=2.7
2、安装ROS kinetic
安装ROS Kinetic:
参考20180714_Ubuntu16.04环境下ROS Kinetic的安装
sudo apt-get update发生报错:
GPG error: http://packages.ros.org/ros/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
解决办法:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
在自带源的基础上,参考20180714_Ubuntu16.04环境下ROS Kinetic的安装改成了主服务器(如下图),结果ROS下载安装很慢…后来也发现台式机的源比笔记本少很多。
roscore不顺利,又一次出现以下连续性的错误:
(py27) fyo@fyo:~$ roscore The program 'roscore' is currently not installed. You can install it by typing: sudo apt install python-roslaunch (py27) fyo@fyo:~$ sudo apt install python-roslaunch Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python-roslaunch : Depends: python-roslib but it is not going to be installed E: Unable to correct problems, you have held broken packages. (py27) fyo@fyo:~$ sudo apt install python-roslib Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python-roslib : Depends: catkin but it is not going to be installed E: Unable to correct problems, you have held broken packages. (py27) fyo@fyo:~$ sudo apt install catkin Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: catkin : Depends: python-catkin-pkg but it is not going to be installed E: Unable to correct problems, you have held broken packages. (py27) fyo@fyo:~$ sudo apt install python-catkin-pkg python-catkin-pkg is already the newest version (0.4.14-100). python-catkin-pkg set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
意思就是无解了呗。。。
既然提到是有“broken packages”,那我干脆把源换成了笔记本的源,然后
sudo apt-get update
sudp apt-get upgrade
随后roscore活过来了。。。
调出小龟龟是妥妥的仪式感:
参考20180311_Ubuntu16.04下安装ROS Kinetic并启动小乌龟示例,分别开三个终端输入
source activate py27 roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
OK~~
3、创建工作空间并编译
source activate py27 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace cd ~/catkin_ws/ catkin_make
发生报错:
ImportError: "from catkin_pkg.package import parse_package" failed: No module named catkin_pkg.package
解决办法:
pip install catkin_pkg
随后导入uuv_simulator,先进行
sudo apt install ros-kinetic-uuv-simulator,随后编译时发生报错:
... make[2]: *** No rule to make target '/home/fyo/catkin_ws/src/uuv_simulator/uuv_gazebo_plugins/uuv_gazebo_plugins/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by 'uuv_simulator/uuv_gazebo_plugins/uuv_gazebo_plugins/Accel.pb.cc'. Stop. CMakeFiles/Makefile2:2819: recipe for target 'uuv_simulator/uuv_gazebo_plugins/uuv_gazebo_plugins/CMakeFiles/uuv_gazebo_plugins_msgs.dir/all' failed make[1]: *** [uuv_simulator/uuv_gazebo_plugins/uuv_gazebo_plugins/CMakeFiles/uuv_gazebo_plugins_msgs.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ... [ 1%] Built target uuv_dynamics Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j12 -l12" failed
sudo apt install ros-kinetic-uuv-simulator后一切重来,比刚刚顺利得多,遇到问题:
ImportError: No module named rospkg
安装试试
sudo apt-get install rospkg
报错:
E: Unable to locate package rospkg
花了许多时间改ros源:
sudo gedit /etc/apt/sources.list
仍然没有用,最后才发现应该用
pip install rospkg
而不是
sudo apt-get install或者
sudo pip install…
报错:
ImportError: No module named em
解决:
pip install em
报错:
AttributeError: 'module' object has no attribute 'Interpreter'
解决:
pip uninstall em pip install empy
编译终于完成。说明上一个问题的操作本质上没有必要
4、测试uuv_simulator
终端1:
source activate py27 cd ~/catkin_ws source devel/setup.bash roslaunch uuv_gazebo_worlds ocean_waves.launch
终端2:
source activate py27 cd ~/catkin_ws source devel/setup.bash roslaunch eca_a9_gazebo start_demo_teleop.launch joy_id:=0
终端2发生报错:
ImportError: No module named defusedxml.xmlrpc
解决:
pip install defusedxml
报错:
ImportError: No module named numpy
解决:
pip install numpy
报错:
[ WARN] [1574744512.465977269]: The root link eca_a9/base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. [ERROR] [1574744512.605017392]: Couldn't open joystick force feedback!
此时ros和gazebo都能打开,但是uuv卡在画面不动、不能接受手柄控制。
干脆跑一跑简单的模型,问题都试出来之后,再在虚拟环境中测试uuv。目测没有anaconda和虚拟环境时,uuv会简单许多。
5、安装roboware
靠谱的chrome:
20190111_Ubuntu16.04 安装chrome浏览器
沿用之前下载好的roboware:
20180428_RoboWare Studio安装教程
6、新机器上面重走ros教程
7、虚拟环境下探索搭建深度学习框架
NVIDIA-Linux-x86_64-390.87.run(已安装)
cuda_9.0.176_384.81_linux.run(有)
cudnn7(无)
GCC 4.8(无)
Bazel 0.10.0(无)
tensorflow_gpu-1.8.0(无)
添加conda国内镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --set show_channel_urls yes
安装cuda:
conda install cudatoolkit=9.0 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64/
安装cudnn:
conda install cudnn=7.0.5 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/
说明第一步安装cuda和第二步安装cudnn有冲突,待会儿在重新安装cuda或者upgrade一下咯。
重新安装cuda:
conda install cudatoolkit=9.0 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64/
感觉这样仍然会有问题,于是没有继续。.
想起来有一个cuda9.0的包,于是跑去
sudo sh cuda_9.0.176_384.81_linux.run --no-opengl-libs
最后也没有结果。明天完全按照网上的教程来进行下载和安装!
开机时发现nvidia驱动崩溃了,打算卸载重装
1.卸载nvidia驱动
卸载NV驱动和安装一样,首先ctrl+Alt+F2进入命令行状态,然后停止lightdm
sudo service lightdm stop
或者
sudo /etc/init.d/lightdm stop
卸载命令位置/usr/bin/nvidia-uninstall,以下命令即可卸载。
sudo /usr/bin/nvidia-uninstall
不找这个命令的位置,也可以
sudo apt-get install autoremove --purge nvidia*
安装440版本的nvidia驱动:
参考20180712_Ubuntu16.04安装NVIDIA驱动、实现GPU加速
新创建虚拟环境:
conda create -n drl python=2.7
直接在里面装cuda和cudnn,只不过这次不采取conda安装的方法,采用安装包的方式进行。
另外,tf应该试试用conda进行安装,因为用安装包失败了
处理之前的py27虚拟环境:
1、卸载 Ubuntu 16.04 Kinetic版本ROS
2、删除虚拟环境
- 点赞
- 收藏
- 分享
- 文章举报
- Ubuntu 16.04 + Opencv3.0 + gtx1080 + caffe(SSD) + ROS(Kinetic)
- KinectV2测试物体识别linemod算法 Ubuntu16 ROS-kinetic
- ROS_Kinetic_01 在 Ubuntu 16.04 安装ROS Kinetic 全教程附资料和镜像 2018.02.02更新
- 解决Ubuntu重装系统后,导致SSH认证失败的问题
- ROS_Kinetic_25 在ubuntu16.04使用Leap_motion并作为手势输入控制Gazebo中的机器人
- ROS kinetic+ubuntu 16.04 +cuda8.0记录
- Ubuntu16.04 + ROS kinetic 个人记录
- ROS_Kinetic_25 在ubuntu16.04使用Leap_motion并作为手势输入控制Gazebo中的机器人
- Ubuntu 16.04 配置ROS Kinetic的Eclipse开发环境
- Ubuntu 16.04 + ROS Kinetic 学习镜像
- Ubuntu 16.04 安装ROS kinetic提示Depends: ros-kinetic-desktop but it is not going to be installed
- opencv2.4.13+ros kinetic +ubuntu16.04+iai_kinect2
- ROS_Kinetic_25 在ubuntu16.04使用Leap_motion并作为手势输入控制Gazebo中的机器人
- Ubuntu16.04安装ROS(kinetic版本)
- 在VMware Workstation pro 12.0 下的Ubuntu 16.04安装Kinetic版本的ROS
- Ubuntu16.04下安装ROS Kinetic环境配置时出现没有那个文件目
- Ubuntu 16.04 + ROS Kinetic 实现Turtlebot仿真,激光建图与导航
- Ubuntu16.04安装ROS Kinetic
- Universial Robot (3): 在Ubuntu 16.04和ROS Kinetic上使用UR3 Robot
- ubuntu16.04中ROS-Kinetic报错: not find a package configuration file provided by "gazebo_ros_control“