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

[rtmlaunch] Wait for /localhost:15005/HrpsysSeqStateROSBridge0.rtc:rsangle が出続ける(2019/05) #1064

Open
ishiguroJSK opened this issue May 25, 2019 · 1 comment

Comments

@ishiguroJSK
Copy link
Contributor

最近何度か綺麗な環境構築しているとHrpsysSeqStateROSBridgeが起動時に落ちる現象に遭遇し,
いろいろapt消したりソースから入れたり,ガチャをしていると治ってしまっていましたが,なんとなく怪しい場所が絞れたので報告します.

こういう構成でrtmlaunch hrpsys_ros_bridge samplerobot.launchでもHrpsysSeqStateROSBridgeが落ちる

 rtmros_common   git master  (-)    0ac88687c3bb [email protected]:start-jsk/rtmros_common.git
 openhrp3        git master  (-)    53d561a28886 [email protected]:fkanehiro/openhrp3.git
 hrpsys          git master  (-)    5cbb5490f55c [email protected]:fkanehiro/hrpsys-base.git

aptの履歴なるものを見てみると,
↓/var/log/apt/history.log

Start-Date: 2019-05-25  20:14:01
Commandline: /usr/sbin/synaptic
Remove: ros-indigo-hrpsys-tools:amd64 (1.4.2-0trusty-20180517-084236-0800), openrtm-aist-dev:amd64 (1.1.2+20180505+1733+14~ubuntu14.04.1), ros-indigo-hironx-ros-bridge:amd64 (2.1.1-0trusty-20190220-162408-0800), ros-indigo-openrtm-ros-bridge:amd64 (1.4.2-0trusty-20171221-230211-0800), ros-indigo-openhrp3:amd64 (3.1.9-0trusty-20170313-050512-0700), ros-indigo-rtmbuild:amd64 (1.4.2-0trusty-20171221-223705-0800), libcnoid1:amd64 (1.6.0+dfsg+20180503+1250+23~ubuntu14.04.1), ros-indigo-hrpsys:amd64 (315.14.0-0trusty-20180517-055136-0800), libcnoid-dev:amd64 (1.6.0+dfsg+20180503+1250+23~ubuntu14.04.1), ros-indigo-hrpsys-gazebo-general:amd64 (0.1.12-0trusty-20190204-154450-0800), ros-indigo-openrtm-tools:amd64 (1.4.2-0trusty-20171221-223742-0800), ros-indigo-hrpsys-ros-bridge:amd64 (1.4.2-0trusty-20190204-152108-0800), ros-indigo-nextage-ros-bridge:amd64 (0.7.16-4trusty-20190220-165823-0800)
Purge: ros-indigo-openrtm-aist:amd64 (1.1.0-26trusty-20170313-035634-0700), ros-indigo-rtshell:amd64 (3.0.1-2trusty-20160321-180557-0700), ros-indigo-openrtm-aist-python:amd64 (1.1.0-7trusty-20160914-101450-0700), ros-indigo-rtctree:amd64 (3.0.1-0trusty-20160321-180014-0700), openrtm-aist:amd64 (1.1.2+20180505+1733+14~ubuntu14.04.1)
End-Date: 2019-05-25  20:14:17

Start-Date: 2019-05-25  20:16:37
Commandline: /usr/sbin/synaptic
Purge: ros-indigo-hrpsys-gazebo-msgs:amd64 (0.1.12-0trusty-20180516-224556-0800)
End-Date: 2019-05-25  20:16:39

※↑ここまでで色々消した

Start-Date: 2019-05-25  20:17:23
Commandline: apt-get install -y ros-indigo-rtshell
Install: ros-indigo-rtshell:amd64 (3.0.1-2trusty-20160321-180557-0700), ros-indigo-rtctree:amd64 (3.0.1-0trusty-20160321-180014-0700, automatic)
End-Date: 2019-05-25  20:17:27

Start-Date: 2019-05-25  20:17:30
Commandline: apt-get install -y ros-indigo-openrtm-aist
Install: ros-indigo-openrtm-aist:amd64 (1.1.0-26trusty-20170313-035634-0700)
End-Date: 2019-05-25  20:17:35

