catkin: command not found解决方案
环境Ubuntu 14.04 + ROS indigo今天编译一个slam建图工具,提示“catkin: command not found”。我比较奇怪的是,我是按照官方教程安装的ROS,按理说应该catkin应该也被安装进去了。至少我在终端输入catkin_然后TAB键后还是会有一些命令:但是唯独catkin命令不存在。解决方案:git clone http
·
环境
Ubuntu 14.04 + ROS indigo
今天编译一个slam建图工具,提示“catkin: command not found”。
我比较奇怪的是,我是按照官方教程安装的ROS,按理说应该catkin应该也被安装进去了。至少我在终端输入catkin_
然后TAB
键后还是会有一些命令:
但是唯独catkin
命令不存在。
解决方案1
sudo apt-get install python-catkin-tools
如果还不能解决,尝试下面方案。
解决方案2:
git clone https://github.com/ros/catkin.git
cd catkin
git branch indigo-devel
mkdir build
cd build
cmake ..
make -j8 && make install
cd ..
python2 setup.py install
python3 setup.py install
这里最后一步可能会报错,提示信息大概是Python
命令错误,只需要修改/build/catkin_generated/python_distutils_install.sh
即可,把
CATKIN_BINARY_DIR="/home/files/catkin/build" \
"/home/conda/bin/python" \
"/home/files/catkin/setup.py" \
改为:
CATKIN_BINARY_DIR="/home/files/catkin/build" \
"/usr/bin/python" \
"/home/files/catkin/setup.py" \
即使用原生Python
而非Conda Python
。
最后安装一些依赖就可以了:
sudo apt install autotools-dev ccache doxygen dh-autoreconf git liblapack-dev libblas-dev libgtest-dev libreadline-dev libssh2-1-dev pylint clang-format-3.8 python-autopep8 python-catkin-tools python-pip python-git python-setuptools python-termcolor python-wstool --yes
然后终端输入catkin --help
,就会有如下提示:
usage: catkin [-h] [-a] [--test-colors] [--version]
[--force-color | --no-color]
[build | clean | config | create | env | init | list | locate | profile]
...
catkin command
optional arguments:
-h, --help show this help message and exit
-a, --list-aliases Lists the current verb aliases and then quits, all
other arguments are ignored
--test-colors Prints a color test pattern to the screen and then
quits, all other arguments are ignored
--version Prints the catkin_tools version.
--force-color Forces catkin to output in color, even when the
terminal does not appear to support it.
--no-color Forces catkin to not use color in the output,
regardless of the detect terminal type.
catkin command:
Call `catkin VERB -h` for help on each verb listed below:
build Builds a catkin workspace.
clean Deletes various products of the build verb.
config Configures a catkin workspace's context.
create Creates catkin workspace resources like packages.
env Run an arbitrary command in a modified environment.
init Initializes a given folder as a catkin workspace.
list Lists catkin packages in the workspace or other arbitray folders.
locate Get the paths to various locations in a workspace.
profile Manage config profiles for a catkin workspace.
[build | clean | config | create | env | init | list | locate | profile]
更多推荐
所有评论(0)