Skip to content

Commit

Permalink
action for #823
Browse files Browse the repository at this point in the history
  • Loading branch information
kochigami committed Nov 16, 2018
1 parent 765a66f commit aad152c
Showing 1 changed file with 13 additions and 41 deletions.
54 changes: 13 additions & 41 deletions jsk_naoqi_robot/jsk_201504_miraikan/euslisp/mirai-demo-20150413.l
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env roseus

(ros::roseus "greeting")
(ros::load-ros-manifest "peppereus")
(ros::load-ros-package "peppereus")
(require :pepper-interface "package://peppereus/pepper-interface.l")
(load "package://jsk_201504_miraikan/euslisp/pepper-motions.l")

Expand All @@ -22,7 +22,7 @@
(send *ri* :set-language language)))

;; play audio file and make a gesture
(defun playAudioFile_move (file angle-list time-list)
(defun play_audio_file_move (file angle-list time-list)
(ros::ros-info "speak")
(send *ri* :angle-vector-sequence angle-list time-list)
(send *ri* :play-audio-file file))
Expand All @@ -40,17 +40,6 @@
(send *ri* :stop-grasp)
(case language
(:ja
;; we can't use these services now, but I leave them tempolarily.
;;(setq req_language (instance dynamic_reconfigure::ReconfigureRequest :init))
;;(setq req_voice (instance dynamic_reconfigure::ReconfigureRequest :init))
;;(send req_language :config :strs (list (instance dynamic_reconfigure::StrParameter :init :name "language" :value "Japanese")))
;;(ros::ros-info "wait for nao_speech/set_parameters")
;;(ros::wait-for-service "nao_speech/set_parameters")
;;(ros::service-call "nao_speech/set_parameters" req_language)
;;(send req_voice :config :strs (list (instance dynamic_reconfigure::StrParameter :init :name "voice" :value "maki_n16")))
;;(ros::ros-info "wait for nao_speech/set_parameters")
;;(ros::wait-for-service "nao_speech/set_parameters")
;;(ros::service-call "nao_speech/set_parameters" req_voice)
(change-speaking-language "Japanese")
(speak_move "\\vct=180\\稲葉岡田研究室にようこそ\\pau=1000\\私はペッパー\\pau=500\\人と一緒に暮らすために作られたロボットです\\vct=130\\" *lift_arm_and_bow* (list 1000 1000 1000 1000 1000 1000 1000))
(speak_move "\\vct=180\\家事が苦手で\\pau=500\\産業ロボットのような器用なアームはないですが\\pau=500\\言葉を通して人と交流することができますし\\pau=500\\人の声を認識したり\\pau=500\\センサーによって触覚を感じられたりします\\pau=1000\\そして\\pau=500\\人の顔を見て覚えられますよ。\\vct=130\\" *pepper_can_cannot* (list 2000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1500 1000 1500 1000 1000 1000 1000 1000))
Expand All @@ -65,27 +54,16 @@
(speak_move "\\vct=180\\今日はここで\\pau=100\\みなさんとお会いし\\pau=500\\自分のことを知ってもらえて\\pau=500\\とても嬉しいです\\pau=1000\\本当にありがとうございます。\\vct=130\\" (list *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *left_right_arm* *left_right_arm* *left_right_arm* *bow* *bow* *bow* *reset_pose*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000))
)
(:chi
(playAudioFile_move "/audio_file/M1.mp3" *lift_arm_and_bow* (list 1000 1000 1000 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M2.mp3" *pepper_can_cannot* (list 2000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1500 1000 1500 1000 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M3.mp3" *pepper_run* (list 1000 1000 1000 1000 1000 1000 100 100 100 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M4.mp3" (list *reset_pose* *reset_pose* *reset_pose* *show_the_camera_on_head* *show_the_camera_on_head* *show_the_camera_on_head* *show_the_camera_in_mouth* *show_the_camera_in_mouth* *open_two_hands_widely*) (list 1000 1000 1000 1000 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M5.mp3" *speaker_touch_sensor* (list 2000 1000 1000 2000 2000 1000 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M6.mp3" (list *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *touch_CPU* *touch_CPU* *touch_CPU* *reset_pose*) (list 3000 2000 2000 1000 1000 1000 2000 1000 1000))
(playAudioFile_move "/audio_file/M7.mp3" (list *lift_two_hands_beside_face_and_bow_slightly_to_right* *lift_two_hands_beside_face_and_bow_slightly_to_right* *lift_two_hands_beside_face_and_bow_slightly_to_right* *bow_slightly_to_left* *bow_slightly_to_left* *bow_slightly_to_left* *reset_pose* *reset_pose* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *put_two_hands_in_front_of_the_body* *bow_slightly_to_left* *bow_slightly_to_left* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *look_right* *look_left* *reset_pose*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000))
(playAudioFile_move "/audio_file/M8.mp3" (list *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *left_right_arm* *left_right_arm* *left_right_arm* *bow* *bow* *bow* *reset_pose*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M1.mp3" *lift_arm_and_bow* (list 1000 1000 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M2.mp3" *pepper_can_cannot* (list 2000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1500 1000 1500 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M3.mp3" *pepper_run* (list 1000 1000 1000 1000 1000 1000 100 100 100 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M4.mp3" (list *reset_pose* *reset_pose* *reset_pose* *show_the_camera_on_head* *show_the_camera_on_head* *show_the_camera_on_head* *show_the_camera_in_mouth* *show_the_camera_in_mouth* *open_two_hands_widely*) (list 1000 1000 1000 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M5.mp3" *speaker_touch_sensor* (list 2000 1000 1000 2000 2000 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M6.mp3" (list *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *touch_CPU* *touch_CPU* *touch_CPU* *reset_pose*) (list 3000 2000 2000 1000 1000 1000 2000 1000 1000))
(play_audio_file_move "/audio_file/M7.mp3" (list *lift_two_hands_beside_face_and_bow_slightly_to_right* *lift_two_hands_beside_face_and_bow_slightly_to_right* *lift_two_hands_beside_face_and_bow_slightly_to_right* *bow_slightly_to_left* *bow_slightly_to_left* *bow_slightly_to_left* *reset_pose* *reset_pose* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *put_two_hands_in_front_of_the_body* *bow_slightly_to_left* *bow_slightly_to_left* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *put_two_hands_in_front_of_the_body* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *open_two_arms_widely_and_look_at_the_sky* *look_right* *look_left* *reset_pose*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000))
(play_audio_file_move "/audio_file/M8.mp3" (list *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *reset_pose* *left_right_arm* *left_right_arm* *left_right_arm* *bow* *bow* *bow* *reset_pose*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000))
)
(:en
;; we can't use these services now, but I leave them tempolarily.
;;(setq req_language (instance dynamic_reconfigure::ReconfigureRequest :init))
;;(setq req_voice (instance dynamic_reconfigure::ReconfigureRequest :init))
;;(send req_language :config :strs (list (instance dynamic_reconfigure::StrParameter :init :name "language" :value "English")))
;;(ros::ros-info "wait for nao_speech/set_parameters")
;;(ros::wait-for-service "nao_speech/set_parameters")
;;(ros::service-call "nao_speech/set_parameters" req_language)
;;(send req_voice :config :strs (list (instance dynamic_reconfigure::StrParameter :init :name "voice" :value "Kenny22Enhanced")))
;;(ros::ros-info "wait for nao_speech/set_parameters")
;;(ros::wait-for-service "nao_speech/set_parameters")
;;(ros::service-call "nao_speech/set_parameters" req_voice)
(change-speaking-language "English")
(speak_move "Welcome to JSK laboratory. I am pepper, \\pau=500\\a robot which is designed to live with human beings." *lift_arm_and_bow* (list 1000 1000 1000 1000 1000 1000 1000))
(speak_move "Although I'm not good at doing housework,\\pau500\\ nor do I have dexterous arms like industrial robots do, \\pau=500\\I'm able to communicate with humans through language, \\pau=500\\recognize human' voices,\\pau=500\\ feel touch and remember the faces of humans whom I have seen." *pepper_can_cannot* (list 2000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1500 1000 1500 1000 1000 1000 1000 1000))
Expand All @@ -98,12 +76,6 @@
)
))
(ros::ros-warn "usage")
(ros::ros-warn "if Japanese,")
(ros::ros-warn "demo")
(ros::ros-warn "if Chinese,")
(ros::ros-warn "demo :chi")
(ros::ros-warn "if English,")
(ros::ros-warn "demo :en")

;;(demo)

(ros::ros-warn "if Japanese, type (demo)")
(ros::ros-warn "if Chinese, type (demo :chi)")
(ros::ros-warn "if English, type (demo :en)")

0 comments on commit aad152c

Please sign in to comment.