Skip to content

Commit

Permalink
google_chat_ros: enable to pass action client to get message result
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Jan 4, 2025
1 parent fbd4770 commit 34ad00e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions google_chat_ros/scripts/google-chat.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
(ros::roseus "google_chat_eus_client")

(defun send-google-chat-text (space content
&key (thread-name nil) (action-goal-name "google_chat_ros/send") (wait t))
&key (thread-name nil) (action-goal-name "google_chat_ros/send") (wait t)
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction)))
(wait (boundp 'google_chat_ros::SendMessageAction)
(let ((goal (instance google_chat_ros::SendMessageActionGoal :init))
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction)))
(let ((goal (instance google_chat_ros::SendMessageActionGoal :init)))
(when (send ac :wait-for-server 1)
(when (eq (send ac :get-state) actionlib_msgs::GoalStatus::*active*)
(send ac :cancel-goal)
Expand All @@ -25,11 +25,11 @@
(defun send-google-chat-image
(space image-path
&key (image-header "") (thread-name nil)
(action-goal-name "google_chat_ros/send") (wait t))
(action-goal-name "google_chat_ros/send") (wait t)
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction)))
(when (boundp 'google_chat_ros::SendMessageAction)
(let ((goal (instance google_chat_ros::SendMessageActionGoal :init))
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction))
(let ((goal (instance google_chat_ros::SendMessageActionGoal :init)))
(card (instance google_chat_ros::Card :init))
(section (instance google_chat_ros::Section :init))
(widget (instance google_chat_ros::WidgetMarkup :init))
Expand Down Expand Up @@ -72,11 +72,11 @@
;; buttons should be list
(space buttons
&key (buttons-header "") (thread-name nil)
(action-goal-name "google_chat_ros/send") (wait nil))
(action-goal-name "google_chat_ros/send") (wait nil)
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction)))
(when (boundp 'google_chat_ros::SendMessageAction)
(let ((goal (instance google_chat_ros::SendMessageActionGoal :init))
(ac (instance ros::simple-action-client :init
action-goal-name google_chat_ros::SendMessageAction))
(card (instance google_chat_ros::Card :init))
(section (instance google_chat_ros::Section :init))
(widget (instance google_chat_ros::WidgetMarkup :init)))
Expand Down

0 comments on commit 34ad00e

Please sign in to comment.