-
Notifications
You must be signed in to change notification settings - Fork 97
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
[WIP] [fetch] add interpolation in :angle-vector-raw #841
[WIP] [fetch] add interpolation in :angle-vector-raw #841
Conversation
:position-list (list (send self :state :potentio-vector :wait-until-update t) av) | ||
:time-list (list tm)) | ||
(send minjerk :start-interpolation) | ||
(send minjerk :pass-time (/ tm devide)) |
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.
divide
@@ -23,7 +23,17 @@ | |||
(setq moveit-robot (instance fetch-robot :init)) | |||
(send self :set-moveit-environment (instance fetch-moveit-environment :init :robot moveit-robot)) | |||
)) | |||
(:angle-vector-raw (&rest args) (send-super* :angle-vector args)) | |||
(:angle-vector-raw (av &optional (tm 3000) &key (devide 4) &rest args) |
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.
divide
(send minjerk :start-interpolation) | ||
(send minjerk :pass-time (/ tm devide)) | ||
(dotimes (i devide) | ||
(setq avs (cons (send minjerk :pass-time (/ tm devide)) avs))) |
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.
(setq avs (append avs (send minjerk :pas-time (/ tm divide)))
(send minjerk :pass-time (/ tm devide)) | ||
(dotimes (i devide) | ||
(setq avs (cons (send minjerk :pass-time (/ tm devide)) avs))) | ||
(setq avs (reverse avs)) |
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.
why do you need to reverse the list?
(dotimes (i devide) | ||
(setq avs (cons (send minjerk :pass-time (/ tm devide)) avs))) | ||
(setq avs (reverse avs)) | ||
(send* self :angle-vector-sequence-raw avs (/ tm devide) args))) |
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.
tms
should be list of time.
Is this code tested?
:position-list (list (send self :state :potentio-vector :wait-until-update t) av) | ||
:time-list (list tm)) | ||
(send minjerk :start-interpolation) | ||
(send minjerk :pass-time (/ tm devide)) |
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.
if you fo (send minjerk :pass-time time)
for the first time, it returns angle-vector
at time 0
s.
Is this a bug or a designed return? @k-okada
1.irteusgl$ (setq minjerk (instance minjerk-interpolator :init))
#<minjerk-interpolator #X591c800>
2.irteusgl$ (send minjerk :reset :position-list (list #f(0 0 0) #f(0 10 20)) :time-list (list 5000))
(#f(0.0 0.0 0.0) #f(0.0 0.0 0.0))
3.irteusgl$ (send minjerk :start-interpolation)
t
4.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 0.0 0.0)
5.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 0.5792 1.1584)
6.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 3.1744 6.3488)
7.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 6.8256 13.6512)
8.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 9.4208 18.8416)
9.irteusgl$ (send minjerk :pass-time 1000)
#f(0.0 10.0 20.0)
10.irteusgl$ (send minjerk :pass-time 1000)
nil
63beb60
to
a21e8ed
Compare
7ec0e65
to
b24e7db
Compare
b24e7db
to
9d7a737
Compare
wait for #847 |
#849 |
#849 でいいか確認してみてください.OKだったらクローズでいいのかな. |
moved to #849 |
:angle-vector-rawの中で補間点を入れると#839 のような挙動を示さなくなった。
以下の部分で、補間点が少ないと良くないことが起こるらしい。
https://github.com/fetchrobotics/robot_controllers/blob/74970680716f8af29c5ff3e1e8a76ea1089640ff/robot_controllers/src/follow_joint_trajectory.cpp#L381