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

[WIP] Fix duration handling in :move-hand #2724

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demos/baxter_paper_filing/euslisp/baxterlgv8-sensor-eval.l
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
(send *ri* :wait-interpolation)
(unix::sleep 1)
(send *ri* :move-hand :larm
(send *baxter* :hand :larm :angle-vector (float-vector 0 72 72)) 1500)
(send *baxter* :hand :larm :angle-vector (float-vector 0 72 72)) 1000)
(send *ri* :move-hand :larm
(send *baxter* :hand :larm :angle-vector (float-vector 0 90 90)) 1500 :wait nil)
(send *baxter* :hand :larm :angle-vector (float-vector 0 90 90)) 1000 :wait nil)
(let (cancel-func stopped-p l-prox r-prox l-thre r-thre l-refl r-refl)
(if intensity
(progn
Expand Down
24 changes: 12 additions & 12 deletions demos/sphand_ros/sphand_driver/euslisp/baxterlgv8-gv8-movement.l
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
(&key (type :lgripper-controller))
(sphand_driver::baxterlgv8-init :type type)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical) 1000)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000)
(send *baxter* :rotate-gripper *arm* 0 :relative nil)
(send *baxter* :slide-gripper *arm* 0 :relative nil)
(send *ri* :angle-vector (send *baxter* :angle-vector))
Expand All @@ -25,33 +25,33 @@
(when move-fingers
;; test of abduction/adduction
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical) 1000)
(unix::sleep 2)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000)
(unix::sleep 2)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 0) 1500)
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 0) 1000)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pose *arm* :cylindrical :angle 0) 1500)
(send *baxter* :hand-grasp-pose *arm* :cylindrical :angle 0) 1000)
(unix::sleep 2)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 0) 1500)
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 0) 1000)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000)
(unix::sleep 2)
;; test of closing fingers
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 80) 1500)
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 80) 1000)
(unix::sleep 1)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000)
(unix::sleep 1)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 100) 1500)
(send *baxter* :hand-grasp-pose *arm* :opposed :angle 100) 1000)
(unix::sleep 1)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500))
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000))
;; test of prismatic joint
(send *baxter* :slide-gripper *arm* 206 :relative nil)
(send *ri* :angle-vector (send *baxter* :angle-vector) :fast nil 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
(list (instance trajectory_msgs::JointTrajectoryPoint
:init
:positions (mapcar #'deg2rad av-list)
:time_from_start (ros::time (/ tm 1000)))))
:time_from_start (ros::time (/ tm 1000.0)))))
(send goal :goal :trajectory traj)
(send (gethash arm hand-actions-) :send-goal goal)
(setq res (send (gethash arm hand-actions-) :get-result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(send *baxter* :rotate-gripper *arm* 0 :relative nil)
1500)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(send *ri* :spin-off-by-wrist *arm* :times 20)
(send *ri* :gripper-servo-on *arm*)
(send *ri* :wait-interpolation)
Expand All @@ -43,7 +43,7 @@
(send *ri* :wait-interpolation)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
)


Expand All @@ -55,7 +55,7 @@

(send *baxter* :hand-grasp-pre-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
(send *ri* :move-arm-body->bin *arm* *bin*)
(send *ri* :wait-interpolation)
Expand All @@ -77,7 +77,7 @@
(send *ri* :wait-interpolation)
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
;; approach to object
(pushback (send *baxter* *arm* :move-end-pos #f(50 0 0) :world) avs)
(pushback (send *baxter* *arm* :move-end-pos #f(50 0 0) :world) avs)
Expand Down Expand Up @@ -105,7 +105,7 @@
(send *ri* :wait-interpolation)
(send *baxter* :hand-grasp-pose *arm* :cylindrical)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
;; draw out object
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 50) :world) avs)
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 50) :world) avs)
Expand Down Expand Up @@ -137,7 +137,7 @@

(send *baxter* :hand-grasp-pre-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
(send *ri* :move-arm-body->bin *arm* *bin*)
(send *ri* :wait-interpolation)
Expand Down Expand Up @@ -181,7 +181,7 @@
;; grasp object by hand
(send *baxter* :hand-grasp-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
;; draw out object
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 50) :world) avs)
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 10) :world) avs)
Expand Down Expand Up @@ -217,7 +217,7 @@

(send *baxter* :hand-grasp-pre-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
(send *ri* :move-arm-body->bin *arm* *bin*)
(send *ri* :wait-interpolation)
Expand Down Expand Up @@ -261,7 +261,7 @@
;; grasp object by hand
(send *baxter* :hand-grasp-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
;; draw out object
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 50) :world) avs)
(pushback (send *baxter* *arm* :move-end-pos #f(0 0 10) :world) avs)
Expand Down Expand Up @@ -297,7 +297,7 @@

(send *baxter* :hand-grasp-pre-pose *arm* :opposed)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
(send *ri* :move-arm-body->bin *arm* *bin*)
(send *ri* :wait-interpolation)
Expand Down Expand Up @@ -331,7 +331,7 @@
;; prepare fingers
(send *baxter* :hand-grasp-pre-pose *arm* :cylindrical)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
;; approach and drag object by sliding gripper
(pushback (send *baxter* *arm* :move-end-pos #f(0 40 0) :world) avs)
Expand All @@ -344,7 +344,7 @@
;; grasp object by hand
(send *baxter* :hand-grasp-pose *arm* :cylindrical)
(send *ri* :move-hand *arm*
(send *baxter* :hand *arm* :angle-vector) 1500)
(send *baxter* :hand *arm* :angle-vector) 1000)
(unix::sleep 3)
;; draw out object
;(pushback (send *baxter* *arm* :move-end-pos #f(0 0 50) :world) avs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
(progn
;; gripper-v5
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* (send *ri* :get-val '_grasp-style)) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* (send *ri* :get-val '_grasp-style)) 1000)
(send *baxter* :slide-gripper *arm* 100 :relative nil)
(send *ri* :send-av 1000)
(send *ri* :wait-interpolation)
(send *baxter* :slide-gripper *arm* 0 :relative nil)
(send *ri* :send-av 1000)
(send *ri* :wait-interpolation)
(send *ri* :move-hand *arm*
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1500)
(send *baxter* :hand-grasp-pre-pose *arm* :opposed) 1000)
(send *ri* :spin-off-by-wrist *arm* :times 5)
)
(send *ri* :spin-off-by-wrist arm :times 20)
Expand Down
Loading