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

catkin build でchoreonoidビルドしたら通らない問題 #61

Open
HiroIshida opened this issue Jul 9, 2024 · 5 comments
Open

Comments

@HiroIshida
Copy link
Owner

gdbで実行したらこんな感じで, no such file ... typename.c みたいなエラーとおもにセグフォって落ちるので, コンパイルするときにpythonのバージョンをミスっている可能性が高い.
image

@HiroIshida
Copy link
Owner Author

python3.8を強制的に指定したらセグフォらなくなった. (pybind11のバージョンも変えたけど、たぶんこれは関係ない)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 504d56c7..c5f01d7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -336,7 +336,7 @@ if(ENABLE_PYTHON)
     if(PYBIND11_DIR)
       include_directories(${PYBIND11_DIR}/include)
     else()
-      include_directories(${PROJECT_SOURCE_DIR}/thirdparty/pybind11-2.2.4/include)
+      include_directories(${PROJECT_SOURCE_DIR}/thirdparty/pybind11/include)
     endif()
   else()
     if(NOT USE_PYBIND11 AND USE_PYTHON3)
@@ -348,9 +348,11 @@ if(ENABLE_PYTHON)
   unset(PYTHON_LIBRARY CACHE)
   unset(PYTHON_LIBRARY_DEBUG CACHE)
   if(USE_PYTHON3)
-    set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4)
+    set(Python_ADDITIONAL_VERSIONS 3.8)
     find_package(PythonLibs 3 REQUIRED)
   else()
+    # show error
+    message(FATAL_ERROR "Python 2 is no longer supported.")
     find_package(PythonLibs 2 REQUIRED)
   endif()
   include_directories(${PYTHON_INCLUDE_PATH})

@HiroIshida
Copy link
Owner Author

HiroIshida commented Jul 9, 2024

jaxonのデモを実行してみると, jaxonが無限に落下していくので, gui内のログを見ると, cnoid.OpenRTMPluginがないみたい. python3.8向けにはないということ?

Execution of Python script "add_objects.py" has been started.
The execution of Python script "add_objects.py" failed.
ModuleNotFoundError: No module named 'cnoid.OpenRTMPlugin'

確かにない

h-ishida@azarashi:~/catkin_ws/build/choreonoid/lib/choreonoid-1.7/python/cnoid$ tree
.
├── Base.so
├── BodyPlugin.so
├── Body.so
├── __init__.py
├── PoseSeqPlugin.so
├── PythonSimScriptPlugin.so
├── QtCore.so
├── QtGui.so
├── rbimporter.py
└── Util.so

@HiroIshida
Copy link
Owner Author

HiroIshida commented Jul 9, 2024

choreonoid単体でもとのやつでbuildするとokなんだけど, stabilizer_configをビルドするとこうなっちゃうんよね..
strace choreonoid 2> log

h-ishida@azarashi:~/catkin_ws/devel/bin$ grep openat log|grep python -i|grep -v such|grep python 
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpython3.8.so.1.0", O_RDONLY|O_CLOEXEC) = 38
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpython3.9.so.1.0", O_RDONLY|O_CLOEXEC) = 38
openat(AT_FDCWD, "/usr/local/lib/python3.8/site-packages", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 41
openat(AT_FDCWD, "/home/h-ishida/catkin_ws/devel/lib/python3/dist-packages", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 41
openat(AT_FDCWD, "/opt/ros/noetic/lib/python3/dist-packages", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 41

@HiroIshida
Copy link
Owner Author

せぐふぉらなくなったけど

[CollisionChecker-31] process has died [pid 524865, exit code -11, cmd /home/h-ishida/catkin_ws/devel/lib/collision_checker_rtc/CollisionCheckerComp -o corba.master_manager:localhost:2810 -o corba.nameservers:localhost:15005 -o naming.formats:%n.rtc -o exec_cxt.periodic.rate:50 -o example.CollisionChecker.config_file:/home/h-ishida/catkin_ws/src/msl_hand_controller/msl_hand_controller/models/JAXON_RED.conf __name:=CollisionChecker __log:=/home/h-ishida/.ros/log/87daad32-3ddf-11ef-8f4c-1d49e960a83c/CollisionChecker-31.log].
log file: /home/h-ishida/.ros/log/87daad32-3ddf-11ef-8f4c-1d49e960a83c/CollisionChecker-31*.log
Traceback (most recent call last):
  File "/home/h-ishida/catkin_ws/src/rtm-ros-robotics/rtmros_common/openrtm_tools/scripts/rtmlaunch.py", line 14, in <module>
    rtmlaunchlib.main()
  File "/home/h-ishida/catkin_ws/src/rtm-ros-robotics/rtmros_common/openrtm_tools/src/openrtm_tools/rtmlaunchlib.py", line 256, in main
    tree.add_name_server(nameserver, [])
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/tree.py", line 131, in add_name_server
    self._parse_name_server(server, filter, dynamic=dynamic)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/tree.py", line 284, in _parse_name_server
    new_ns_node = NameServer(self._orb, address, self._root,
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/nameserver.py", line 54, in __init__
    self._parse_server(address, orb, filter)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/nameserver.py", line 79, in _parse_server
    self._parse_context(root_context, orb, filter)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/directory.py", line 111, in _parse_context
    self._process_binding(binding, orb, filter)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/directory.py", line 189, in _process_binding
    subdir._parse_context(subdir_context, orb,
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/directory.py", line 111, in _parse_context
    self._process_binding(binding, orb, filter)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/directory.py", line 142, in _process_binding
    leaf = Manager(name, self, obj, dynamic=self.dynamic)
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/manager.py", line 55, in __init__
    self._parse()
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/manager.py", line 318, in _parse
    self._parse_children()
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/manager.py", line 323, in _parse_children
    self._parse_component_children()
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/manager.py", line 337, in _parse_component_children
    profile = c.get_component_profile()
  File "/opt/ros/noetic/lib/python3/dist-packages/rtctree/rtmidl/RTC_idl.py", line 1321, in get_component_profile
    return self._obj.invoke("get_component_profile", _0_RTC.RTObject._d_get_component_profile, args)
omniORB.CORBA.COMM_FAILURE: CORBA.COMM_FAILURE(omniORB.COMM_FAILURE_WaitingForReply, CORBA.COMPLETED_MAYBE)

[rtmlaunch_hrpsys-41] process has died [pid 525025, exit code 1, cmd /home/h-ishida/catkin_ws/src/rtm-ros-robotics/rtmros_common/openrtm_tools/scripts/rtmlaunch.py /home/h-ishida/catkin_ws/src/auto_stabilizer_config/auto_stabilizer_config/launch/hrpsys.launch __name:=rtmlaunch_hrpsys __log:=/home/h-ishida/.ros/log/87daad32-3ddf-11ef-8f4c-1d49e960a83c/rtmlaunch_hrpsys-41.log].
log file: /home/h-ishida/.ros/log/87daad32-3ddf-11ef-8f4c-1d49e960a83c/rtmlaunch_hrpsys-41*.log

@HiroIshida
Copy link
Owner Author

ちゃんと,
SOURCE_SCRIPT=":"
してやりなおしたらいけたんだけど, 最後のroslaunchすると急にjaxonが倒れてしまう

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