start-jsk / rtmros_choreonoid

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

choreonoid上でJAXONがシャベルを把持できない #312

Closed takayuki5168 closed 5 years ago

takayuki5168 commented 5 years ago

5/20(月)の研究会でM1室岡が報告したバグを共有させていただきます.

choreonoid上でJAXONにシャベルを持たせたいのですが,シャベルが手からすり抜けてしまいます.

https://github.com/takayuki5168/rtmros_choreonoid/tree/t-murooka-shovel をbuildすると JAXON_RED_DIG.cnoid が生成されるので,

rtmlaunch hrpsys_choreonoid_tutorials jaxon_red_choreonoid.launch TASK:=DIG

で実行できます.

ishiguroJSK commented 5 years ago

ちょっと試した感じ,ショベルのモデルのマスパラがおかしかったので,変えると治ります. 元のショベルモデルのままだと,床に置くだけでも暴れていました.

diff --git a/shovel_models/shovel.body b/shovel_models/shovel.body
index e9db894..577b6fa 100644
--- a/shovel_models/shovel.body
+++ b/shovel_models/shovel.body
@@ -8,12 +8,12 @@ links:
     translation: [0, 0, 0]
     jointType: free
     material: { viscosity: 0.01 }
-    centorOfMass: [0, 0.4, 0]
+    centerOfMass: [0.15, -1.5, 0]
     mass: 2.0
     inertia: [
-      0.0000283075, 0, 0,
-      0, 0.0000283075, 0,
-      0, 0, 0.0000283075 ]
+      0.283075, 0, 0,
+      0, 0.283075, 0,
+      0, 0, 0.283075 ]
     elements:
       Transform:
         translation: [0, 0, 0]

あとJAXON_RED_DIG.cnoid.inに絶対パスが掛かれているので,相対パスかcmakeのconfigure_fileで置換されるようにしておくとよいです

takayuki5168 commented 5 years ago

ありがとうございます!

土掘りの動作までできるか検証を続けてみます.

cc @YoheiKakiuchi