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

Why min-time is necessary? #203

Closed
snozawa opened this issue Dec 26, 2015 · 7 comments
Closed

Why min-time is necessary? #203

snozawa opened this issue Dec 26, 2015 · 7 comments

Comments

@snozawa
Copy link
Contributor

snozawa commented Dec 26, 2015

@furushchev , @garaemon , @aginika
I have several questions for min-time in :angle-vector-duration:
https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/robot-interface.l#L305

  • Why min-time is necessary? In :angle-vector-duration, :max-joint-velocity is used. Isn't it enough?
  • Why min-time is set to 1.0 by default? Sometimes old codes include :angle-vector smaller than 1.0 sec. Constant time 1.0 is too big for small joint difference.
@snozawa
Copy link
Contributor Author

snozawa commented Dec 26, 2015

In addition, what is the best way to use :angle-vector less than 1.0[sec]?

@k-okada
Copy link
Member

k-okada commented Dec 27, 2015

#121 (comment)
said


LGTM because

   - staro -> all the programs are old and it does not have scale option
   - hrp2 -> min-time=1.0 and scale=1 is enough

:anlge-vector is designed for beginner users to change robot posture and
for expert user who use motion planning or carefully prepared motion will
expect to use angle-vector-sequence.

◉ Kei Okada

On Sat, Dec 26, 2015 at 12:47 PM, Shunichi Nozawa notifications@github.com
wrote:

In addition, what is the best way to use :angle-vector less than 1.0[sec]?


Reply to this email directly or view it on GitHub
#203 (comment)
.

@snozawa
Copy link
Contributor Author

snozawa commented Dec 28, 2015

:anlge-vector is designed for beginner users to change robot posture and for expert user who use motion planning or carefully prepared motion will expect to use angle-vector-sequence.

I see.
Default value for min-time is different between :angle-vector and :angle-vector-sequence,
but I understand the reason:
https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/robot-interface.l#L379

expert user who use motion planning or carefully prepared motion will expect to use angle-vector-sequence.

In my case, I tested head look-at control by joystick controller, which worked on old OpenHRP2+rats system.
In the code, :angle-vector is send with time 200[msec] and with the :wait-interpolation-smooth.

@snozawa snozawa closed this as completed Dec 28, 2015
@k-okada
Copy link
Member

k-okada commented Dec 28, 2015

i see, are you using linear interpolator for this example? did it work
smoothly? what is the parameter for :wait-interpolation-smooth? what was
the minimum rate time for this example?

◉ Kei Okada

On Mon, Dec 28, 2015 at 1:54 PM, Shunichi Nozawa notifications@github.com
wrote:

:anlge-vector is designed for beginner users to change robot posture and
for expert user who use motion planning or carefully prepared motion will
expect to use angle-vector-sequence.

I see.
Default value for min-time is different between :angle-vector and
:angle-vector-sequence,
but I understand the reason:

https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/robot-interface.l#L379

expert user who use motion planning or carefully prepared motion will
expect to use angle-vector-sequence.

In my case, I tested head look-at control by joystick controller, which
worked on old OpenHRP2+rats system.
In the code, :angle-vector is send with time 200[msec] and with the
:wait-interpolation-smooth.


Reply to this email directly or view it on GitHub
#203 (comment)
.

@snozawa
Copy link
Contributor Author

snozawa commented Dec 28, 2015

Here is my code:
https://github.com/jsk-ros-pkg/jsk-ros-pkg-unreleased/blob/master/hrp2_controllers/hrp2_cmd_vel/src/hrp2-cmd-vel-common.l#L169-L186 (private repo)
Simplified code is like this:

(do-until-key
      (send *ri* :wait-interpolation-smooth 50 :head-controller)
      (send *ri* :angle-vector (send *robot* :angle-vector) 500 :head-controller 0 :min-time 0.0)
  )

I send :angle-vector 500[msec] and use :wait-interpolation-smooth with 50[msec].
It works on real HRP2 robot by setting min-time as 0 and I did not tune these time parameter so seriously.
I use hoff-arbib interpolation mode of SequencePlayer in hrpsys-base.

@k-okada
Copy link
Member

k-okada commented Dec 29, 2015

what happens if you did not set :min-time 0 ?

◉ Kei Okada

On Mon, Dec 28, 2015 at 6:01 PM, Shunichi Nozawa notifications@github.com
wrote:

Here is my code:

https://github.com/jsk-ros-pkg/jsk-ros-pkg-unreleased/blob/master/hrp2_controllers/hrp2_cmd_vel/src/hrp2-cmd-vel-common.l#L169-L186
(private repo)
Simplified code is like this:

(do-until-key
(send ri :wait-interpolation-smooth 50 :head-controller)
(send ri :angle-vector (send robot :angle-vector) 500 :head-controller 0 :min-time 0.0)
)

I send :angle-vector 500[msec] and use :wait-interpolation-smooth with
50[msec].
It works on real HRP2 robot by setting min-time as 0 and I did not tune
these time parameter so seriously.
I use hoff-arbib interpolation mode of SequencePlayer in hrpsys-base.


Reply to this email directly or view it on GitHub
#203 (comment)
.

@snozawa
Copy link
Contributor Author

snozawa commented Dec 29, 2015

Oh, it worked, but it is unexpected behaviour.

On real HRP2, I tried two commands:

(bench
(send *ri* :angle-vector (send *robot* :angle-vector) 1000 :head-controller)
(send *ri* :wait-interpolation :head-controller))
;; time -> 1.46333[s]

This output is expected.
1.46[s] is more than 1000[msec], so :wait-interpolation successfully wait for finishing :head-controller interpolation.

However,

(bench
(send *ri* :angle-vector (send *robot* :angle-vector) 1000 :head-controller)                                      
(send *ri* :wait-interpolation-smooth 10 :head-controller))
;; time -> 0.015762[s]

In this case, expected output is like ;; time -> 0.990[s] or something.
Returning of :wait-interpolation-smooth seem to be too early.

The euslisp test code (https://github.com/jsk-ros-pkg/jsk_pr2eus/blob/master/pr2eus/test/default-ri-test.l#L35) tests :wait-interpolation-smooth, but it is simulation mode.
Which part checks the behaviours of :wait-interpolation and :wait-interpolation-smooth of non-simulation mode?

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

No branches or pull requests

2 participants