Start-Date: 2019-05-25  20:17:37
Commandline: apt-get install -y ros-indigo-openrtm-aist-python
Install: ros-indigo-openrtm-aist-python:amd64 (1.1.0-7trusty-20160914-101450-0700)
End-Date: 2019-05-25  20:17:40

※↑rosdep install -y -r --from-paths src --ignore-src した → 動く

Start-Date: 2019-05-25  20:29:33
Commandline: /usr/sbin/synaptic
Install: ros-indigo-hrpsys-tools:amd64 (1.4.2-0trusty-20180517-084236-0800), ros-indigo-openhrp3:amd64 (3.1.9-0trusty-20170313-050512-0700, automatic), ros-indigo-hrpsys:amd64 (315.14.0-0trusty-20180517-055136-0800, automatic), ros-indigo-openrtm-tools:amd64 (1.4.2-0trusty-20171221-223742-0800, automatic)
End-Date: 2019-05-25  20:29:42

※↑ros-indigo-hrpsys-toolsとその依存が入った → 動かない

Start-Date: 2019-05-25  20:33:15
Commandline: /usr/sbin/synaptic
Purge: ros-indigo-hrpsys-tools:amd64 (1.4.2-0trusty-20180517-084236-0800)
End-Date: 2019-05-25  20:33:18

※↑ros-indigo-hrpsys-tools消した → 動かない

Start-Date: 2019-05-25  20:33:57
Commandline: /usr/sbin/synaptic
Purge: ros-indigo-hrpsys:amd64 (315.14.0-0trusty-20180517-055136-0800)
End-Date: 2019-05-25  20:34:00

※↑ros-indigo-hrpsys消した → 動かない

Start-Date: 2019-05-25  20:34:51
Commandline: /usr/sbin/synaptic
Purge: ros-indigo-openhrp3:amd64 (3.1.9-0trusty-20170313-050512-0700)
End-Date: 2019-05-25  20:34:53

※↑ros-indigo-openhrp3消した → 動く

Start-Date: 2019-05-25  20:35:45
Commandline: /usr/sbin/synaptic
Install: ros-indigo-openhrp3:amd64 (3.1.9-0trusty-20170313-050512-0700)
End-Date: 2019-05-25  20:35:49

※↑ros-indigo-openhrp3入れた → 動かない

よく見るとopenhrp3のaptとソースが共存した状態だと,/optと/catkin_wsの混在した怪しめのメッセージが出ている

$ rtmlaunch hrpsys_ros_bridge samplerobot.launch 
(略)
Loading body customizer "/opt/ros/indigo/share/OpenHRP-3.1/customizer/libSampleBushCustomizer.so" for 
Loading body customizer "/opt/ros/indigo/share/OpenHRP-3.1/customizer/libSampleCustomizer.so" for springJoint
cache found for file:///home/ishiguro/catkin_ws/debug/devel/share/openhrp3/share/OpenHRP-3.1/sample/model/sample1.wrl
duplicated sensor Id is specified(id = 2, name = lhsensor)
duplicated sensor Id is specified(id = 3, name = rhsensor)
duplicated sensor Id is specified(id = 0, name = gsensor)
duplicated sensor Id is specified(id = 0, name = gyrometer)
duplicated sensor Id is specified(id = 0, name = VISION_SENSOR1)
duplicated sensor Id is specified(id = 1, name = VISION_SENSOR2)
duplicated sensor Id is specified(id = 0, name = lfsensor)
duplicated sensor Id is specified(id = 1, name = rfsensor)
[ INFO] [1558784165.495651900]: [HrpsysJointTrajectoryBridge] @Initilize name : HrpsysJointTrajectoryBridge0 done
process[ForwardKinematicsServiceROSBridge-15]: started with pid [6641]
process[StateHolderServiceROSBridge-16]: started with pid [6674]
process[CollisionDetectorServiceROSBridge-17]: started with pid [6706]
process[collision_state-18]: started with pid [6742]
process[SoftErrorLimiterServiceROSBridge-19]: started with pid [6771]
process[robot_pose_ekf-20]: started with pid [6784]
process[base_footprint_rootlink-21]: started with pid [6796]
process[samplerobot_rviz-22]: started with pid [6809]
[sensor_ros_bridge_connect.py]  start
[rtm.py] configuration ORB with localhost:15005
[rtm.py] configuration RTCManager with localhost:2810
[sensor_ros_bridge_connect.py]  initSensorRosBridgeConnection
[sensor_ros_bridge_connect.py]  waitForRTCManagerAndRoboHardware has renamed to waitForRTCManagerAndRoboHardware: Please update your code
loading file:///home/ishiguro/catkin_ws/debug/devel/share/OpenHRP-3.1/sample/model/longfloor.wrl
Humanoid node
Joint node WAIST
  Segment node BODY
