Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dialogflow_task_executive] add sample apps #293

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions dialogflow_task_executive/apps/app.installed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apps:
- app: dialogflow_task_executive/sample_app
display: sample dialogflow app
4 changes: 4 additions & 0 deletions dialogflow_task_executive/apps/sample_app/sample_app.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
display: sample dialogflow app
platform: dummy
launch: dialogflow_task_executive/sample_app.xml
interface: dialogflow_task_executive/sample_app.interface
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
published_topics: {}
subscribed_topics: {}
6 changes: 6 additions & 0 deletions dialogflow_task_executive/apps/sample_app/sample_app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<arg name="place" default="Tokyo"/>
<node name="sample_app_print" pkg="dialogflow_task_executive" type="sample_app_print.py" output="screen">
<param name="place" value="$(arg place)"/>
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<launch>
<arg name="run_app_manager" default="false" />
<arg name="applist" default="" />
<arg name="applist" default="$(find dialogflow_task_executive)/apps"/>
<arg name="credential" default="$(optenv GOOGLE_APPLICATION_CREDENTIALS false)" doc="Read credentials JSON from this value when use_yaml is false." />
<arg name="project_id" default="$(optenv DIALOGFLOW_PROJECT_ID false)"/>
<arg name="enable_hotword" default="true" />
Expand Down Expand Up @@ -42,6 +42,10 @@
</node>

<group if="$(arg run_app_manager)">
<rosparam>
/robot/type: dummy
/robot/name: test
</rosparam>
<node pkg="app_manager" type="appmaster" name="appmaster"
args="-p 11313"/>
<node pkg="app_manager" type="app_manager" name="app_manager"
Expand Down
21 changes: 21 additions & 0 deletions dialogflow_task_executive/node_scripts/sample_app_print.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

import rospy

def main():

rospy.init_node('sample_app_print')

place = rospy.get_param('~place')

timeout = rospy.Time.now() + rospy.Duration(10)

rate = rospy.Rate(10)
while not rospy.is_shutdown() and rospy.Time.now() < timeout:
rate.sleep()
rospy.loginfo('I come from {}'.format(place))


if __name__=='__main__':
main()
1 change: 1 addition & 0 deletions dialogflow_task_executive/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<export>
<pip_requirements>requirements.txt</pip_requirements>
<app_manager app_dir="${prefix}/apps"/>
</export>

</package>