catkin(是ros中make的一直编译方式,ros中特有,叫做catkin_make。)
问题现象:sudo apt install catkin
正在读取软件包列表... 完成解决办法:
——————————————————————————————————————————————————————————————————
安装aptitude (一种包管理工具)
在ubuntu16.04终端运行sudo apt-get install aptitude
终端中出现下面现象,输入y确定
上面任务完成后,在终端中输入sudo aptitude install catkin
出现一下现象:
输入n
等待任务完成
————————————————————————————————————————————————————————
在终端中输入cd ~/catkin_ws/(前期已经创建好)
继续在终端输入catkin_make
出现一下现象:
出现上图表示成功
_________________________________________________________________________________
在命令行中输入ls如下图所示
出现上图表示成功。
此时我们要重新开始安装ros
步骤如下:
步骤1:sudo apt-get install ros-kinetic-desktop-full
完成步骤1后
————————————————————————————————————————————————————————
步骤2: sudo apt-get install ros-kinetic-rqt
窗口出现一下文字:
——————————————————————————————————————————————————————————
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
libcpp-common0d librosconsole0d libroscpp-serialization0d libroscpp0d
librostime0d libxmlrpcpp0d python-funcsigs python-genmsg python-genpy
python-mock python-pbr python-rosclean python-rosgraph python-rosgraph-msgs
python-rosmaster python-std-msgs rosout
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
ros-kinetic-rqt
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
需要下载 0 B/2,142 B 的归档。
解压缩后会消耗 14.3 kB 的额外空间。
正在选中未选择的软件包 ros-kinetic-rqt。
(正在读取数据库 ... 系统当前共安装有 252863 个文件和目录。)
正准备解包 .../ros-kinetic-rqt_0.5.0-0xenial-20180316-174737-0800_amd64.deb ...
正在解包 ros-kinetic-rqt (0.5.0-0xenial-20180316-174737-0800) ...
正在设置 ros-kinetic-rqt (0.5.0-0xenial-20180316-174737-0800) ...
————————————————————————————————————————————————
步骤3:sudo rosdep init
窗口出现以下内容:
————————————————————————————————————————————————
spp@spp-laptop:~$ 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
spp@spp-laptop:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml
Add distro "groovy"
Add distro "hydro"
Add distro "indigo"
Add distro "jade"
Add distro "kinetic"
Add distro "lunar"
Add distro "melodic"
updated cache in /home/spp/.ros/rosdep/sources.cache
步骤4:sudo apt-get install python-rosinstall
窗口出现下面类似内容:
——————————————————————————————————————————————-
spp@spp-laptop:~$ sudo apt-get install python-rosinstall
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
libcpp-common0d librosconsole0d libroscpp-serialization0d libroscpp0d
librostime0d libxmlrpcpp0d python-funcsigs python-genmsg python-genpy
python-mock python-pbr python-rosclean python-rosgraph python-rosgraph-msgs
python-rosmaster python-std-msgs rosout
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
bzr libjs-excanvas libserf-1-1 libsvn1 mercurial mercurial-common
python-bzrlib python-configobj python-dbus python-gi python-gpgme
python-httplib2 python-keyring python-launchpadlib python-lazr.restfulclient
python-lazr.uri python-oauth python-secretstorage python-simplejson
python-vcstools python-wadllib python-wstool subversion
建议安装:
bzr-doc bzrtools python-bzrlib.tests qct kdiff3 | kdiff3-qt | kompare | meld
| tkcvs | mgdiff python-mysqldb python-bzrlib-dbg python-kerberos
python-pycurl python-configobj-doc python-dbus-doc python-dbus-dbg
python-gi-cairo python-fs python-gdata python-kde4 python-keyczar
python-testresources python-secretstorage-doc db5.3-util subversion-tools
下列【新】软件包将被安装:
bzr libjs-excanvas libserf-1-1 libsvn1 mercurial mercurial-common
python-bzrlib python-configobj python-dbus python-gi python-gpgme
python-httplib2 python-keyring python-launchpadlib python-lazr.restfulclient
python-lazr.uri python-oauth python-secretstorage python-simplejson
python-vcstools python-wadllib python-wstool subversion
下列软件包将被升级:
python-rosinstall
升级了 1 个软件包,新安装了 23 个软件包,要卸载 0 个软件包,有 3 个软件包未被升级。
需要下载 0 B/5,609 kB 的归档。
解压缩后会消耗 28.2 MB 的额外空间。
您希望继续执行吗? [Y/n] y
等待代码条滚动完毕
————————————————————————————————————————————————
步骤5:
spp@spp-laptop:~$ source /opt/ros/kinetic/setup.bash
spp@spp-laptop:~$ cd ~/catkin_ws/src
spp@spp-laptop:~/catkin_ws/src$ catkin_init_workspace
窗口出现以下内容:
——————————————————————————————————————————————————
Removing symlink "/home/spp/catkin_ws/src/CMakeLists.txt" which points to non-existing file
Creating symlink "/home/spp/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake"
———————————————————————————————————————————————————
步骤6:
spp@spp-laptop:~/catkin_ws/src$ cd ~/catkin_ws/
spp@spp-laptop:~/catkin_ws$ catkin_make
Base path: /home/spp/catkin_ws
Source space: /home/spp/catkin_ws/src
Build space: /home/spp/catkin_ws/build
Devel space: /home/spp/catkin_ws/devel
Install space: /home/spp/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/spp/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/spp/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/spp/catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.11
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/spp/catkin_ws/build
####
#### Running command: "make -j4 -l4" in "/home/spp/catkin_ws/build"
####
spp@spp-laptop:~/catkin_ws$ ls
build devel src
spp@spp-laptop:~/catkin_ws$ source ~/catkin_ws/devel/setup.bash
spp@spp-laptop:~/catkin_ws$ roscore
... logging to /home/spp/.ros/log/56621360-3ffa-11e8-82ad-a0d37a06e253/roslaunch-spp-laptop-13541.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://spp-laptop:33459/
ros_comm version 1.12.13
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.13
NODES
auto-starting new master
process[master]: started with pid [13551]
ROS_MASTER_URI=http://spp-laptop:11311/
setting /run_id to 56621360-3ffa-11e8-82ad-a0d37a06e253
process[rosout-1]: started with pid [13564]
started core service [/rosout]
——————————————————————————————————————————————————————
完美终结