jsk-ros-pkg / jsk_pr2eus

PR2 euslisp packages
https://github.com/jsk-ros-pkg/jsk_pr2eus
4 stars 41 forks source link

Updates to :stop-motion #402

Closed Affonso-Gui closed 4 years ago

Affonso-Gui commented 5 years ago

The :stop-motion stops the current angle vector by sending the actual angle vector as a new command (and therefore overwriting the old command).

The problem is that is also does that when there is no ongoing action, and since it also have an :wait-interpolation it takes a few seconds to return from the call.

In this PR we:

  1. Only overwrite commands when there are ongoing actions
  2. Add a wait key argument to the :stop-motion, so the user can opt not to wait-interpolation.

@pazeshun

k-okada commented 5 years ago

Do you need this because I did not merged https://github.com/start-jsk/rtmros_common/pull/765#issuecomment-392741195 ?

Affonso-Gui commented 5 years ago

@k-okada This is not directly related to https://github.com/start-jsk/rtmros_common/pull/765#issuecomment-392741195.

I noticed this problem when adding a call of :stop-motion to the default sigint behaviour, which led me to waiting a couple seconds every time C-c is pressed, even though there was no ongoing motion.

YoheiKakiuchi commented 5 years ago

Why this it also have an :wait-interpolation it takes a few seconds to return from the call. happens.

I saw the code, by this (send self :angle-vector av stop-time), the duration of this command was limited by min-time (= 1.0 second). https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/robot-interface.l#L374

k-okada commented 5 years ago

so why not using :cancel-angle-vector

◉ Kei Okada

2019年10月8日(火) 14:48 Affonso, Guilherme notifications@github.com:

@k-okada https://github.com/k-okada This is not directly related to start-jsk/rtmros_common#765 (comment) https://github.com/start-jsk/rtmros_common/pull/765#issuecomment-392741195 .

I noticed this problem when adding a call of :stop-motion to the default sigint behaviour, which led me to waiting a couple seconds every time C-c is pressed, even though there was no ongoing motion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsk-ros-pkg/jsk_pr2eus/pull/402?email_source=notifications&email_token=AADYNXFZIFX2GLCA452WSYDQNQNJNA5CNFSM4I6CVMH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAS3P3Q#issuecomment-539342830, or mute the thread https://github.com/notifications/unsubscribe-auth/AADYNXCEKASYZ23CV5SK77TQNQNJNANCNFSM4I6CVMHQ .

Affonso-Gui commented 5 years ago

@YoheiKakiuchi Sorry, saying that it takes a few seconds was a bit exaggerated. It seems to take exactly 1 second

$ (bench (send *ri* :stop-motion))
[ INFO] [1570526342.652453956]: wait-interpolation debug: start
[ INFO] [1570526343.678601001]: wait-interpolation debug: end
;; time -> 1.08321[s]
(nil nil nil nil)

@k-okada :cancel-angle-vector leads to an abrupt stop, while :stop-motion makes the robot stops smoothly. I thought that it would be best fitted for a demo to use the :stop-motion in planned interruptions.

k-okada commented 5 years ago

i see, please add that to doc string.

◉ Kei Okada

2019年10月8日(火) 18:25 Affonso, Guilherme notifications@github.com:

@YoheiKakiuchi https://github.com/YoheiKakiuchi Sorry, saying that it takes a few seconds was a bit exaggerated. It seems to take exactly 1 second

$ (bench (send ri :stop-motion)) [ INFO] [1570526342.652453956]: wait-interpolation debug: start [ INFO] [1570526343.678601001]: wait-interpolation debug: end;; time -> 1.08321[s] (nil nil nil nil)

@k-okada https://github.com/k-okada :cancel-angle-vector leads to an abrupt stop, while :stop-motion makes the robot stops smoothly. I thought that it would be best fitted for a demo to use the :stop-motion in planned interruptions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsk-ros-pkg/jsk_pr2eus/pull/402?email_source=notifications&email_token=AADYNXHGB6STLYHGAFD2EHDQNRGY5A5CNFSM4I6CVMH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEATQ4KI#issuecomment-539430441, or mute the thread https://github.com/notifications/unsubscribe-auth/AADYNXHKVOHL5K3JDVPNKGDQNRGY5ANCNFSM4I6CVMHQ .

Affonso-Gui commented 4 years ago

@k-okada Can I ask for a review?