hsnuhayato / rtm-ros-robotics

Automatically exported from code.google.com/p/rtm-ros-robotics
0 stars 0 forks source link

Error loading ForwardKinematics.so #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

fk issues the following error at load time.

----------------------
fk: onInitialize()
ModelLoaderException :  cannot be found.
failed to load model[] in fk
----------------------

Is there something necessary in a configuration file somewhere?

Original issue reported on code.google.com by emijah.s on 20 Aug 2013 at 6:25

GoogleCodeExporter commented 9 years ago

ForwardKinematics seems to fail at this line in onInitialize

 m_actBody = hrp::BodyPtr(new hrp::Body(*m_refBody));

Original comment by emijah.s on 22 Aug 2013 at 4:35

GoogleCodeExporter commented 9 years ago
The model file problem was due to an old configuration file. However, the 
problem persists. I cannot get fk to load properly and the line in #1 seems to 
be the culprit.

Original comment by emijah.s on 23 Aug 2013 at 12:38

GoogleCodeExporter commented 9 years ago
Please check the argument to rtcd or hrpsys-simulator according to 
hrpsys_rtc_config_args in hrpsys_tools/launch/hrpsys.launch.

Did you specify conf file for fk.rtc like '-o 
"example.ForwardKinematics.config_file:$(arg CONF_FILE)"' ?

Original comment by noz...@jsk.imi.i.u-tokyo.ac.jp on 23 Aug 2013 at 12:56

GoogleCodeExporter commented 9 years ago
It is reading Robot.conf and the model file is loaded. However, boost on QNX is 
version 1.42.0 and there seem to be some critical changes in 1.46.1 that is 
used in Ubuntu 12.04 that allow the shared_ptr copy to work.
I have been able to bypass the problem by loading another model into m_actBody, 
but it fails again during onExecution when calcForwardKinematics is called for 
the second model. 

Original comment by emijah.s on 26 Aug 2013 at 5:53

GoogleCodeExporter commented 9 years ago
By changing the initalization method, I seem to have found a fix.
Patch is attached.

Original comment by emijah.s on 27 Aug 2013 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
最初の#1にあるようにモデルファイルの設定がされていない
ので,rtcdRobotMode.confにexample.ForwardKinematics.config_file: 
/tmp/etc/HIRONX/hrprtc/Robot.conf
 の行があるか調べて下さい.

また,linux上で試せるテストプログラムを作りました.
roscd hironx_ros_bridge; cd robot; make test.linux
として画面の指示のように別ターミナルで
 rosrun hironx_ros_bridge hironx.py -ORBInitRef NameService=corbaloc:iiop:localhost:15005/NameService
として確認します.
うまくいけば,qnx上でmake 
installとすればいいはずですがこちらは未確認なのと,
今のものはLD_LIBRARY_PATHに /opt/hiro/lib 
を入れていますが,必要ないとおもって外してありますが��
�もしかしたら必要なのかもしれないので,これが怪しいで�
��.

Original comment by kei.ok...@gmail.com on 28 Aug 2013 at 6:46

GoogleCodeExporter commented 9 years ago
補足:
----------------------
fk: onInitialize()
ModelLoaderException :  cannot be found.
failed to load model[] in fk
----------------------
の部分でmodle[]のカッコの中にモデルファイルのURIが入るは�
��です.

Original comment by kei.ok...@gmail.com on 29 Aug 2013 at 12:06

GoogleCodeExporter commented 9 years ago
もう一点,modelloaderのログをみるとfile not 
foundみたいなエラーが合ったはずです.

Original comment by kei.ok...@gmail.com on 29 Aug 2013 at 12:07

GoogleCodeExporter commented 9 years ago

ありがとうございます。書くのを忘れて申し訳ないのです��
�、file not 
foundのエラーは解決しました。おっしゃったとおりconfファ��
�ルが読み込まれておらず、その原因はrtcdRobotMode.confにfkが��
�み込むconfファイルの情報が入っていなかったからでした。

その後、読み込んでもactual値を使うモデルとreference値を使��
�モデルをコピーしているのですが、そこで落ちるようにな�
��ました。QNXのlibboostが1.42と古いためかもしれないのですが
、パッチのような初期化の仕方をしないと、FKが通らないと
いう現象を確認しています。QNX上のCollisionDetectorもモデルへ
のアクセスで落ちており、解析中です。

Original comment by emijah.s on 30 Aug 2013 at 1:20

GoogleCodeExporter commented 9 years ago
添付のものでも動きますか?極力ifdef QNXは外そうと思いま
す.

Original comment by kei.ok...@gmail.com on 30 Aug 2013 at 1:46

Attachments:

GoogleCodeExporter commented 9 years ago
これから試します。

Original comment by emijah.s on 30 Aug 2013 at 1:50

GoogleCodeExporter commented 9 years ago
試した結果上手く行きました。最初の頃にこれをインプリ��
�ントしていたのですが、どうやらコピーに失敗しているの�
��気づかず、この解を上手くテストできていなかった感じが
します。

Original comment by emijah.s on 30 Aug 2013 at 3:09

GoogleCodeExporter commented 9 years ago
r835 で対応しました.

Original comment by kei.ok...@gmail.com on 1 Sep 2013 at 5:48