realsense-rosのインストールに少し詰まったので備忘録です。
環境
Ubuntu 18.04 LTS
ROS melodic
問題
UbuntuでIntel Realsense D415を使えるようにするまで(ROSあり・なし両方)という記事を参考にrealsense-rosのインストールを進めていたのですが、$ catkin_make clean
を実行したところ、下記のようなエラーが発生しました
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"ddynamic_reconfigure" with any of the following names:
ddynamic_reconfigureConfig.cmake
ddynamic_reconfigure-config.cmake
Add the installation prefix of "ddynamic_reconfigure" to CMAKE_PREFIX_PATH
or set "ddynamic_reconfigure_DIR" to a directory containing one of the
above files. If "ddynamic_reconfigure" provides a separate development
package or SDK, be sure it has been installed.
Call Stack (most recent call first):
realsense-ros/realsense2_camera/CMakeLists.txt:8 (find_package)
対策
公式のissueに対策が載っていました。
$ apt-get update
$ apt-get install ros-melodic-ddynamic-reconfigure
対策後は特に問題も起きず、無事realsense-rosを実行できました。
参考
公式:https://github.com/IntelRealSense/realsense-ros#installation-instructions