start-jsk / rtmros_choreonoid

using chreonoid for simulator with hrpsys and other ros system
9 stars 43 forks source link

Ubuntu16.04でUSE_ROBOTHARDWARE=trueにしてchoreonoidを動かすと極端に遅くなる #296

Closed shintarokkk closed 5 years ago

shintarokkk commented 5 years ago

最近使用しているデスクトップのOSをUbuntu14.04からUbuntu16.04に変え、ほぼhttps://github.com/start-jsk/rtmros_choreonoid/issues/275 の通りに環境構築を行いました(ただし、choreonoidのバージョンはrelease-1.6にし、euslisp等はソースから入れました)。 新しい環境で https://github.com/start-jsk/rtmros_choreonoid/blob/master/hrpsys_choreonoid_tutorials/launch/jaxon_red_choreonoid.launch#L3 のオプションUSE_ROBOTHARDWAREをONにして動かしたところ、極端にchoreonoidの回る速度が落ちました。Ubuntu14.04を使っていた時はこのような症状はなかったように思うのですが、どなたか原因に心当たりのある方がいればお教えいただけないでしょうか。

参考として、今回使ったデスクトップ環境と速度計測結果を貼っておきます。 ・デスクトップ CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz 4コア8スレッド GPU: nvidia GeForce GTX 780 (ドライババージョン: 410.78) OS: VERSION="16.04.5 LTS (Xenial Xerus)"

・jaxon_red_choreonoid.launchをchoreonoid上の時間で40秒回すのにかかった時間(ストップウォッチ計測なので誤差±1秒程度あります) USE_ROBOTHARDWARE=false: 44秒 USE_ROBOTHARDWARE=true: 200秒

ishiguroJSK commented 5 years ago

16.04で「USE_ROBOTHARDWAREをON」じゃなければほぼ1倍速出るんだろうか? 16.04にしてからnvidiaのドライバをまだ入れてなくてnouveau的な奴のまま説とかは? あとUSE_VISION:=false試してみるとなんか違いが出たりとか USE_ROBOTHARDWARE=falseで1倍速出てるって書いてありましたね・・・

YoheiKakiuchi commented 5 years ago

手元に、14.04ある人いるかな? USE_ROBOTHARDWAREのON/OFFで差がどれぐらいあるか知りたい。

ishiguroJSK commented 5 years ago
rtmlaunch hrpsys_choreonoid_tutorials jaxon_red_choreonoid.launch 
 rostopic hz /joint_states -w 200
average rate: 142.143
    min: 0.000s max: 0.043s std dev: 0.01250s window: 200
average rate: 146.972
    min: 0.000s max: 0.040s std dev: 0.01207s window: 200
average rate: 139.551
    min: 0.000s max: 0.042s std dev: 0.01275s window: 200
 rtmlaunch hrpsys_choreonoid_tutorials jaxon_red_choreonoid.launch USE_ROBOTHARDWARE:=TRUE
rostopic hz /joint_states -w 200
average rate: 147.189
    min: 0.000s max: 0.035s std dev: 0.01190s window: 200
average rate: 149.175
    min: 0.000s max: 0.033s std dev: 0.01180s window: 200
average rate: 156.693
    min: 0.000s max: 0.032s std dev: 0.01128s window: 200
YoheiKakiuchi commented 5 years ago

hzはros時間で測る(はずだ)から比較しにくいと思う。 シミュレーション時間/実際時間が必要。 choreonoidのストップボタンを押すと、choreonoid内のコンソールに出る。 または、小松くん方式で見るか。。

ishiguroJSK commented 5 years ago
rtmlaunch hrpsys_choreonoid_tutorials jaxon_red_choreonoid.launch
AISTSimulatorによるシミュレーションを開始しました。
AISTSimulatorによるシミュレーションが15.587秒時点で終了しました。
計算時間: 18.491 [s], 計算時間 / シミュレーション時間 = 1.18631
 rtmlaunch hrpsys_choreonoid_tutorials jaxon_red_choreonoid.launch USE_ROBOTHARDWARE:=true
AISTSimulatorによるシミュレーションを開始しました。
AISTSimulatorによるシミュレーションが15.469秒時点で終了しました。
計算時間: 20.56 [s], 計算時間 / シミュレーション時間 = 1.32911
YoheiKakiuchi commented 5 years ago

nvidiaのドライバで410が入るのはubuntu標準じゃなくないかな?

shintarokkk commented 5 years ago

nvidiaのドライバはapt-add-repositoryを経て入れました。 Ubuntu14.04を標準のnvidiaドライババージョン(384)で使っていた頃にlinuxのカーネルをアップデートしたところログインループに陥り、410に上げたら直った、という経緯があったため、今回はインストール時からバージョン410のドライバを入れました。384にバージョンを落としたほうが良いでしょうか?

shintarokkk commented 5 years ago

http://choreonoid.org/ja/workshop/install.html このページの末尾にある

シーンビューの設定ダイアログ にある「テスト」というボタンを押すと、シーンを360度回転させるアニメーションを行なって、これにかかるフレームレートを表示します。この機能により描画速度が分かりますので、ドライバ更新前と後でこのテストを行なって、描画が速くなっていることを確認できるとよいかと思います。テストは何らかのプロジェクトを読み込んでモデルが表示されている状態で行うとよいでしょう。

という部分をUSE_ROBOTHARDWARE=true/falseで比較してみましたが、trueで30.0551 fps, falseで30.0426 fpsと、ほぼ違いのない結果になりました。choreonoidの描画速度の問題ではないのかもしれません。

YoheiKakiuchi commented 5 years ago

USE_ROBOTHARDWARE=true/false でvisionは変わらないはずなので、あまり関係ないかもしれない。 そうなると何がちがうかわからないけど。。。 openrtmとかdebとソースがあったりしないかな?

shintarokkk commented 5 years ago

openrtmについてはdebとソースが混ざってしまっている可能性があります。 最初に環境構築をする際にはまだ https://github.com/start-jsk/rtmros_choreonoid/issues/275 を見つけていなかったため、 http://openrtm.org/ を参考にして git clone https://github.com/n-ando/xenial_package.git

ubuntu 16.04 (64bit) の場合 $ cd xenial_package/xenial/main/binary-amd64/

C++版のインストール $ sudo dpkg -i openrtました。m-aist_1.1.2-0_amd64.deb $ sudo dpkg -i openrtm-aist-example_1.1.2-0_amd64.deb $ sudo dpkg -i openrtm-aist-dev_1.1.2-0_amd64.deb

Python版のインストール $ sudo dpkg -i openrtm-aist-python_1.1.2-1_amd64.deb $ sudo dpkg -i openrtm-aist-python-example_1.1.2-1_amd64.deb

を実行してしまいました。この方法でインストールしたopenrtmの消し方が分からず、そのままソース(tork-aが公開しているgithubのレポジトリ)を入れてビルドを行いました。 もしかするとこれが問題を起こしているのでしょうか...

YoheiKakiuchi commented 5 years ago

それが原因かわからないけど、通常だと、ros-kinetic-openrtm-aistをdebで入れるか、

275の方法で、sourceで入れるかのどちらか(これも混ぜてはいけない)しか試されていないと思う。

shintarokkk commented 5 years ago

一度ソースをcatkinのワークスペースごと全て消し、

sudo apt-get purge ros-kinetic-hrpsys* ros-kinetic-openrtm* openrtm*

を実行し、choreonoidもソースとビルド先を全て消してからopenrtmはaptで入るものを入れなおしました。 shintarokkk@shintarokkk-desktop:~$ dpkg -l | grep openrtm ii ros-kinetic-openrtm-aist 1.1.0-2xenial-20180809-140258-0800 amd64 This package represents OpenRTM-aist that's built within ROS eco system. ii ros-kinetic-openrtm-aist-python 1.1.0-1xenial-20160613-105740-0700 amd64 Python binding of OpenRTM-AIST (see openrtm_aist for further information). ii ros-kinetic-openrtm-tools 1.4.2-0xenial-20180824-103043-0800 amd64 The openrtm_tools package

