Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

noetic で ロボットモデルが作成されない時の解決方法 #1892

Open
k-okada opened this issue Nov 30, 2023 · 0 comments
Open

Comments

@k-okada
Copy link
Member

k-okada commented Nov 30, 2023

[spoteus:cmake] -- BUILD_SHARED_LIBS is on
[spoteus:cmake] CMake Error at /opt/ros/noetic/share/collada_urdf/cmake/collada_urdfConfig.cmake:113 (message):
[spoteus:cmake]   Project 'collada_urdf' specifies '/usr/../include/include' as an include
[spoteus:cmake]   dir, which is not found.  It does neither exist as an absolute directory
[spoteus:cmake]   nor in '${{prefix}}//usr/../include/include'.  Check the issue tracker
[spoteus:cmake]   'https://github.com/ros/collada_urdf/issues' and consider creating a ticket
[spoteus:cmake]   if the problem has not been reported yet.
[spoteus:cmake] Call Stack (most recent call first):
[spoteus:cmake]   /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
[spoteus:cmake]   CMakeLists.txt:7 (find_package)
[spoteus:cmake]
[spoteus:cmake]
[spoteus:cmake] -- Configuring incomplete, errors occurred!

みたいなエラーが出てロボットモデルが作成できない,ということが起こると思いますが,これらは回避可能なはずです.

1) そもそもの原因  (collada_urdf にバグが入ったままリリースされている.これをなんとかリリースしてもらうのが正しい解決策)
-> ros/collada_urdf#43

2)とりあえずの解決策
sudo emacs -nw /opt/ros/noetic/share/collada_urdf/cmake/collada_urdfConfig.cmake
として,100行目ぐらいで,

if(NOT "include;/usr/../include/include;/usr/include/collada-dom2.4/1.5;/usr/include/collada-dom2.4;/usr/include " STREQUAL " ")
  set(collada_urdf_INCLUDE_DIRS "")
  #  set(_include_dirs "include;/usr/../include/include;/usr/include/collada-dom2.4/1.5;/usr/include/collada-dom2.4;/usr/include")
    set(_include_dirs "include;/usr/include;/usr/include/collada-dom2.4/1.5;/usr/include/collada-dom2.4;/usr/include")
  if(NOT "https://github.com/ros/collada_urdf/issues " STREQUAL " ")

と編集すると回避可能です.ただし,ros-noetic-collada-urdfを再インストールすると上書きされます.一般的にはおすすめしませんが,とりあえず,という意味では有効です.

2)パッケージ側での変更.
find_package(collada_urdf) としたときにエラーが出るので,これをなくせばよいです.

ケース1: 実は何もしていない
https://github.com/k-okada/jsk_robot/blob/1664a10c1ecb20c7ea9bef4c16e76855c00e0863/jsk_spot_robot/spoteus/CMakeLists.txt#L7-L32
みたいにfind_package しているけど,find_pakcage(collada_urdf) で変数collada_urdf_PREFIX を取ってきて表示しているだけで何もしていない場合があります.その場合はシンプルにコードから外すのがよいです.
b3682c1

ケース2:rosrun を使う
find_package(collada_urdf) をしなくてもpackage.xml<build_depend>collada_urdf があれば,rosrun がききます(多分...)

message(STATUS "Found fetch.urdf at ${fetch_urdf}")
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/fetch.l
COMMAND rosrun euscollada collada2eus fetch.dae fetch.yaml fetch.l
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS fetch.dae fetch.yaml)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/fetch.dae
COMMAND rosrun collada_urdf urdf_to_collada ${fetch_urdf} fetch.dae
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS ${fetch_urdf})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant