jsk-ros-pkg / jsk_3rdparty

42 stars 60 forks source link

google_chat_ros: enable to get therad_name message result #498

Open k-okada opened 10 months ago

k-okada commented 10 months ago

another imprementation of #496

@mqcmd196 I have created PR, how about enabling :ac option. Beacuase current implementation initialize publisher/subscriber everytime we call function. This is good for example code, but hard to use in demo code.

(send-google-chat-text "spaces/AAAARE9CrfA" "Hello" :ac (instance ros::simple-action-client :init action-goal-name google_chat_ros::SendMessageAction)))
k-okada commented 10 months ago

https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/496#issuecomment-1783679816 says

@k-okada
I think

Another solution would be to return the result of the message like https://github.com/k-okada/jsk_3rdparty/commit/e9a4904cb2449ab86415d8d4046592546a42b801 and write code like this

is better because the eus function is designed to be usable without knowing the detailed message specifications.

so pass SimpleActionClient and return result?

mqcmd196 commented 10 months ago

I mean enabling the option

how about enabling :ac option. Beacuase current implementation initialize publisher/subscriber everytime we call function

and if the :ac is set, the function uses it.