Skip to content
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

[fetcheus] override :move-to-wait to set :correction nil #1169

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

knorth55
Copy link
Member

@knorth55 knorth55 commented Nov 8, 2019

waiting upstream jsk-ros-pkg/jsk_pr2eus#418
this PR skip correction step in :move-to, which is not useful for Fetch robot.

Copy link
Member

@708yamaguchi 708yamaguchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この書き方だと、robot-move-base-interfaceでは(send *ri* :move-to-wait :correction t or nil)としてcorrectionをスキップするのに対して、
fetch-interfaceでは(send *ri* :move-to-wait 何もなし or :correction)としてcorrectionをスキップすることになり、少しややこしいかなと思いました。
https://github.com/jsk-ros-pkg/jsk_pr2eus/pull/418/files#diff-15f6920b924513f6027d36b361f85bbdR1377

以下のようなプログラムではダメでしょうか?
robot-move-base-interfaceでは:correctionのデフォルト値がtだけど、fetch-interfaceではデフォルト値がnilになっているはず。

(:move-to-wait (&rest args &key (correction nil))
    (send-super* :move-to-wait args :correction correction))

@knorth55
Copy link
Member Author

knorth55 commented Nov 9, 2019

いや、fetch-interfaceも:correction t :correction nilになるとおもうけど・・・・・・

(send *ri* :move-to-wait) ;; -> (:correction nil)
(send *ri* :move-to-wait :correction t) ;; -> (:correction t)

@knorth55
Copy link
Member Author

knorth55 commented Nov 9, 2019

山口君がいいたいのは、keyとrestの順序が逆なのかな
そうじゃないとkeyとargsで同じkeyを二度渡すことになるから

irteusgl$ (defun hoge (&key (correction nil) &rest args) (print args) (print correction))
hoge
irteusgl$ (hoge :correction t)
nil
t
t
irteusgl$ (defun hoge (&rest args &key (correction nil)) (print args) (print correction))
hoge
irteusgl$ (hoge :correction t)
(:correction t)
t
t
(:move-to-wait (&key (correction nil) &rest args )
    (send-super* :move-to-wait args :correction correction))

どっちでもいいんだけど、:stateを参考に書いたのでこういう書き方にしました

@708yamaguchi
Copy link
Member

あ、すいません。勘違いしてました。
ありがとうございます。

@YutoUchimi YutoUchimi added this to the 1.1.1 milestone Nov 19, 2019
@knorth55 knorth55 changed the title [waiting for upstream] [fetcheus] override :move-to-wait to set :correction nil [fetcheus] override :move-to-wait to set :correction nil Apr 4, 2020
@knorth55
Copy link
Member Author

knorth55 commented Apr 4, 2020

upstream is merged

@k-okada
Copy link
Member

k-okada commented Apr 14, 2020

:move-to のときの対応も必要では?
あ,これでOKです.書き方は以下でいいとは思いました.

  (:move-to-wait (&rest args &key (correction nil) &allow-other-keys)
                 (send-super* :move-to-wait :correction correction args))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants