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

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 jazzy showing melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 kilted showing melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 lyrical showing melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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 melodic. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.0.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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.1
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-13
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

The ROS wrapper for Google Chat API

  1. Installation Guide
  2. Sending the message
  3. Receiving the message
  4. Handling the event
  5. Optional functions
  6. Helper nodes

1. Installation Guide

1.1 Get the API KEY

At first, you should have the permission to access the Google Chat API. See Google Official Document. Please ensure to get JSON credetial file and save it. DO NOT LOST IT!
For JSK members, all keys are available at Google Drive. If you make new API keys, please upload them here.

1.2 Select the way how to recieve Google Chat event

The way you recieve Google Chat event from API server depends on your system. If your system has static IP and is allowed to recieve https request with specific port, please see HTTPS mode. If not, please see Pub/Sub mode.

HTTPS mode

When you send the message, the node uses Google REST API. When you recieve the message, Google Chat API sends https request to your machine and the node handles it.

google_chat_https_system

You have to prepare SSL certificate. Self-signed one is not available because of Google security issue. Please use the service like Let’s Encrypt. In Google Cloud console, please choose App URL as connection settings and fill the URL in the App URL form.

google_chat_https

Pub/Sub mode

When you send the message, the node uses Google REST API. When you recieve the message, the node uses Google Pub/Sub API’s subscription. The node has already established its connection to Google Pub/Sub API when you launch it.

google_chat_pubsub_system

The way how to set up in Google Cloud console shows below.

1. Authorize the existing Google Chat API project to access Google Cloud Pub/Sub service

In IAM settings in the console, please add the role Pub/Sub Admin to service account.

pubsub_admin_mosaic

2. Create Pub/Sub topic and subscriber

In Pub/Sub settings in the console, please add the topic and subscriptions. In the figure, we set the topic name chat, the subscription name chat-sub as an example.

pubsub_topic_mosaic

pubsub_subscription

Note that if you set the topic name chat, the full name of it becomes projects/<project_name>/topics/chat. Please confirm the subsciptions subscribes the full name not short one.

3. Grant publish rigts on your topic

In order for Google Chat to publish messages to your topic, it must have publishing rights to the topic. To grant Google Chat these permissions, assign the Pub/Sub Publisher role to the following service account

chat-api-push@system.gserviceaccount.com

google_chat_pubsub_permission

4. Set Google Chat API Connection settings

Please choose Cloud Pub/Sub as connection settings and fill the full topic name in the Topic Name form.

google_chat_pubsub

1.3 Install/Build the ROS node

If you want to build from the source

source /opt/ros/${ROS_DISTRO}/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_3rdparty
rosdep install --ignore-src --from-paths . -y -r
cd ..
catkin build

On ROS2, build it with colcon build instead and use ros2 launch google_chat_ros google_chat.launch.xml. catkin_virtualenv is not available on ROS2, so the python dependencies (requirements.in.python3.12) are installed into a venv (share/google_chat_ros/venv) from pyproject.toml/uv.lock at build time instead (jsk_ros1_ros2_compat_generate_uv_venv()). Run uv lock after changing pyproject.toml. to_dialogflow_client of the helper needs dialogflow_task_executive, which is not available on ROS2 yet.

1.4 Launch the node

HTTPS mode

You have to set rosparams receiving_mode=https, google_cloud_credentials_json, host, port, ssl_certfile, ssl_keyfile.

Pub/Sub mode

You have to set rosparams receiving_mode=pubsub, google_cloud_credentials_json, project_id, subscription_id. subscription_id would be chat-sub if you follow Pub/Sub mode example.

Example
roslaunch google_chat_ros google_chat.launch receiving_mode:=pubsub google_cloud_credentials_json:=/path/to/<project_id>-XXXXXXXX.json project_id:=<project_id> subscription_id:=chat-sub

2. Sending the message

2.1 Understanding Google Chat Room

