当前位置:   article > 正文

ROS编译过程依赖问题快速解决命令_rosbuild 编译同时补全依赖

rosbuild 编译同时补全依赖

rosdep命令官方介绍

Usage: rosdep [options]

Commands:

rosdep check …
check if the dependencies of package(s) have been met.

rosdep install …
download and install the dependencies of a given package or packages.

rosdep db
generate the dependency database and print it to the console.

rosdep init
initialize rosdep sources in /etc/ros/rosdep. May require sudo.

rosdep keys …
list the rosdep keys that the packages depend on.

rosdep resolve
resolve to system dependencies

rosdep update
update the local rosdep database based on the rosdep sources.

rosdep what-needs …
print a list of packages that declare a rosdep on (at least
one of)

rosdep where-defined …
print a list of yaml files that declare a rosdep on (at least
one of)

rosdep fix-permissions
Recursively change the permissions of the user’s ros home directory.
May require sudo. Can be useful to fix permissions after calling
“rosdep update” with sudo accidentally.

Options:
-h, --help show this help message and exit
–os=OS_NAME:OS_VERSION
Override OS name and version (colon-separated), e.g.
ubuntu:lucid
-c SOURCES_CACHE_DIR, --sources-cache-dir=SOURCES_CACHE_DIR
Override /home/sks/.ros/rosdep/sources.cache
-v, --verbose verbose display
–version print just the rosdep version, then exit
–all-versions print rosdep version and version of installers, then
exit
–reinstall (re)install all dependencies, even if already
installed
-y, --default-yes Tell the package manager to default to y or fail when
installing
-s, --simulate Simulate install
-r Continue installing despite errors.
-q Quiet. Suppress output except for errors.
-a, --all select all packages
-n Do not consider implicit/recursive dependencies. Only
valid with ‘keys’, ‘check’, and ‘install’ commands.
-i, --ignore-packages-from-source, --ignore-src
Affects the ‘check’, ‘install’, and ‘keys’ verbs. If
specified then rosdep will ignore keys that are found
to be catkin or ament packages anywhere in the
ROS_PACKAGE_PATH, AMENT_PREFIX_PATH or in any of the
directories given by the --from-paths option.
–skip-keys=SKIP_KEYS
Affects the ‘check’ and ‘install’ verbs. The specified
rosdep keys will be ignored, i.e. not resolved and not
installed. The option can be supplied multiple times.
A space separated list of rosdep keys can also be
passed as a string. A more permanent solution to
locally ignore a rosdep key is creating a local rosdep
rule with an empty list of packages (include it in
/etc/ros/rosdep/sources.list.d/ before the defaults).
–filter-for-installers=FILTER_FOR_INSTALLERS
Affects the ‘db’ verb. If supplied, the output of the
‘db’ command is filtered to only list packages whose
installer is in the provided list. The option can be
supplied multiple times. A space separated list of
installers can also be passed as a string. Example:
--filter-for-installers "apt pip"
–from-paths Affects the ‘check’, ‘keys’, and ‘install’ verbs. If
specified the arguments to those verbs will be
considered paths to be searched, acting on all catkin
packages found there in.
–rosdistro=ROS_DISTRO
Explicitly sets the ROS distro to use, overriding the
normal method of detecting the ROS distro using the
ROS_DISTRO environment variable. When used with the
‘update’ verb, only the specified distro will be
updated.
–as-root=INSTALLER_KEY:
Override whether sudo is used for a specific
installer, e.g. ‘–as-root pip:false’ or ‘–as-root
“pip:no homebrew:yes”’. Can be specified multiple
times.
–include-eol-distros
Affects the ‘update’ verb. If specified end-of-life
distros are being fetched too.
-t DEPENDENCY_TYPES, --dependency-types=DEPENDENCY_TYPES
Dependency types to install, can be given multiple
times. Choose from set([‘exec’, ‘doc’, ‘build_export’,
‘buildtool’, ‘test’, ‘build’, ‘buildtool_export’]).
Default: all except doc.

rosdep的安装

在Ubuntu电脑上:

sudo apt-get install python-rosdep
或者在非Ubuntu电脑上:

sudo pip install -U rosdep
安装完之后需要调用一次初始化:

sudo rosdep init
然后更新:(注意不要使用sudo rosdep update,否则后面会导致一些权限问题)

rosdep update

rosdep的使用

rosdep install AMAZING_PACKAGE
用于安装工作空间中所有包的依赖项
在你的ros工作空间中运行命令:

rosdep install --from-paths src -i -y
这样就可以自动将工作空间中所有包的依赖项都安装上。

现在才发现这个命令真的好用

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/816858
推荐阅读
相关标签
  

闽ICP备14008679号