No version for distro humble showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

No version for distro rolling showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

No version for distro github showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

No version for distro galactic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

No version for distro iron showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange

Package Summary

Version 3.0.2
License BSD-3-Clause
Build type CATKIN
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/jsk-ros-pkg/jsk_3rdparty.git
VCS Type git
VCS Version master
Last Updated 2026-11-26
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Use Google Chat API clients via ROS

Maintainers

  • Kei Okada

Authors

  • Yoshiki Obinata

Google Chat ROS

A Google Chat app (bot) for ROS. google_chat_ros_node.py

  • sends text and card messages to a Google Chat space: goals of the action /google_chat_ros/send;
  • receives the messages to the bot, the bot being added to / removed from a space, and the clicks on card buttons, and publishes them on /google_chat_ros/message_activity, /google_chat_ros/space_activity and /google_chat_ros/card_activity.

The same launch files and scripts work on ROS 1 and ROS 2.

  1. Choose a mode
  2. Quick start (Pub/Sub mode, ROS 2)
  3. Sending messages
  4. Receiving messages
  5. Mode details: Pub/Sub, HTTPS, sending only, Dialogflow
  6. ROS 1
  7. Interface
  8. Troubleshooting
  9. Notes

1. Choose a mode

Sending always uses the Google Chat REST API. How the node receives events is chosen by receiving_mode:

Mode receiving_mode Sends Receives What you need
Pub/Sub (recommended) pubsub ✓ ✓ Service account key; Chat app with the connection “Cloud Pub/Sub”; a Pub/Sub topic and subscription. No public address needed
HTTPS url (default) ✓ (with a key) ✓ Chat app with the connection “App URL”; a public HTTPS endpoint (reachable host and port, certificate signed by a CA, e.g. Let’s Encrypt; not self-signed); the key only to send
Sending only none ✓   Service account key; Chat app configured
Dialogflow dialogflow ✓   Not a receiving mode any more: it creates the topics but receives nothing. Use pubsub or url and the helper (to_dialogflow_client, ROS 1 only)

The service account key is the JSON key file of a Google Cloud service account which can use the Google Chat API (launch argument google_cloud_credentials_json). Without a valid key the node starts, but it does not provide the send action (it logs Failed to start Google Chat REST service). For JSK members, the keys are on Google Drive; if you make a new key, upload it there. Keep the keys private.

2. Quick start (Pub/Sub mode, ROS 2)

  1. Google Cloud project and key. Create a project, enable the Google Chat API, create a service account and download its JSON key (see the Google document).
  2. Pub/Sub. In the console of the project:
    1. IAM: give the service account the role Pub/Sub Admin.
    2. Pub/Sub: create a topic (e.g. chat, full name projects/<project_id>/topics/chat) and a subscription of it (e.g. chat-sub) which never expires (by default it expires after a period of inactivity, see Troubleshooting).
    3. On the topic, give the role Pub/Sub Publisher to chat-api-push@system.gserviceaccount.com, so that Google Chat can publish the events.

    Screenshots: Pub/Sub mode.

  3. Chat app. In the configuration of the Google Chat API, set the app name, avatar and description, and choose the connection setting Cloud Pub/Sub with the full topic name projects/<project_id>/topics/chat.
  4. Build (the Python modules are installed into a venv of the package at build time):
   colcon build --packages-up-to google_chat_ros
   
  1. Launch:
   ros2 launch google_chat_ros google_chat.launch.xml receiving_mode:=pubsub \
     google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json \
     project_id:=<project_id> subscription_id:=chat-sub
   
  1. Add the app to a space in Google Chat (or open a DM with it), and get the space name from the URL of the space: https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX is the space spaces/XXXXXXXXXXX.
  2. Receive: mention the app in the space (or write in the DM), and see the message:
   ros2 topic echo /google_chat_ros/message_activity
   
  1. Send:
   ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
     "{text: 'Hello!', space: 'spaces/XXXXXXXXXXX'}"
   

3. Sending messages

Send a goal of google_chat_ros/action/SendMessage to /google_chat_ros/send. space (beginning with spaces/) is required; give thread_name (spaces/<space>/threads/<thread>) to answer in a thread. A message has a text, cards or both; the cards follow the cards v1 json, each unit of which is a ROS message of this package. On ROS 1, publish the same fields under goal: to /google_chat_ros/send/goal (see ROS 1).

Text

ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage \
  "{text: 'Hello!', space: 'spaces/<space>'}"

google_chat_text

A KeyValue card

