Skip to content

Commit

Permalink
Merge pull request #408 from knorth55/dialogflow-client-indigo
Browse files Browse the repository at this point in the history
[dialogflow_task_executive] check if ROS_PYTHON_VERSION is set to support indigo in dialogflow_client
  • Loading branch information
k-okada authored Dec 15, 2022
2 parents 33b54d0 + 3096e75 commit b9e90d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dialogflow_task_executive/node_scripts/dialogflow_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def make_dialog_msg(self, result):
rospy.logwarn("Unknown action")
msg.action = result.action

if self.language == 'ja-JP' and os.environ["ROS_PYTHON_VERSION"] == "2":
# check if ROS_PYTHON_VERSION exists in indigo
if (self.language == 'ja-JP'
and ("ROS_PYTHON_VERSION" not in os.environ
or os.environ["ROS_PYTHON_VERSION"] == "2")):
msg.query = result.query_text.encode("utf-8")
msg.response = result.fulfillment_text.encode("utf-8")
else:
Expand Down

0 comments on commit b9e90d6

Please sign in to comment.