The model was successfully loaded ! 
Loading body customizer "/home/ishiguro/catkin_ws/debug/devel/share/OpenHRP-3.1/customizer/libSampleBushCustomizer.so" for 
Loading body customizer "/home/ishiguro/catkin_ws/debug/devel/share/OpenHRP-3.1/customizer/libSampleCustomizer.so" for springJoint
loading file:///home/ishiguro/catkin_ws/debug/devel/share/OpenHRP-3.1/idl/../sample/model/sample1.wrl

怪しい

@ishiguroJSK
Copy link
Contributor Author

#1062 のお陰でこれについては解決した気がします.
openhrp3がaptとソース混在するときに,
Rosbridge系のRTCから呼ぶloadBodyFromModelLoader系の関数が明らかに/opt/rosの方を呼んでいてたのですが,
rtmbuild_add_executable(HrpsysSeqStateROSBridge src/HrpsysSeqStateROSBridgeImpl.cpp src/HrpsysSeqStateROSBridge.cpp src/HrpsysSeqStateROSBridgeComp.cpp)
などの部分で呼ばれるrtmbuildの中でパスの順序を変えれば治りました.

diff --git a/rtmbuild/cmake/rtmbuild.cmake b/rtmbuild/cmake/rtmbuild.cmake
index ab1f445..740413d 100644
--- a/rtmbuild/cmake/rtmbuild.cmake
+++ b/rtmbuild/cmake/rtmbuild.cmake
@@ -133,8 +133,8 @@ macro(rtmbuild_init)
     rosbuild_gensrv()
   endif()
 
-  include_directories(${catkin_INCLUDE_DIRS} ${openrtm_aist_INCLUDE_DIRS} ${openhrp3_INCLUDE_DIRS})
-  link_directories(${catkin_LIBRARY_DIRS} ${openrtm_aist_LIBRARY_DIRS} ${openhrp3_LIBRARY_DIRS})
+  include_directories( ${openhrp3_INCLUDE_DIRS} ${openrtm_aist_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
+  link_directories(  ${openhrp3_LIBRARY_DIRS} ${openrtm_aist_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})
 
 endmacro(rtmbuild_init)
 
@@ -289,7 +289,7 @@ macro(rtmbuild_add_executable exe)
     rosbuild_add_executable(${ARGV})
   endif()
   add_dependencies(${exe} RTMBUILD_${PROJECT_NAME}_genbridge ${${_package}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
-  target_link_libraries(${exe} ${catkin_LIBRARIES} ${openrtm_aist_LIBRARIES} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS} )
+  target_link_libraries(${exe} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS} ${openrtm_aist_LIBRARIES} ${catkin_LIBRARIES}  )
 endmacro(rtmbuild_add_executable)
 
 macro(rtmbuild_add_library lib)
@@ -299,6 +299,6 @@ macro(rtmbuild_add_library lib)
   else()
     rosbuild_add_library(${ARGV})
   endif()
-  target_link_libraries(${lib} ${openrtm_aist_LIBRARIES} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS})
+  target_link_libraries(${lib}  ${openhrp3_LIBRARIES} ${openrtm_aist_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS})
 endmacro(rtmbuild_add_library)

ただ16.04だとまだ問題が残っていて,
rtmbuild_add_executable(ImageSensorROSBridge src/ImageSensorROSBridge.cpp src/ImageSensorROSBridgeComp.cpp)
に関してソースのhrpsysのincludeディレクトリが通っていないのか,aptのhrpsysが無いとhrp/idl/Img.hhがありませんとエラーが出る.
確かに直前にinclude_directories(${hrpsys_INCLUDE_DIRS})を入れると治る.
(なぜか14.04ではaptのhrpsysが無くても通っている)

@k-okada お時間あるときに,この治し方でいいのか確認お願いします

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