No version for distro humble showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro jazzy showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro kilted showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro lyrical showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro rolling showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro ardent showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro bouncy showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro crystal showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro eloquent showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro dashing showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro galactic showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro foxy showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

No version for distro iron showing lunar. 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

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange

Package Summary

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

Repository Summary

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

Package Description

The ROS package for chaplus service

Maintainers

  • Kei Okada

Authors

  • Ayaka Fujii

chaplus_ros

A chatbot node: it sends the text received on request to a chat API on the web and publishes the reply on response. Three engines are supported: mebo (default), A3RT Talk API and Chaplus (the Chaplus service ended on August 31, 2022; the code is kept). The same script runs on ROS 1 and ROS 2.

Requirements

An API key of the engine, in a JSON file given by the ~chaplus_apikey_file parameter:

{"apikey_mebo": "<mebo API key>",
 "agentid_mebo": "<mebo agent ID>",
 "uid_mebo": "<any user ID of the conversation>",
 "apikey_a3rt": "<A3RT Talk API key>",
 "apikey": "<Chaplus API key>"}

Only the keys of the engine in use are read.

  • mebo: create an account and an agent at https://mebo.work/ and take the API key and the agent ID from the API settings of the agent (see also https://qiita.com/maKunugi/items/14f1b82a2c0b6fa5c202). uid_mebo is a user ID of your choice; mebo keeps the context of the conversation per user ID.
  • A3RT: register at https://a3rt.recruit.co.jp/product/talkAPI/registered/ and the API key is sent by e-mail.
  • JSK members can download a ready apikey.json from Google Drive.

The node needs access to the internet (the endpoints are fixed in the code).

Usage

ROS 2

There is no ROS 2 launch file; run the node:

ros2 run chaplus_ros chaplus_ros.py --ros-args \
  -p chatbot_engine:=Mebo -p chaplus_apikey_file:=$HOME/Downloads/apikey.json -p use_sample:=false

Talk to it:

ros2 topic echo /response &
ros2 topic pub --once /request std_msgs/msg/String "{data: 'おはよう'}"

ROS 1

rosrun chaplus_ros chaplus_ros.py _chatbot_engine:=Mebo _chaplus_apikey_file:=$HOME/Downloads/apikey.json _use_sample:=false
rostopic echo /response &
rostopic pub -1 /request std_msgs/String "data: 'おはよう'"

sample/google_example.launch (ROS 1 only) connects it to speech recognition and speech synthesis:

roslaunch chaplus_ros google_example.launch chaplus_apikey_file:=$HOME/Downloads/apikey.json

Argument Default Description
chatbot_engine Mebo Mebo, A3RT or Chaplus
use_sample false Send communication_sample.json with each request (Chaplus only)
use_respeaker true true: relay /speech_to_text (speech_recognition_msgs/SpeechRecognitionCandidates, e.g. of respeaker_ros) to /request. false: start aques_talk and ros_speech_recognition (GoogleCloud engine) and relay /Tablet/voice to /request
chaplus_apikey_file $(find chaplus_ros)/apikey.json The API key file

The reply on /response is relayed to /robotsound_jp (sound_play/SoundRequest). With use_respeaker:=false, edit the /speech_recognition/google_cloud_credentials_json parameter in the launch file to your Google Cloud key (see ros_speech_recognition).

Try a conversation with rostopic:

# terminal 1
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['おはよう']
confidence: [0]"
rostopic pub -1 /speech_to_text speech_recognition_msgs/SpeechRecognitionCandidates "transcript: ['何色が好き?']
confidence: [0]"
# terminal 2
rostopic echo --filter "print(m.arg)" /robotsound_jp
おはようございます!
私の好きな色は緑です。気持ちが落ち着きますよね。

Interface

chaplus_ros.py

Subscribed topics

  • request (std_msgs/String): the utterance to the chatbot.

Published topics

  • response (std_msgs/String): the reply of the chatbot; ごめんなさい、よくわからないです when the request fails.

Parameters

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package chaplus_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>>

  • [chaplus_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). The installed ROS2 copy of chaplus_ros.py gets a python3 shebang, since ROS2 base images ship no bare [python]{.title-ref}. apikey.json/communication_sample.json are installed to share/ since ROS2 has no rospack source lookup.

    - chaplus_ros.py: uses jsk_ros1_ros2_compat's rospy_rclpy_compat (get_param, log*, create_publisher/subscription), keeping the ROS1 structure as-is.

    - 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 script falls back to forwarding ros_compat.xxx(node, ...) to rospy.xxx(...) when it is not importable.

    - Initialize response_json in topic_cb(); it was unbound when the HTTP request raised, which rospy only logged but kills the rclpy node.

    - The ROS2 scripts are installed with jsk_ros1_ros2_compat's jsk_ros1_ros2_compat_install_python() (python3 shebang), from jsk-ros-pkg/jsk_common#1832, as a ROS2-only buildtool_depend (>= 3.0.2) that stays off rosidl's build dependencies. main: ros_compat.init_node()/spin() instead of the ROS_VERSION branch (jsk-ros-pkg/jsk_common#1831; ROS1 fallback forwards them to rospy). ROS2 exec_depend on jsk_ros1_ros2_compat >= 3.0.2. Co-Authored-By: Claude Opus 5.5 <<noreply@anthropic.com>>

  • Contributors: Kei Okada

2.1.31 (2025-05-13)

2.1.30 (2025-05-10)

2.1.29 (2025-01-05)

2.1.28 (2023-07-24)

File truncated at 100 lines see the full file

Dependant Packages

No known dependants.

Launch files

  • sample/google_example.launch
      • chatbot_engine [default: Mebo]
      • use_sample [default: false]
      • use_respeaker [default: true] — set false if you do not use respeaker
      • chaplus_apikey_file [default: $(find chaplus_ros)/apikey.json]
      • engine [default: GoogleCloud]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged chaplus_ros at Robotics Stack Exchange