Skip to content

Commit b075dc9

Browse files
committed
Merge pull request jsk-ros-pkg#106 from garaemon/speak-battery-remaining
Speak the remaining percentages of the battery if it's not charged
2 parents 6b509ef + d0ae883 commit b075dc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jsk_pr2_startup/jsk_pr2_warning/battery_warning.l

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
(ros::roseus-add-msgs "pr2_msgs")
66
(ros::roseus-add-msgs "actionlib_msgs")
77
(ros::roseus-add-srvs "std_srvs")
8+
(load "package://pr2eus/speak.l")
89

910
(setq *ac* nil *ac-tm* (ros::time 0)) ;; ac_present > 0
1011
(setq *motor* t) ;; if motors working
@@ -30,6 +31,7 @@
3031
(> 180.0 (send (ros::time- tm *ac-tm*) :to-sec)))
3132
(return-from check-power-state-cb nil))
3233
(setq *ac-tm* tm) ;; check every 3min
34+
(speak-jp (format nil "でんちのこり~Aパーセントです" p))
3335
(cond
3436
((< p 10)
3537
(ros::ros-info "need to back to M78 nebula")
@@ -48,4 +50,5 @@
4850
(ros::roseus "battery_warning")
4951
(ros::subscribe "/power_state" pr2_msgs::PowerState #'check-power-state-cb)
5052
(ros::advertise "/robotsound" sound_play::SoundRequest 10)
53+
(ros::advertise "/robotsound_jp" sound_play::SoundRequest 5)
5154
(ros::spin)

0 commit comments

Comments
 (0)