Skip to content

Commit

Permalink
Merge pull request #999 from kochigami/add-leds-new
Browse files Browse the repository at this point in the history
[naoqieus] add led fading method (new version of #812)
  • Loading branch information
k-okada authored Dec 5, 2018
2 parents 0dd83f8 + dd9ac7d commit f82d3a5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions jsk_naoqi_robot/naoqieus/naoqi-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -417,5 +417,31 @@
(send res :success)
)
)
(:fade-leds
(led_name r g b 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 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 f82d3a5

Please sign in to comment.