Skip to content

Commit

Permalink
[naoqieus] add led fading method (new version of #812)
Browse files Browse the repository at this point in the history
  • Loading branch information
kochigami committed Nov 22, 2018
1 parent d18c60a commit f0f0339
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions jsk_naoqi_robot/naoqieus/naoqi-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -406,5 +406,32 @@
(send res :success)
)
)
(:fade-leds
(led_name r g b a sec)
(let* ((fade_rgb_msg (instance naoqi_bridge_msgs::FadeRGB :init))
(ret (instance naoqi_bridge_msgs::FadeLedsRequest :init))
(duration_msg (send fade_rgb_msg :fade_duration))
res)
(ros::wait-for-service "/naoqi_driver/fade_leds")
(send fade_rgb_msg :led_name led_name)
(send fade_rgb_msg :color :r r)
(send fade_rgb_msg :color :g g)
(send fade_rgb_msg :color :b b)
(send fade_rgb_msg :color :a a)
(send duration_msg :sec sec)
(send fade_rgb_msg :fade_duration duration_msg)
(send ret :fade_rgb fade_rgb_msg)
(setq res (ros::service-call "/naoqi_driver/fade_leds" ret))
)
)
(:reset-leds
(led_name)
(let ((ret (instance naoqi_bridge_msgs::SetStringRequest :init))
res)
(send ret :data led_name)
(setq res (ros::service-call "/naoqi_driver/reset_leds" ret))
(send res :success)
)
)
)
;;

0 comments on commit f0f0339

Please sign in to comment.