```bash ros2 action send_goal /google_chat_ros/send google_chat_ros/action/SendMessage “ text: ‘Something FATAL errors have happened in my computer, please fix ASAP’

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

3.0.2 (2026-11-26)

  • Merge pull request #594 from k-okada/fix-error-handling
  • google_chat_ros: answer 400 to HTTPS requests with unknown user agent GoogleChatHTTPSHandler.do_POST() only handled requests whose User-Agent matches (Google-Dynamite) and returned without sending any HTTP response otherwise, so such clients got the connection closed with no status line (or hung until their timeout). Send 400 Bad Request with the existing, so far unused, _bad_request() helper in that case. Requests from Google Chat are processed and answered 200 exactly as before, and the callback is still not called for other user agents. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: format the received Pub/Sub message in debug log GoogleChatPubSubClient._pubsub_cb() logged the literal text "Recieved {message}" because the string had no f-prefix. Format the message into it with str.format() (also fixing the typo), which keeps the file compilable on Python 2 like the rest of the module. Debug-level log text only; no behavior change. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: avoid UnboundLocalError in _download_content _download_content() returns [path]{.title-ref} from a [finally:]{.title-ref} block, but [path]{.title-ref} is only bound inside the try block. When the download fails before it is set (e.g. os.path.join() fails) the logged warning was followed by an UnboundLocalError, raised from the message callback. Initialise [path = None]{.title-ref} before the try. Successful downloads and the warn/error logs on failure are unchanged; only the crash goes away. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: fix undefined image_icon in image button json _make_button_json() filled the icon of an image button into [image_icon]{.title-ref}, which is never defined, so sending a card with an image button that has icon / original_icon_url / original_icon_filepath raised NameError; and the built [image_button]{.title-ref} was never put into json_body, so an image button without icon was silently dropped. Fill the fields into [image_button]{.title-ref} and add it as [imageButton]{.title-ref} (with its [name]{.title-ref}), the same way the text button branch adds [textButton]{.title-ref}. Text buttons and every other card element are unchanged; image buttons never worked before, so no existing ROS 1 behavior depends on this. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #595 from k-okada/readme-update Update the READMEs for ROS 1 / ROS 2, with badges and demos
  • google_chat_ros: restructure README.md for a first-time user Begin with what the package does and a table of the modes (Pub/Sub, HTTPS, sending only, Dialogflow) with what each needs, then a step-by-step quick start of the Pub/Sub mode on ROS 2, sending and receiving, the details of each mode, ROS 1, the interface and troubleshooting; the notes on the Python dependencies go to the end. Facts checked against the code: receiving_mode:=dialogflow only creates the topics, as its subscriber was removed (e4adc5ae), so answering with Dialogflow is the helper's to_dialogflow_client (ROS 1 only); host defaults to localhost; without a valid key there is no send action. The send examples are given for ROS 2 (ros2 action send_goal); their goals were parsed into google_chat_ros/action/SendMessage goals. The subscription expiry is described without a number of days. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • google_chat_ros: update README.md for ROS 1 / ROS 2 Describe how to run it on ROS 2 and ROS 1, its interface (topics, services, actions, parameters) as in the source, and its requirements. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>> Claude-Session: https://claude.ai/code/session_01Xo6jRt2Rcht9sQS6ms6A4p
  • Merge pull request #584 from k-okada/release-3.0.1
  • Contributors: Kei Okada

3.0.1 (2026-11-10)

  • Merge pull request #583 from k-okada/rosdistro-55247-review rosdistro#55247 review: rename power_switching_tools_ros to jsk_power_switching_tools, fix licenses
  • use SPDX license identifiers (BSD-3-Clause, Apache-2.0) in package.xml BSD -> BSD-3-Clause and Apache / "Apache License, Version 2.0" -> Apache-2.0 in all packages (ros/rosdistro#55247 review). The LICENSE files of all of them are BSD 3-Clause and Apache 2.0 respectively. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>
  • Contributors: Kei Okada

3.0.0 (2026-11-06)

  • Merge pull request #581 from k-okada/ros2-buildfarm-ros-environment Fix ROS2 buildfarm binary jobs: ros_environment, bundled flac, numpy wheel

File truncated at 100 lines see the full file

Launch files

  • launch/google_chat.launch
      • receiving_mode [default: url] — Google Chat API settings. Choose from url, dialogflow, pubsub, none.
      • gdrive_upload_service [default: /gdrive_ros/upload] — The ROS service name of gdrive_ros upload
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false] — Whether you use yaml file or not.
      • yaml_file [default: ] — Yaml file of web settings.
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]
  • launch/google_chat.launch.xml
      • receiving_mode [default: url]
      • gdrive_upload_service [default: /gdrive_server/upload]
      • upload_data_timeout [default: 20]
      • download_data [default: true]
      • download_data_timeout [default: 10]
      • download_directory [default: /tmp]
      • download_avatar [default: false]
      • google_cloud_credentials_json [default: ]
      • use_yaml [default: false]
      • yaml_file [default: ]
      • respawn [default: true]
      • host [default: localhost]
      • port [default: 443]
      • ssl_certfile [default: default]
      • ssl_keyfile [default: default]
      • project_id [default: default]
      • subscription_id [default: default]
      • use_helper [default: true]
      • to_dialogflow_client [default: false]
      • debug_sound [default: false]

Services

No service files found

Plugins

No plugins found.

Recent questions tagged google_chat_ros at Robotics Stack Exchange