その上でhrpsys, rtmros_choreonoid, rtmros_commonはソースから入れてビルドし、choreonoidもrelease-1.6で再インストールしてみましたが、依然としてUSE_ROBOTHARDWARE:=trueで実行すると速度は遅いままです。 一度choreonoidをソースの最新にしてCMakeLists.txtの中のopenrtm_aistのバージョン制限を書き換えて(1.1.2以上→1.1.0以上)無理矢理ビルドを通すことも試してみましたが、choeronoid上の経過時間がUSE_ROBOTHARDWAREの有無で大きく違うという問題は解決しませんでした。

それと参考になるかわからないですが、USE_ROBOTHARDWARE=true/falseでrtprintを試した時の出力は以下のようになっていました。

rtprint -n 10 -r 1 localhost:15005/st.rtc:qを実行した時の出力 ・USE_ROBOTHARDWARE:=false shintarokkk@shintarokkk-desktop:/tmp$ rtprint -n 10 -r 1 localhost:15005/st.rtc:q comp_args: rtprint_reader0?exec_cxt.periodic.type=PeriodicExecutionContext&exec_cxt.periodic.rate=1.0 [16.052000000] [-7.97877603108506e-06, 0.00038183948673056777, -0.2683164039541684, 0.6856819166014866, -0.42127657456694706, -0.00023050803176929074, -1.5781036212931525e-05, 0.00027218849788272233, -0.2682074068844089, 0.6860251243671526, -0.42151661042807165, 0.0007798364240160989, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06899658648557412, 0.6989684929543798, -0.4716083720570899, 0.11510375713518275, -1.3461303845189425, -0.22163677801839607, -0.20711339232544623, -0.4062599699622106, -0.06899217126117517, 0.6984513992822226, 0.4715740685995628, -0.11547629536160363, -1.3451399107806044, 0.22179641887665158, 0.20710822468891785, -0.4068282442679767, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [16.920000000] [-6.262981716261198e-06, 0.0003884565672182546, -0.2670236846747099, 0.6852452956585563, -0.42471334704368296, -0.00041926732620444624, -1.3683490364372178e-05, 0.00024024279831915592, -0.2668496485355878, 0.6854667640340886, -0.42490768011108243, 0.0009205081657648608, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06904473075141276, 0.6982947502397596, -0.47159692185865, 0.11530239117345255, -1.345556128630091, -0.2216779605430007, -0.20700467870352496, -0.4061699391338838, -0.06904238103147899, 0.6980093684441845, 0.4715777005524547, -0.11549878082761358, -1.3450035832912401, 0.2217637173127461, 0.20699118726050156, -0.4064864049380487, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [17.786000000] [-5.228361961879644e-06, 0.00041583716710197566, -0.26482942133137044, 0.6844572212564677, -0.42766143101659815, -0.0005769641544183863, -1.1198718763992957e-05, 0.00025842055916976646, -0.26459883751894375, 0.6845513212898792, -0.42774295191860656, 0.0008411016171218305, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.0690896642984215, 0.6977994915879694, -0.471594596419276, 0.11538009329799222, -1.345238653298572, -0.22167852171517408, -0.20688382109992076, -0.4059764472185657, -0.06908783765814198, 0.697640699162121, 0.47158300542987097, -0.11549377734952306, -1.3449347431140015, 0.22172533977114395, 0.20688188371397218, -0.40614929719675846, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [18.640000000] [-4.407713834480245e-06, 0.0004602997949570506, -0.2622730110351796, 0.6835063819857179, -0.4301301880145671, -0.0007769747752558863, -9.66375772423718e-06, 0.0002875802484270521, -0.26201424226763775, 0.6835117380858035, -0.4300619180733115, 0.0007648937744712883, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06912814772819374, 0.6974345488458674, -0.47159634311383425, 0.11539822352799312, -1.3450638392341392, -0.22166231490887794, -0.20677121313990485, -0.4057623621058803, -0.06912603020222452, 0.6973451967794884, 0.4715883429087646, -0.11547777561236666, -1.344903278498583, 0.22168886916086739, 0.20678883285882518, -0.40585186279881585, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [19.512000000] [-3.8917707497090185e-06, 0.0004893005613493192, -0.259662788043759, 0.6825383556965187, -0.432050819059627, -0.0007512193302819277, -8.233804141598181e-06, 0.0003211631002350873, -0.25934631510707673, 0.6824208510533759, -0.4318914481100373, 0.0007510602769797406, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06916031117709147, 0.697158115789929, -0.47159962877074607, 0.11538951384030999, -1.3449645073985355, -0.2216408257157043, -0.2066723406200391, -0.40556034049032685, -0.0691575323486934, 0.6971075832070585, 0.4715930800190006, -0.11545938454038669, -1.3448903088322193, 0.22165676794302985, 0.2067120453461398, -0.4055989402945294, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [20.366000000] [-4.7053059485094146e-06, 0.0005582839034819121, -0.2572807207258042, 0.6816363502368773, -0.4334524973676489, -0.0010999460256527047, -7.432349435551026e-06, 0.00035872402968241857, -0.256923556081149, 0.6814371508293783, -0.4332502003739026, 0.0006697838109790682, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06918483419038671, 0.6969601988920812, -0.47160296390596274, 0.11537156944602195, -1.3449099565903608, -0.2216208376182701, -0.20659439099676044, -0.4053958808455985, -0.0691813631487125, 0.6969307273156157, 0.47159683360469895, -0.11544319975998919, -1.3448874171933634, 0.22163155738298404, 0.20665443672764375, -0.40540335106034675, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [21.230000000] [-4.9910506462139955e-06, 0.0005864075172939994, -0.2551756047897314, 0.6808340012654543, -0.4344686642899309, -0.0011705221286586423, -6.621615468392661e-06, 0.00037330316782437225, -0.25478329928234333, 0.6805656582366233, -0.4342360308245381, 0.000713713206529639, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06920300466059738, 0.6968182566206967, -0.4716056522502821, 0.11535481396172066, -1.3448808040759943, -0.2216042822882611, -0.2065375768470036, -0.4052667573738578, -0.06919916869900906, 0.6967995813330367, 0.4715997646699563, -0.11542879045994195, -1.3448855768730665, 0.22161263348351862, 0.20660951835751, -0.40525802851794734, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [22.094000000] [-5.110231106497399e-06, 0.0006144092730083023, -0.25343053964588425, 0.6801567644229931, -0.43513929464147233, -0.001213604725326646, -6.200128092730117e-06, 0.0003948543766331072, -0.25302106492315196, 0.6798553731590294, -0.4348902655076383, 0.0007243337815135987, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06921557485316653, 0.6967221140972425, -0.47160768064824243, 0.11534036257157484, -1.3448633712233173, -0.22159234110398834, -0.20649679373704866, -0.4051766002019041, -0.06921131498891672, 0.696709931543368, 0.4716017152168435, -0.11541946850176676, -1.34488682436053, 0.2215995338781069, 0.20658028563929684, -0.4051564514231017, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [22.954000000] [-6.88672210048436e-06, 0.0006608372445676328, -0.25205633521318505, 0.6795972333227143, -0.435495263597838, -0.0014741935171577447, -8.947283369517397e-06, 0.0004767212174656427, -0.2516787356337911, 0.6793386670075269, -0.43520343545508267, 0.0001608989726194439, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06922342715108258, 0.6966620629972797, -0.4716089925206805, 0.11532908793339458, -1.344850636939065, -0.22158490995836283, -0.2064686837731789, -0.4051223237732731, -0.0692186377678772, 0.6966549431349044, 0.4716027902868153, -0.11541576597307127, -1.344890438259885, 0.22159159006274118, 0.20656552641521883, -0.40509179960134045, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] [23.796000000] [-7.409738858746858e-06, 0.0006547372536533885, -0.2510914834329762, 0.6792526245881245, -0.43564469198455097, -0.0015201045415431352, -7.584807211519383e-06, 0.00043151059520811085, -0.25065782121755575, 0.678895825308231, -0.43535865405072777, 0.0004434723919394056, 2.710505431213761e-20, -8.673617379884035e-19, 0.0, 0.0, -2.168404344971009e-19, 0.06922713013249168, 0.6966315370905559, -0.47160936960391336, 0.11532788257883096, -1.3448484375085992, -0.22158144266473312, -0.20646067522621278, -0.40509137137861007, -0.06922260701622225, 0.6966243679083026, 0.4716034128048961, -0.11541041316186403, -1.3448861288946987, 0.22158773245232022, 0.20655229500020617, -0.40506264971799405, 5.421010862427522e-20, 2.168404344971009e-19, 0.0, 2.168404344971009e-19] ^Crtprint: CORBA.BAD_INV_ORDER(omniORB.BAD_INV_ORDER_WouldDeadLock, CORBA.COMPLETED_NO) Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/OpenRTM_aist/CorbaNaming.py", line 616, in unbind self._rootContext.unbind(name_) File "/usr/lib/python2.7/dist-packages/CosNaming_idl.py", line 234, in unbind return _omnipy.invoke(self, "unbind", _0_CosNaming.NamingContext._d_unbind, args) NotFound: CosNaming.NamingContext.NotFound(why=missing_node, rest_of_name=[CosNaming.NameComponent(id='rtprint_reader00', kind='rtc')]) ・USE_ROBOTHARDWARE:=true shintarokkk@shintarokkk-desktop:/tmp$ rtprint -n 10 -r 1 localhost:15005/st.rtc:q comp_args: rtprint_reader0?exec_cxt.periodic.type=PeriodicExecutionContext&exec_cxt.periodic.rate=1.0 [12.121000000] [-5.292459453434262e-06, 6.000252673716133e-06, -0.26893710219556394, 0.6856754174569061, -0.41973258687520165, -0.0002690005202796397, -5.022116603631398e-05, -7.355548270317739e-05, -0.2684194890044904, 0.6863424051201289, -0.4214629093533995, 0.0005172433558546013, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.0689910060290373, 0.6992037463891366, -0.4716173682872063, 0.11502358170718031, -1.3465742559700753, -0.22158130098743703, -0.20720547759011654, -0.4060292720055469, -0.06899572766632246, 0.6985292821529894, 0.47158355362169496, -0.11531716216064224, -1.34517892169077, 0.22177190262776905, 0.20697614668011313, -0.406838265541637, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [12.319000000] [-5.6546813887269144e-06, -2.752804495830778e-05, -0.2688822587024559, 0.6857392211785532, -0.4205417786582116, -0.0002265929082001298, -4.992376627243407e-05, -9.612092345435036e-05, -0.26825153314270905, 0.6862003967856074, -0.42223564150128595, 0.0004684063364102933, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06900098885255199, 0.6990072567531915, -0.4716115025254416, 0.11510643268574151, -1.3463585692261673, -0.2216058696881136, -0.20718621940083665, -0.40606107720516477, -0.06900618340848656, 0.6984187710688933, 0.47158302778666983, -0.11533951431937023, -1.3451267705435512, 0.22176967740612935, 0.2069591680165316, -0.40677610807691866, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [12.519000000] [-5.547468885539891e-06, -4.0584808311052995e-05, -0.26869857048344264, 0.6857055396574464, -0.42135835788682335, -0.0003208043666304014, -4.969260047257422e-05, -0.00011498380847269636, -0.268031322107618, 0.6860857795331082, -0.4229867617316662, 0.0004244251369712216, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06901127552436107, 0.6988270096593935, -0.47160689643157744, 0.11517483346488573, -1.3461713399483004, -0.2216252997713681, -0.2071636729138478, -0.40607672220211205, -0.06901671533052559, 0.6983136757974532, 0.47158289131383047, -0.11535762845947292, -1.3450841669922615, 0.22176588682123743, 0.2069416885011004, -0.4067086629804424, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [12.717000000] [-6.126286815515374e-06, -6.777317051452653e-05, -0.26849669421418076, 0.6857117318276124, -0.42206379876057815, -0.0002517891263409522, -4.941654965616617e-05, -0.00012608605112243056, -0.26771304277045455, 0.6858853898806908, -0.4236722380449623, 0.00036290695974288924, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06902132465447954, 0.6986627998800085, -0.4716031743459553, 0.11523112213756904, -1.3460065994943595, -0.22164090941215248, -0.20713855721335875, -0.4060835130398162, -0.06902671727662042, 0.6982150963567417, 0.47158280029364463, -0.11537417425371363, -1.3450481445142406, 0.22176157569028726, 0.20692600653858675, -0.406641215119933, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [12.905000000] [-6.5151395762026764e-06, -8.078157065199853e-05, -0.26822350764405517, 0.6856554810372741, -0.42272585643826355, -0.00025792499543929694, -4.90781462993811e-05, -0.0001321524344675953, -0.26737638354869947, 0.6857121279358898, -0.4243060520016613, 0.00030486699003091087, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06903085898626261, 0.6985185232435436, -0.4716003306916044, 0.11527551518663372, -1.3458694216524916, -0.22165242315845107, -0.20711344613529575, -0.4060801694823158, -0.06903618022826852, 0.6981250392446551, 0.47158291958359166, -0.11538744562446991, -1.345018744190435, 0.2217568116235077, 0.206910746296585, -0.40657553126241236, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [13.099000000] [-7.036779098720087e-06, -8.933017692476447e-05, -0.26789846990752664, 0.6855855313574876, -0.42338062458413467, -0.0002661688203114074, -4.862696034683071e-05, -0.00013329297617748167, -0.26697724521821165, 0.6855080430344489, -0.4249361736723404, 0.000241852805228877, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06904078507570104, 0.6983809237871191, -0.471598231996608, 0.11531179096170005, -1.3457454447616701, -0.2216612728679784, -0.20708514040342257, -0.4060681612382026, -0.0690457304796051, 0.6980366204262901, 0.4715831683521143, -0.1153993920943269, -1.3449943407856588, 0.22175120958158034, 0.20689589289222476, -0.4065060087490355, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [13.293000000] [-7.537273127007366e-06, -9.067656863665923e-05, -0.26754197907326394, 0.6855120702354757, -0.42399840722381704, -0.00029900627943943783, -4.804795345643695e-05, -0.00012577869390814086, -0.26653390353192397, 0.6852775628573146, -0.4255263801400097, 0.0001403670651386083, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06905036934296736, 0.6982532322276299, -0.47159653383072697, 0.11534142380368144, -1.3456336615726852, -0.2216681358713937, -0.20705564763280163, -0.40605278183217697, -0.06905482106821573, 0.6979526311699678, 0.47158337411567547, -0.11541081692266493, -1.344973468873123, 0.22174547213023696, 0.20688254680722726, -0.40643759731763773, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [13.483000000] [-7.781676976946273e-06, -7.967258571123943e-05, -0.2671308130196862, 0.6853799619266279, -0.4245891390207569, -0.00040793792022533087, -4.7654682003220637e-05, -0.00012168921255322721, -0.2660888744373261, 0.6850833065996571, -0.4261003209050224, 9.207704148839613e-05, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06905965730654287, 0.6981375985267431, -0.47159532994717823, 0.11536446771705199, -1.3455398579189173, -0.22167237164764636, -0.20702715775147273, -0.4060298201594277, -0.06906375081569681, 0.6978735778647341, 0.47158388214860564, -0.11541925338337107, -1.3449560714382576, 0.22173947321471882, 0.20686815967487082, -0.40637032056534206, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [13.679000000] [-7.916178188594392e-06, -6.095894924987015e-05, -0.26666494070299945, 0.6852195033717826, -0.42520917509840184, -0.0005549535343361634, -4.737374274421508e-05, -0.00011469403044324119, -0.26560379037870796, 0.6848802992335538, -0.4266820899735814, 4.3659573220280104e-05, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06906905743673478, 0.6980263698784801, -0.4715945101434232, 0.11538292755592182, -1.345453781669857, -0.22167513709682365, -0.2069971036458513, -0.4060025003983807, -0.0690726550886908, 0.6977955273062031, 0.47158439482289266, -0.11542708625400674, -1.3449411225328922, 0.22173304661922105, 0.20685407095827393, -0.40630145325225137, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] [13.875000000] [-8.025956720647954e-06, -4.049672614313019e-05, -0.26616807524475267, 0.6850425424623895, -0.42582749262470826, -0.0006893817379651822, -4.719409507833568e-05, -0.00010401553815997924, -0.2650977401389757, 0.6846729503905282, -0.4272433069357892, -9.86680999169483e-06, -5.421010862427522e-20, 8.673617379884035e-19, 1.3552527156068805e-20, 6.776263578034403e-21, -2.168404344971009e-19, 0.06907822012218935, 0.6979229071400497, -0.47159403132899447, 0.11539671670298407, -1.3453776653194003, -0.22167645377463363, -0.2069667872918553, -0.4059721351025465, -0.06908126011751464, 0.6977209634837658, 0.47158493291067716, -0.11543406089091159, -1.344928711822175, 0.2217265156476265, 0.20684061666789322, -0.40623360686573534, 0.0, 1.0842021724855044e-19, 0.0, 2.168404344971009e-19] ^Crtprint: CORBA.BAD_INV_ORDER(omniORB.BAD_INV_ORDER_WouldDeadLock, CORBA.COMPLETED_NO) Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/OpenRTM_aist/CorbaNaming.py", line 616, in unbind self._rootContext.unbind(name_) File "/usr/lib/python2.7/dist-packages/CosNaming_idl.py", line 234, in unbind return _omnipy.invoke(self, "unbind", _0_CosNaming.NamingContext._d_unbind, args) NotFound: CosNaming.NamingContext.NotFound(why=missing_node, rest_of_name=[CosNaming.NameComponent(id='rtprint_reader00', kind='rtc')])
ishiguroJSK commented 5 years ago

こちらの16.04環境でも再現してしまったので,ガチのやつかもしれない・・・

AISTSimulatorによるシミュレーションを開始しました。
AISTSimulatorによるシミュレーションが30.397秒時点で終了しました。
計算時間: 43.736 [s], 計算時間 / シミュレーション時間 = 1.43883

AISTSimulatorによるシミュレーションを開始しました。
AISTSimulatorによるシミュレーションが30.111秒時点で終了しました。
計算時間: 172.933 [s], 計算時間 / シミュレーション時間 = 5.74318
shintarokkk commented 5 years ago

@ioryさんに教えてもらった方法ですが、hrpsys_choreonoidのコンパイル時にreleaseビルドを行うとUSE_ROBOTHARDWARE:=trueとしてもほぼ実時間でchoreonoidが動くようになりました。 手順は、既に通常通りにビルドされている環境を想定して、

$ roscd hrpsys_chorenoid
$ git clean -xfd
$ catkin bt --cmake-args -DCMAKE_BUILD_TYPE=Release

です。 なぜUbuntu14.04では大丈夫でUbuntu16.04だとこの問題が起きたかという根本的な原因は不明ですが、この手順でうまくいくということは https://github.com/start-jsk/rtmros_choreonoid/blob/master/hrpsys_choreonoid/iob/RobotHardware_choreonoid.cpp などが問題なのかもしれません。

k-okada commented 5 years ago

https://github.com/tu-darmstadt-ros-pkg/hector_slam/pull/32

と同じ問題だと思います CMakeList.txtを直してプルリクを出しておきましょう

プルリク出すまでがトラブルシュートです

2018年12月11日(火) 17:17 Shintaro Komatsu notifications@github.com:

@iory https://github.com/iory さんに教えてもらった方法ですが、hrpsysとhrpsys_choreonoidのコンパイル時にreleaseビルドを行うとUSE_ROBOTHARDWARE:=trueとしてもほぼ実時間でchoreonoidが動くようになりました。 手順は、既に通常通りにビルドされている環境を想定して、

$ roscd hrpsys_chorenoid $ git clean -xfd $ catkin bt --cmake-args -DCMAKE_BUILD_TYPE=Release

です。 なぜUbuntu14.04では大丈夫でUbuntu16.04だとこの問題が起きたかという根本的な原因は不明ですが、この手順でうまくいくということは https://github.com/start-jsk/rtmros_choreonoid/blob/master/hrpsys_choreonoid/iob/RobotHardware_choreonoid.cpp などが問題なのかもしれません。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/start-jsk/rtmros_choreonoid/issues/296#issuecomment-446111027, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeG3M1gysFTuqxuDuqM5j-w9C59jE0Xks5u32n8gaJpZM4ZK9bS .

--

◉ Kei Okada

YoheiKakiuchi commented 5 years ago
VERBOSE=1 catkin build --this -iv -j 1 -p 1

とすると、実際に実行されているコマンドが見れるんだけど、debugの時とreleaseの時で gccとリンクのコマンドがどう違うか見てもらえるかな?

shintarokkk commented 5 years ago

releaseとdebugでそれぞれcatkin clean hrpsys_choreonodとgit clean -xfdをしてから VERBOSE=1 catkin build --this -iv -j 1 -p 1 --start-with-this &> hoge.txt のようにして出力したログを以下のリンクに置いておきました。 ・debugのとき(これまで通りの設定) https://github.com/shintarokkk/misc/blob/master/181211_buildlog/btlog_all_debug.txt ・releaseのとき(iobのCMakeLists.txtを今回のプルリクエストの内容に変更) https://github.com/shintarokkk/misc/blob/master/181211_buildlog/btlog_all_release.txt ※独断で--start-with-thisをつけましたが、ない方が良ければお教えください ※出力したものを見てみるとだいぶ読みづらいのですが、もっと良い保存方法があれば教えていただけないでしょうか

YoheiKakiuchi commented 5 years ago

Releaseのときは、 -O3 -DNDEBUG になってる。 なにもないときは、なにもついていない -gもついていないからdebugですらないような気がする。

default

/usr/bin/c++   -DHRPSYS_PACKAGE_VERSION="\"\\\"..\\\"\"" -DROBOT_IOB_VERSION=4 -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"hrpsys_choreonoid\" -DhrpIo_choreonoid_EXPORTS -I/opt/ros/kinetic/include -I/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -I/usr/local/choreonoid/include/choreonoid-1.6 -I/usr/include/qt4 -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/eigen3 -I/home/shintarokkk/catkin_ws/test_ws/devel/include -I/home/shintarokkk/catkin_ws/test_ws/devel/include/OpenHRP-3.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/coil-1.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/openrtm-1.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/openrtm-1.1/rtm/idl -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys/idl -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys/io -I/home/shintarokkk/catkin_ws/test_ws/devel/share/hrpsys/src/rtc/RobotHardware  -std=c++11 -fPIC   -o CMakeFiles/hrpIo_choreonoid.dir/iob.cpp.o -c /home/shintarokkk/catkin_ws/test_ws/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_choreonoid/iob/iob.cp

Release

/usr/bin/c++   -DHRPSYS_PACKAGE_VERSION="\"\\\"..\\\"\"" -DROBOT_IOB_VERSION=4 -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"hrpsys_choreonoid\" -DhrpIo_choreonoid_EXPORTS -I/opt/ros/kinetic/include -I/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -I/usr/local/choreonoid/include/choreonoid-1.6 -I/usr/include/qt4 -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/eigen3 -I/home/shintarokkk/catkin_ws/test_ws/devel/include -I/home/shintarokkk/catkin_ws/test_ws/devel/include/OpenHRP-3.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/coil-1.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/openrtm-1.1 -I/home/shintarokkk/catkin_ws/test_ws/devel/include/openrtm-1.1/rtm/idl -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys/idl -I/home/shintarokkk/catkin_ws/test_ws/devel/include/hrpsys/io -I/home/shintarokkk/catkin_ws/test_ws/devel/share/hrpsys/src/rtc/RobotHardware  -std=c++11 -O3 -DNDEBUG -fPIC   -o CMakeFiles/hrpIo_choreonoid.dir/iob.cpp.o -c /home/shintarokkk/catkin_ws/test_ws/src/rtm-ros-robotics/rtmros_choreonoid/hrpsys_choreonoid/iob/iob.cpp
shintarokkk commented 5 years ago

皆様、いろいろと教えていただきありがとうございました。https://github.com/start-jsk/rtmros_choreonoid/pull/297 で修正がマージされたためクローズします。