When you see Google Chat UI with browsers or smartphone’s apps, you may see space, thread. If you send new message, you must specify the space or thread you want to send the message to. You can get the space name from chat room’s URL. If it is https://mail.google.com/chat/u/0/#chat/space/XXXXXXXXXXX, XXXXXXXXXXX becomes the space name.

2.2 Message format

There are 2 types of messages, text and card. The card basically follows the original json structure. As the node covers all the units in here with ros action msgs, it may be complicated for you if you want to use all of them. So in Examples sections, we’ll show you simple ones.

2.3 Sending the message by actionlib

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package google_chat_ros

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

  • [voicevox, chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, ros_speech_recognition, rospatlite, sesame_ros, switchbot_ros] depend on ros_environment for ROS2 buildfarm The buildfarm builds each package with only its own build dependencies, so without ros_environment $ROS_VERSION is empty and CMakeLists.txt takes the ROS1 branch (same as jsk_common#1835). voicevox also guesses ROS_VERSION from AMENT_PREFIX_PATH when it is unset. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into fix_hoya

  • Merge branch 'master' into voicevox-ros1-ros2

  • AMENT_IGNORE: do not add AMENT_IGNORE to packages already ported to ROS2 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros and switchbot_ros are already ROS2 packages on master, so this PR must not AMENT_IGNORE them. Also remove ros_speech_recognition/AMENT_IGNORE, as this PR ports it to ROS2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Merge branch 'master' into ros2-speech-recognition-only

  • Merge pull request #575 from k-okada/ros2-support Add ROS2 (jazzy) support to chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, respeaker_ros, rospatlite, sesame_ros, switchbot_ros

  • AMENT_IGNORE packages ported to ROS2 in jsk-ros-pkg/jsk_3rdparty#575 chaplus_ros, emotion_analyzer, gdrive_ros, google_chat_ros, influxdb_store, power_switching_tools_ros, rospatlite, sesame_ros and switchbot_ros are ROS1 only here, so the ROS2 CI skips them until #575. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • [google_chat_ros] add ROS2 support Single package.xml/CMakeLists.txt branched on $ROS_VERSION, same as jsk_common's ROS2-ported packages.

    - CMakeLists.txt: the ROS2 block is prepended and the ROS1 original is wrapped in else()/endif() unchanged (no re-indentation). ROS2 generates msg/*.msg and SendMessage.action with rosidl, and installs src/google_chat_ros into the python package that rosidl_generate_interfaces() already installs.

    - package.xml: on ROS2 the python dependencies come from rosdep keys (python3-googleapi, python3-oauth2client, python3-google-cloud-pubsub-pip, python3-gdown-pip, ...) instead of catkin_virtualenv.

    - google_chat.py: its free-standing rospy.log*() calls go through jsk_ros1_ros2_compat's log_utils (imported as [rospy]{.title-ref}). Also fall back to ssl.SSLContext when ssl.wrap_socket() is missing (removed in Python 3.12), so the url receiving mode can start on noble/jazzy.

    - google_chat_ros_node.py: uses rospy_rclpy_compat (get_param, log*, create_publisher, Rate), keeping the ROS1 structure as-is. The send action server uses a small actionlib.SimpleActionServer-like wrapper of rclpy's ActionServer, so rest_cb() is shared. GoogleChatROS() blocks in the url/pubsub receiving modes (rospy spins in its own threads), so on ROS2 the node is spun in a background thread; rospy.on_shutdown() becomes the rclpy context's on_shutdown().

    - jsk_ros1_ros2_compat is only released with jsk_common >= 3.0 (not in noetic/ROS-O yet), so it is a ROS2-only dependency and the scripts fall back to rospy when it is not importable.

    - ROS2 python dependencies: a uv venv made from pyproject.toml/uv.lock (the same versions as requirements.in.python3.12) with jsk_ros1_ros2_compat_generate_uv_venv() (jsk-ros-pkg/jsk_common#1831), in place of rosdep keys, two of which were pip keys that bloom can not release. google_chat_ros_node.py runs with the venv's python3 (install_python(... USE_VENV)); helper.py needs none of them. oauth2client picks up the system pyOpenSSL together with the system cryptography here (neither is in

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