前提・実現したいこと
実装環境:Ubuntu18.04,ROS melodic
ORB-SLAM2のROSノードをコンパイルしたいです。
エラーメッセージが発生しました。
お力添え、よろしくお願いいたします。
発生している問題・エラーメッセージ
コンパイルをしようとしたら以下のように文章が出てコンパイルが出来ませんでした。
$ ./build_ros.sh
端末による出力結果
Building ROS nodes mkdir: ディレクトリ `build' を作成できません: ファイルが存在します CMake Deprecation Warning at /opt/ros/melodic/share/ros/core/rosbuild/rosbuild.cmake:7 (cmake_policy): The OLD behavior for policy CMP0011 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:2 (include) CMake Deprecation Warning at /opt/ros/melodic/share/ros/core/rosbuild/rosbuild.cmake:16 (cmake_policy): The OLD behavior for policy CMP0002 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:2 (include) CMake Deprecation Warning at /opt/ros/melodic/share/ros/core/rosbuild/rosbuild.cmake:18 (cmake_policy): The OLD behavior for policy CMP0003 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:2 (include) CMake Deprecation Warning at /opt/ros/melodic/share/ros/core/rosbuild/rosbuild.cmake:20 (cmake_policy): The OLD behavior for policy CMP0005 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:2 (include) CMake Deprecation Warning at /opt/ros/melodic/share/ros/core/rosbuild/rosbuild.cmake:23 (cmake_policy): The OLD behavior for policy CMP0011 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:2 (include) [rosbuild] Building package ORB_SLAM2 [rosbuild] Error from syntax check of ORB_SLAM2/manifest.xml Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/__init__.py", line 50, in <module> from roslib.launcher import load_manifest File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 42, in <module> import rospkg File "/usr/lib/python2.7/dist-packages/rospkg/__init__.py", line 42, in <module> from .rospack import expand_to_packages, get_package_name, \ File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 34, in <module> from threading import Lock File "/home/yasu/anaconda3/lib/python3.7/threading.py", line 8, in <module> from traceback import format_exc as _format_exc File "/home/yasu/anaconda3/lib/python3.7/traceback.py", line 5, in <module> import linecache File "/home/yasu/anaconda3/lib/python3.7/linecache.py", line 11, in <module> import tokenize File "/home/yasu/anaconda3/lib/python3.7/tokenize.py", line 33, in <module> import re File "/home/yasu/anaconda3/lib/python3.7/re.py", line 143, in <module> class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag' CMake Error at /opt/ros/melodic/share/ros/core/rosbuild/private.cmake:78 (message): [rosbuild] Syntax check of ORB_SLAM2/manifest.xml failed; aborting Call Stack (most recent call first): /opt/ros/melodic/share/ros/core/rosbuild/public.cmake:174 (_rosbuild_check_manifest) CMakeLists.txt:4 (rosbuild_init) -- Configuring incomplete, errors occurred! See also "/home/yasu/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build/CMakeFiles/CMakeOutput.log". make: *** ターゲットが指定されておらず, makefile も見つかりません. 中止.
試したこと
参考としてこの2つを見ながらしていました。
Ubuntu 18.04にORB_SLAM2 + ROSをインストール
ORB_SLAM2をUbuntu18.04で動かしてみた
この2つの手順に沿って行っていたので抜けはないかと思います。
この2つと違う手順として
libpng12-devをインストールする際なくなっていたので、名前が変更されていたlibpng-devを入れています。
また
.bashrcの末には以下のように記述しています。
source /opt/ros/melodic/setup.bash export ROS_MASTER_URI=http://localhost:11311 export ROS_HOSTNAME=localhost source ~/catkin_ws/devel/setup.bash export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/yasu/ORB_SLAM2/Examples/ROS export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/yasu/ros_dev/ORB_SLAM2/Examples/ROS export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/ros_dev/ORB_SLAM2/Examples/ROS export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/yasu/ORB_SLAM2/Examples/ROS export ROS_ROOT=${ROS_ROOT}:/opt/ros/melodic/share/ros
補足情報(FW/ツールのバージョンなど)
実装環境:Ubuntu18.04,ROS melodic
あなたの回答
tips
プレビュー