Skip to content

Commit

Permalink
(naoqieus) Get errors for invalid :volume :lang parameters in :speak
Browse files Browse the repository at this point in the history
  • Loading branch information
kochigami committed Aug 23, 2022
1 parent a385730 commit f6224fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jsk_naoqi_robot/naoqieus/naoqi-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@
(setq wait t))
;; set volume and language
(when volume
(send self :set-master-volume (round (* volume 100))))
(unless (send self :set-master-volume (round (* volume 100)))
(error "Invalid volume argument")))
(when lang
(send self :set-language lang))
(unless (send self :set-language lang)
(error "Invalid language argument")))
;; send speech request
(send speech_msg :data str)
(ros::publish (format nil "~A/speech" group-namespace) speech_msg)
Expand Down Expand Up @@ -437,7 +439,7 @@
(send ret :data language)
(setq res (ros::service-call (format nil "~A/naoqi_driver/set_language" group-namespace) ret))
(if (not (send res :success))
(ros::ros-error ":speak :lang ~A must be English or Japanese" language))
(ros::ros-error ":speak :lang ~A must be English or Japanese" language))
(send res :success))
)
(:get-language
Expand Down

0 comments on commit f6224fc

Please sign in to comment.