LoginSignup
4
3

More than 3 years have passed since last update.

rosdep installするパッケージの探し方

Last updated at Posted at 2019-12-30

はじめに

ROSパッケージをインストールして開発を行う時に apt-get で入れてしまうことがありますが、これをするとCIでプロジェクトの依存を解決する方法がありません。そこでrosdepを使用しpackage.xmlで管理をします。

前提条件

環境 バージョン
開発 Ubuntu 16.04.6 LTS
ROS Kinetic Kame

パッケージを探す

例としてecl_exceptionsを使う例をみてみます。

apt-get でインストールする場合には、 apt-cache コマンドでパッケージの検索をおこないます。

$ sudo apt-cache search ros-kinetic | grep ecl | grep exceptions
ros-kinetic-ecl-exceptions - Template based exceptions - these are simple and practical and avoid the proliferation of exception types.

次にrosdepでインストールしようと思います。ecl-exceptionsなのでpackage.xmlに下記のように追記します。

<depend>ecl-exceptions</depend>

インストールを実行します。

$ rosdep install -i -r -y --from-paths src/test_common/ --ignore-src
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
test_common: Cannot locate rosdep definition for [ecl-exceptions]
Continuing to install resolvable dependencies...
#All required rosdeps installed successfully

どうやらapt-getrosdepでインストールするときに設定するパッケージ名が異なるようです。wikiには、詳しい説明がありませんが、こういう時はソースを確認するのが一番確実です。

rosdepの仕組みを調べる

rosdistroのリポジトリを確認すると各環境ごとにディレクトリがあることがわかります。ここでkineticを確認するとパッケージのリポジトリとパッケージ名がわかります。

今回は、ecl_exceptionsという名称で管理されていますので、それをpackage.xmlに設定して再度rosdep installを実行すればインストールできます。

また、共通で使用するものについては、base.yamlで管理されているので、こちらを確認します。

まとめ

  • ROSの開発をするときは、apt-getでパッケージを入れると依存関係をCIが解消できない
  • rosdep でパッケージ名称を調べるときには、リポジトリの設定ファイルを確認すればよい
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3