-
Notifications
You must be signed in to change notification settings - Fork 35
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
Revert #2235 'Grasp using proximity' #2241
Conversation
Because - We cannot use left hand with this change. - Has typo.
(while (and (> (send self :get-proximity l/r :right) | ||
(send self :get-proximity l/r :left)) | ||
(send self :interpolatingp)) | ||
(unix::uleep 1000))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
@708yamaguchi 十分なテストができていなかったようです。テストの際はタスクを通しでできるようになっているかよく確認しましょう。 |
@@ -260,16 +260,13 @@ | |||
(:pick-object-with-movable-region | |||
(arm movable-region &key (n-trial 1) (n-trial-same-pos 1) | |||
(do-stop-grasp nil) (grasp-style :suction)) | |||
(send *ri* :calib-proximity-threshold arm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここで左手がエラーになりますね。
すみません、review不足でした。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
エラーになる理由は教えてくれると嬉しいで@pazeshun @708yamaguchi
#2497 で知りたい
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この時代には左手には近接センサがなかったからだと思います
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うーん、なるほど.それはtravisでは引っ掛けられないなぁ.
となると今出来るのは
euslisp/EusLisp#245
ぐらいかなぁ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(:calib-proximity-threshold
(&optional (arm :arms))
(send self :spin-once)
(dolist (l/r (if (eq arm :arms) (list :rarm :larm) (list arm)))
(let ((hash-table (make-hash-table)))
(sethash :left hash-table (send self :get-proximity l/r :left :raw t))
(sethash :right hash-table (send self :get-proximity l/r :right :raw t))
(sethash :middle hash-table (send self :get-proximity l/r :middle :raw t))
(sethash l/r proximity-init-values- hash-table))
(setq proximity-threshold- 100)))) ;; TODO decide proper threshold 100 -> ???
あれ?近接なくてもエラーにはならない気がするんだけど....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:get-proximity
でエラーが出ていたと思います。
https://github.com/start-jsk/jsk_apc/blob/master/jsk_arc2017_baxter/euslisp/lib/baxter-interface.l#L257-L260
で、左手のtopicが来ていないと全てnil
が入ります。
すると、
https://github.com/start-jsk/jsk_apc/blob/master/jsk_arc2017_baxter/euslisp/lib/baxter-interface.l#L265
で、expected number
のエラーが出ていたと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:calib-proximity-threshold
の中で、
(:get-proximity (arm side &key (raw nil))
(send self :spin-once)
(let ((rl (gethash :left (gethash arm proximity-init-values-)))
(rr (gethash :right (gethash arm proximity-init-values-)))
;;(rm (gethash :middle (gethash arm proximity-init-values-)))
(proximities (gethash arm proximities-)))
(if (null raw)
(cond
;; for sparkfun proximity sensor
((eq side :left)
(/ (- (send (elt proximities 0) :average) rl) (expt (/ rl 2500.0) 1.5)))
((eq side :right)
(/ (- (send (elt proximities 1) :average) rr) (expt (/ rr 2500.0) 1.5))))
(cond
((eq side :left) (send (elt proximities 0) :average))
((eq side :right) (send (elt proximities 1) :average))))))
を呼んでいますが、近接センサがないとlet
の変数のproximities
がnil
になり、
(elt proximities 0)
がエラーになりました。
@708yamaguchi 修正&テストの後、PRを出し直しましょう |
Revert #2235
Because
北川はやる気をなくしました。