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

[2024年度ゼミ] Tsubaki's work #1403

Draft
wants to merge 43 commits into
base: jsk_2024_10_semi
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d0dedc4
add 1023
Michi-Tsubaki Oct 23, 2024
2902b4c
add memo
Michi-Tsubaki Oct 23, 2024
8e1fe45
make surgery robot motion
Michi-Tsubaki Oct 29, 2024
9549e21
change file name
Michi-Tsubaki Oct 29, 2024
740c909
change file name
Michi-Tsubaki Oct 29, 2024
b824947
add uml
Michi-Tsubaki Oct 30, 2024
ad71aa5
switch handsgit add --all
Michi-Tsubaki Oct 30, 2024
6928a67
be able to switch hands with needle!
Michi-Tsubaki Oct 30, 2024
af12768
change motion param
Michi-Tsubaki Oct 30, 2024
57c0c7b
be able to swithch needle
Michi-Tsubaki Nov 6, 2024
d56e230
segmentation using opencv
Michi-Tsubaki Nov 6, 2024
f2b4feb
Nov 6 at semi
Michi-Tsubaki Nov 6, 2024
e9a2a21
trying to make trajectory class
Michi-Tsubaki Nov 12, 2024
c2717f5
add nov 12 semi achievements
Michi-Tsubaki Nov 13, 2024
e96448c
organize files
Michi-Tsubaki Nov 18, 2024
e9f0a90
change directory
Michi-Tsubaki Nov 18, 2024
ea2d028
delete
Michi-Tsubaki Nov 18, 2024
b1b950b
make dev1
Michi-Tsubaki Nov 18, 2024
1971484
delete
Michi-Tsubaki Nov 18, 2024
a117736
1
Michi-Tsubaki Nov 18, 2024
e4b32b2
read me
Michi-Tsubaki Nov 18, 2024
9d64e1e
Nov 18
Michi-Tsubaki Nov 18, 2024
f260319
Nov 19
Michi-Tsubaki Nov 18, 2024
5d55dc2
delete
Michi-Tsubaki Nov 19, 2024
04b815b
be able to switch needle, follow trajectory!
Michi-Tsubaki Nov 20, 2024
be74d75
add some functions, voice-tedection being constructed
Michi-Tsubaki Nov 22, 2024
33479f2
change height parameter
Michi-Tsubaki Nov 27, 2024
8ba4c94
add needle drawing not to tangle thread!
Michi-Tsubaki Nov 27, 2024
edd2ad4
Tidy up files
Michi-Tsubaki Nov 27, 2024
dc6926d
add link to google slide
Michi-Tsubaki Nov 28, 2024
3ae7c36
update uml
Michi-Tsubaki Dec 2, 2024
b8b0d9c
try to make ros pkg, but...
Michi-Tsubaki Dec 3, 2024
a063eaa
add 触覚feedback
Michi-Tsubaki Dec 3, 2024
cf366bd
revize 触覚FB
Michi-Tsubaki Dec 4, 2024
2eac326
add Dec 04 last achievements
Michi-Tsubaki Dec 4, 2024
a523ef2
succeeded in makeing pr2_surgery pkg
Michi-Tsubaki Dec 5, 2024
3bf624e
revize recognize_wound.launch
Michi-Tsubaki Dec 11, 2024
af94995
引っ張り判定に入らないバグを修正.コードを整形
Michi-Tsubaki Dec 14, 2024
1bdd78a
fix indent in launch file, and also add cluster_fillter
Michi-Tsubaki Dec 14, 2024
30b2ee0
add feedback
Michi-Tsubaki Dec 18, 2024
1af3b77
add Dec 18 semi achievements
Michi-Tsubaki Dec 19, 2024
f2dabd8
delete lines in main.l which is no more needed
Michi-Tsubaki Dec 19, 2024
99ce4b8
update force fb param
Michi-Tsubaki Dec 23, 2024
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
5 changes: 5 additions & 0 deletions jsk_2024_10_semi/demo_first.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(require "package://pr2eus/pr2.l")
(if (not (boundp '*pr2*)) (setq *pr2* (pr2)))
(objects (list *pr2*))
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
45 changes: 45 additions & 0 deletions jsk_2024_10_semi/demo_solve-ik.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env roseus

;; PR2のモデルを読み込む
(require "package://pr2eus/pr2.l")

;; PR2のインスタンスを作成
(if (not (boundp '*pr2*)) (setq *pr2* (pr2)))

;; 1辺200mmの立方体を出現させる
(setq *cube* (make-cube 200 200 200)) ;; NOTE 実際はハンガーなど,デモに使用するモデルを作って出現させるとよいかもしれない
;; 立方体を(400, 0, 800)移動
(send *cube* :translate (float-vector 400 0 800)) ;; NOTE 画像認識結果から,ハンガーの位置を取得して移動するとよいかもしれない

;; 立方体の左側面に座標系を設定
(send *cube* :put :left-coords
(make-cascoords
:coords (send (send *cube* :copy-worldcoords) :translate (float-vector 0 100 0))
:parent *cube*))

;; ビューワを表示
(objects (list *pr2* *cube*))

;; 左腕について,立方体の両側面に向かって逆運動学を解く
(send *pr2* :larm :inverse-kinematics
(send (send *cube* :get :left-coords) :copy-worldcoords)
:rotation-axis :z)

;; PR2の左腕で立方体を持ち上げて前に突き出す
;; PR2の左腕と立方体の左側を連結する.
(send *pr2* :larm :end-coords :assoc *cube*)
;; 立方体が現在の位置から相対で(100, 0, 200)に移動するように逆運動学を解く
(send *pr2*
:inverse-kinematics (send (send (send *cube* :get :left-coords) :copy-worldcoords)
:translate (float-vector 100.0 0.0 100.0))
:move-target (send *cube* :get :left-coords)
:link-list (send *pr2* :link-list (send (send *pr2* :larm :end-coords) :parent))
:rotation-axis t
:debug-view t)

;;(send *ri* :angle-vector (send *pr2* :angle-vector) 2000)
;;(send *ri* :wait-interpolation)


;; NOTE 両腕で持って渡すみたいな動作は,結構難しい? ref: https://github.com/euslisp/jskeus/issues/582
;; :assocは閉リンクを形成できないので,1つの箱に両腕を連結することはできない?
248 changes: 248 additions & 0 deletions jsk_2024_10_semi/first_motion.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
;;Okada-sensei seminar practice task ;;last editted oct 17 ;; Michitoshi TSUBAKI
;;building specific motions using euslisp command

(require "package://pr2eus/pr2.l") ;;import pr2 package
(require "package://pr2eus/pr2-utils.l")
(require "package://pr2eus/pr2-interface.l")
(if (not (boundp '*pr2*)) (pr2-init)) ;; (setq *pr2* (pr2))) ;; (pr2) is alternated by *pr2*
;;boudp 'xx : xxという変数に値が代入されているか
;;setq xx yy : xxとう変数にyyという値を代入する

(send *pr2* :reset-pose) ;; 初期姿勢
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :stop-grasp :arms)
(send *ri* :wait-interpolation)


(objects (list *pr2*))

;;徐々に腕(肩)を広げる(Oct 17)
(send *pr2* :larm :shoulder-p :joint-angle 74)
(send *pr2* :larm :shoulder-p :joint-angle 74)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)

(send *pr2* :larm :shoulder-p :joint-angle 54)
(send *pr2* :rarm :shoulder-p :joint-angle 54)

(send *pr2* :larm :gripper :joint-angle 30)
(send *pr2* :rarm :gripper :joint-angle 30)

(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :start-grasp :arms)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 34)
(send *pr2* :rarm :shoulder-p :joint-angle 34)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 20)
(send *pr2* :rarm :shoulder-p :joint-angle 20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle 0)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


;;徐々に型を下げる(Oct 22)
(send *pr2* :rarm :shoulder-r :joint-angle -80)
(send *pr2* :larm :shoulder-r :joint-angle 80)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :rarm :shoulder-r :joint-angle -95)
(send *pr2* :larm :shoulder-r :joint-angle 95)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :rarm :shoulder-r :joint-angle -110)
(send *pr2* :larm :shoulder-r :joint-angle 100)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)



(send *pr2* :rarm :shoulder-r :joint-angle -130)
(send *pr2* :larm :shoulder-r :joint-angle 120)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)




(send *pr2* :larm :elbow-p :joint-angle -110)
(send *pr2* :rarm :elbow-p :joint-angle -100)
(send *pr2* :rarm :shoulder-r :joint-angle -130)
(send *pr2* :larm :shoulder-r :joint-angle 120)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *irtviewer* :draw-objects)
(unix:sleep 1)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -130)
(send *pr2* :larm :shoulder-r :joint-angle 120)
(send *pr2* :larm :elbow-p :joint-angle -100)
(send *pr2* :rarm :elbow-p :joint-angle -70)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 30)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)




