jsk-ros-pkg / jsk_robot

jsk-ros-pkg/jsk_robot
https://github.com/jsk-ros-pkg/jsk_robot
73 stars 97 forks source link

eusでgazebo上のbaxterが動かせない #171

Closed wkentaro closed 9 years ago

wkentaro commented 9 years ago

以下のようなエラーがでて、eusでgazebo上のbaxterを動かすことができません。(eusのシミュレーション環境上では動きます)

irteusgl$ send *ri* :angle-vector (send *baxter* :angle-vector) 3000
[ERROR] [1417047288.701884295, 107.166000000]: attempted to publish to topic /robot/joint_states, which was not previously advertised. call (ros::adver\
tise "/robot/joint_states") first.
[ERROR] [1417047288.702389626, 107.166000000]: attempted to publish to topic /robot/joint_states, which was not previously advertised. call (ros::adver\
tise "/robot/joint_states") first.
[ERROR] [1417047288.703047636, 107.167000000]: attempted to publish to topic /robot/joint_states, which was not previously advertised. call (ros::adver\
tise "/robot/joint_states") first.
[ERROR] [1417047288.703580330, 107.167000000]: attempted to publish to topic /robot/joint_states, which was not previously advertised. call (ros::adver\
tise "/robot/joint_states") first.
[ERROR] [1417047288.704131416, 107.167000000]: attempted to publish to topic /robot/joint_states, which was not previously advertised. call (ros::adver\
tise "/robot/joint_states") first.
...

baxtereus/baxter-interface.lを以下のように変更すると、gazebo上で動くようになりましたが(実機でも)、eusのシミュレーション上で動かなくなりました。

diff --git a/jsk_baxter_robot/baxtereus/baxter-interface.l b/jsk_baxter_robot/baxtereus/baxter-interface.l
index eacc7b5..9fe1523 100644
--- a/jsk_baxter_robot/baxtereus/baxter-interface.l
+++ b/jsk_baxter_robot/baxtereus/baxter-interface.l
@@ -30,7 +30,7 @@

      (dolist (action (list right-gripper-action left-gripper-action))
        (unless (and joint-action-enable (send action :wait-for-server 3))
-        (setq joint-action-enable nil)
+        ; (setq joint-action-enable nil)
         (ros::ros-warn "~A is not respond, baxter-interface is disabled" action)
         (return)))

環境によってjoint-action-enableの値を変えるようにするとよいのでしょうか。

k-okada commented 9 years ago
diff --git a/jsk_baxter_robot/baxtereus/baxter-interface.l b/jsk_baxter_robot/baxtereus/baxter-interface.l
index eacc7b5..9bee4dd 100644
--- a/jsk_baxter_robot/baxtereus/baxter-interface.l
+++ b/jsk_baxter_robot/baxtereus/baxter-interface.l
@@ -26,12 +26,9 @@
                                         control_msgs::GripperCommandAction
                                         ))

-     (setq joint-action-enable t)
-     
      (dolist (action (list right-gripper-action left-gripper-action))
        (unless (and joint-action-enable (send action :wait-for-server 3))
-    (setq joint-action-enable nil)
-    (ros::ros-warn "~A is not respond, baxter-interface is disabled" action)
+  (ros::ros-warn "~A is not respond" action)
         (return)))

      (setq gripper-sequence-id 0)

みたいにしたらどうかな. https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/robot-interface.l#L121 でjoint-action-enableをnilにしているのにまたtに戻しているはダメそう.

k-okada commented 9 years ago

172 にPRを作ってみました.確認してもらえると嬉しいです.

wkentaro commented 9 years ago

ありがとうございます。 gazebo, eus simulatorのどちらでも動きました。

私の環境ではcatkin_makeは通りましたが、travisでErrorになっていますね。

k-okada commented 9 years ago

時間があったら研究室にも来て実機も確認してみてもらえると安心です. あるいは遠隔でつなげてもいいけど.

On Thu, Nov 27, 2014 at 10:52 AM, Kentaro Wada notifications@github.com wrote:

ありがとうございます。 gazebo, eus simulatorのどちらでも動きました。

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/jsk_robot/issues/171#issuecomment-64736378 .

wkentaro commented 9 years ago

実機だとreset-poseを含めて移動させられないです。

2.E1-irteusgl$ init
init
;; (make-irtviewer) executed
(#<baxter-robot #X5112cd0 baxter  0.0 0.0 950.0 / 0.0 0.0 0.0>)
3.E1-irteusgl$ send *baxter* :reset-pose
send *baxter* :reset-pose
#f(0.0 20.0 -25.0 -40.0 60.0 -20.0 80.0 0.0 -20.0 -25.0 40.0 60.0 20.0 80.0 0.0)
4.E1-irteusgl$ send *ri* :angle-vector (send *baxter* :angle-vector)
send *ri* :angle-vector (send *baxter* :angle-vector)
;; #<rotational-joint #X5252d50 torso_t0> :joint-angle(-719.978) violate min-angle(-172.46)                                                            
#f(0.0 20.0 -25.0 -40.0 60.0 -20.0 80.0 0.0 -20.0 -25.0 40.0 60.0 20.0 80.0 0.0)
k-okada commented 9 years ago

昨日からコレが出るんですが,これはワーニングでエラーでないので無視して大丈夫です. baxterのURDFにはなぜかtorso_t0 というリンクが付いているみたいです.

On Thu, Nov 27, 2014 at 1:57 PM, Kentaro Wada notifications@github.com wrote:

reset-poseができないのですが、どうしてでしょうか。

2.E1-irteusgl$ init init ;; (make-irtviewer) executed (#<baxter-robot #X5112cd0 baxter 0.0 0.0 950.0 / 0.0 0.0 0.0>) 3.E1-irteusgl$ send baxter :reset-pose send baxter :reset-pose

f(0.0 20.0 -25.0 -40.0 60.0 -20.0 80.0 0.0 -20.0 -25.0 40.0 60.0 20.0 80.0 0.0)

4.E1-irteusgl$ send ri :angle-vector (send baxter :angle-vector) send ri :angle-vector (send baxter :angle-vector) ;; #<rotational-joint #X5252d50 torso_t0> :joint-angle(-719.978) violate min-angle(-172.46)

f(0.0 20.0 -25.0 -40.0 60.0 -20.0 80.0 0.0 -20.0 -25.0 40.0 60.0 20.0 80.0 0.0)

— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/jsk_robot/issues/171#issuecomment-64746198 .

wkentaro commented 9 years ago

なるほど。ということは実機が動かないのは、baxter-interface.lをさらに変更する必要があるということでしょうか。

YoheiKakiuchi commented 9 years ago
rostopic info /robot/limb/left/follow_joint_trajector/goal

すると、どういう情報が見えますでしょうか?

rostopic echo  /robot/limb/left/follow_joint_trajector/goal

をした状態で、send *ri* :angle-vector すると何が表示されますでしょうか?

aginika commented 9 years ago

最新のbaxter-interface.lで

(baxter-init)
(send *baxter* :reset-pose)
(send *ri* :angle-vector (send *baxter* :angle-vector))

で実機は動いている気がしますが、 まだ動かない感じでしょうか?

wkentaro commented 9 years ago

2日前に実機で試したあとは、まだ試せていないです。 次回のゼミで試してみます。

wkentaro commented 9 years ago

実機でも動きました。ありがとうございます。

aginika commented 9 years ago

please close