(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -100)
(send *pr2* :larm :shoulder-r :joint-angle 100)
(send *pr2* :larm :elbow-p :joint-angle -100)
(send *pr2* :rarm :elbow-p :joint-angle -70)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 30)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -80)
(send *pr2* :larm :shoulder-r :joint-angle 80)
(send *pr2* :larm :elbow-p :joint-angle -110)
(send *pr2* :rarm :elbow-p :joint-angle -100)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 30)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -100)
(send *pr2* :larm :shoulder-r :joint-angle 100)
(send *pr2* :larm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 30)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


;;fixing now last edited Oct 22 by Michitoshi TSUBAKI

(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -100)
(send *pr2* :larm :shoulder-r :joint-angle 100)
(send *pr2* :larm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 0)
(send *pr2* :rarm :wrist-r :joint-angle 0)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -120)
(send *pr2* :larm :shoulder-r :joint-angle 120)
(send *pr2* :larm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 90)
(send *pr2* :rarm :wrist-r :joint-angle 90)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :torso :waist-z :joint-angle 200)
(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)


(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :rarm :shoulder-p :joint-angle -20)
(send *pr2* :rarm :shoulder-r :joint-angle -120)
(send *pr2* :larm :shoulder-r :joint-angle 120)
(send *pr2* :larm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-p :joint-angle -120)
(send *pr2* :rarm :elbow-r :joint-angle 0)
(send *pr2* :rarm :wrist-p :joint-angle -40)
(send *pr2* :larm :wrist-r :joint-angle 0)
(send *pr2* :rarm :wrist-r :joint-angle 0)
(send *pr2* :larm :shoulder-p :joint-angle 10)
(send *pr2* :torso :waist-z :joint-angle 300)

(send *irtviewer* :draw-objects)
;;(unix:sleep 1)
(send *ri* :angle-vector (send *pr2* :angle-vector) 1000)
(send *ri* :wait-interpolation)



Loading
Loading