-
Notifications
You must be signed in to change notification settings - Fork 97
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
add sample launch code for database_talker #1792
Open
k-okada
wants to merge
8
commits into
jsk-ros-pkg:master
Choose a base branch
from
k-okada:ichikura_sample
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
601ffd4
add sample launch code for database_talker
k-okada 475fb49
use override_project_id, to work with latest commit of https://github…
k-okada 871cdf5
add override_project_id to true
k-okada f0c1857
jsk_robot_startup/launch/interaction.launch, jsk_robot_startup/launch…
k-okada 5435c45
addfl ogger_{save_speech,save_google_chat, save_video_to_scene}
k-okada a0ee0ed
add logger_save_throttled_image arg to jsk_robot_startup/launch/lifel…
k-okada 5922b78
jsk_robot_startup/launch/lifelog.launch: add start_mongodb_record_nod…
k-okada bb1e569
jsk_robot_startup/launch/lifelog.launch: fix typo ture -> true
k-okada File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
jsk_robot_common/jsk_robot_startup/launch/interaction.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<launch> | ||
<!-- | ||
THIS NODE REQURES jsk_3rdparty >= 2.1.25, melodic user need to install jsk_3rdparty from source tree | ||
|
||
google_chat/dialogflow_task_executive which uses `override_project_id` | ||
https://github.com/jsk-ros-pkg/jsk_3rdparty/blob/master/dialogflow_task_executive/CHANGELOG.rst#2125-2023-06-08 | ||
https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/460 | ||
|
||
ros_google_cloud_language >= 2.1.25 | ||
https://github.com/jsk-ros-pkg/jsk_3rdparty/blob/master/ros_google_cloud_language/CHANGELOG.rst | ||
--> | ||
<!-- strelka --> | ||
<arg name="google_chat_credentials_json" default="$(find jsk_robot_startup)/auth/tribal-quasar-343006-1025e6fc703f.json" /> | ||
<arg name="project_id" default="tribal-quasar-343006" /> | ||
|
||
<!-- common settings --> | ||
<arg name="openai_credentials_json" default="$(find jsk_robot_startup)/auth/openai_credentials.json" /> | ||
|
||
<arg name="google_credentials_json" default="$(find jsk_robot_startup)/auth/eternal-byte-236613-4bc6962824d1.json" /> | ||
|
||
<arg name="chat_use_helper" default="true" doc="set false when your program respond to chat" /> | ||
|
||
<!-- Google Chat ROS --> | ||
<include file="$(find google_chat_ros)/launch/google_chat.launch"> | ||
<arg name="receiving_mode" value="pubsub" /> | ||
<arg name="project_id" value="$(arg project_id)" /> | ||
<arg name="override_project_id" value="true" /> | ||
<arg name="subscription_id" value="chat-sub" /> | ||
<arg name="respawn" value="true" /> | ||
<arg name="google_cloud_credentials_json" value="$(arg google_chat_credentials_json)"/> | ||
<arg name="to_dialogflow_client" value="false" /> | ||
<arg name="use_helper" value="$(arg chat_use_helper)" /> | ||
</include> | ||
|
||
<!-- Dialogflow Client ROS --> <!-- this requires https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/460 --> | ||
<include file="$(find dialogflow_task_executive)/launch/dialogflow_ros.launch"> | ||
<arg name="credential" value="$(arg google_credentials_json)" /> | ||
<arg name="project_id" value="collaborative-remembering-kwit" /> | ||
<arg name="enable_hotword" value="false" /> | ||
<arg name="override_project_id" value="true" /> | ||
</include> | ||
|
||
<!-- Google Cloud Language --> | ||
<include file="$(find ros_google_cloud_language)/launch/analyze_text.launch"> | ||
<arg name="google_cloud_credentials_json" value="$(arg google_credentials_json)" /> | ||
</include> | ||
|
||
<!-- gdrive_ros --> | ||
<include file="$(find gdrive_ros)/launch/gdrive_server.launch"> | ||
<arg name="settings_yaml" value="$(find jsk_robot_startup)/auth/pydrive_settings.yaml" /> | ||
<arg name="respawn" value="true" /> | ||
<arg name="node_name" value="gdrive_ros" /> | ||
</include> | ||
|
||
<!-- openai_ros --> | ||
<group ns="openai"> | ||
<node pkg="openai_ros" type="openai_node.py" name="openai" output="screen"> | ||
<rosparam command="load" file="$(arg openai_credentials_json)" /> | ||
</node> | ||
</group> | ||
Comment on lines
+55
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a comment. |
||
|
||
|
||
</launch> |
162 changes: 162 additions & 0 deletions
162
jsk_robot_common/jsk_robot_startup/launch/lifelog.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
<launch> | ||
<!-- | ||
THIS NODE REQURES jsk_perception >= 1.2.16, melodic user need to install jsk_perception from source tree | ||
|
||
https://github.com/jsk-ros-pkg/jsk_recognition/pull/2736 | ||
--> | ||
<arg name="use_mail" default="false" /> | ||
<arg name="min_percent" default="5" doc="parameter for video_to_scene"/> | ||
<arg name="max_percent" default="15" doc="parameter for video_to_scene"/> | ||
|
||
<arg name="logger_save_rgb" default="false" /> | ||
<arg name="logger_save_depth" default="false" /> | ||
<arg name="logger_save_tf" default="false" /> | ||
<arg name="logger_save_joint_states" default="false" /> | ||
<arg name="logger_save_base_trajectory" default="false" /> | ||
<arg name="logger_save_object_detection" default="false" /> | ||
<arg name="logger_save_action" default="false" /> | ||
<arg name="logger_save_smach" default="false" /> | ||
<arg name="logger_save_speech" default="false" /> | ||
<arg name="logger_save_faces" default="false" /> | ||
<arg name="logger_save_dialogflow" default="false" /> | ||
<arg name="logger_save_google_chat" default="false" /> | ||
<arg name="logger_save_app" default="false" /> | ||
<arg name="logger_save_video_to_scene" default="false" /> | ||
<arg name="logger_map_frame" default="odom" /> | ||
<arg name="logger_save_throttled_image" default="true" /> | ||
|
||
<arg name="start_mongodb_record_nodelet_manager" default="true" /> | ||
<arg name="start_mongodb" default="true" /> | ||
<arg name="start_camera_throttle_nodelet" default="true" /> | ||
|
||
<arg name="image" default="usb_cam/image_raw" /> | ||
|
||
<param name="robot/database" value="jsk_robot_lifelog"/> | ||
|
||
<!-- logging database --> | ||
<group if="$(arg start_mongodb)" > | ||
<param name="mongodb_replicate_on_write" value="true" /> <!-- need to set True to query from extra serveres, otherwise it only query from local server --> | ||
<include file="$(find jsk_robot_startup)/lifelog/mongodb.launch"> | ||
<arg name="use_daemon" value="true"/> | ||
<arg name="port" value="27017" /> | ||
<arg name="repl_set_mode" value="false" /> | ||
<arg name="replicate" default="true" /> | ||
</include> | ||
</group> | ||
|
||
<group if="$(arg use_mail)" > | ||
<node pkg="jsk_robot_startup" type="email_topic.py" name="email_topic" output="screen" /> | ||
|
||
<node name="smach_to_mail" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen"> | ||
<remap from="~smach/container_status" to="/server_name/smach/container_status" /> | ||
<param name="sender_address" command='python -c "import rospy;print(rospy.get_param(\"robot/name\")+\"@jsk.imi.i.u-tokyo.ac.jp\")"' /> | ||
<param name="receiver_address" command='python -c "import rospy;print(rospy.get_param(\"robot/type\")+\"@jsk.imi.i.u-tokyo.ac.jp\")"' /> | ||
</node> | ||
</group> | ||
|
||
<include file="$(find jsk_robot_startup)/lifelog/common_logger.launch"> | ||
<arg name="save_rgb" value="$(arg logger_save_rgb)" /> | ||
<arg name="save_depth" value="$(arg logger_save_depth)" /> | ||
<arg name="save_tf" value="$(arg logger_save_tf)" /> | ||
<arg name="save_joint_states" value="$(arg logger_save_joint_states)" /> | ||
<arg name="save_base_trajectory" value="$(arg logger_save_base_trajectory)" /> | ||
<arg name="save_object_detection" value="$(arg logger_save_object_detection)" /> | ||
<arg name="save_action" value="$(arg logger_save_action)" /> | ||
<arg name="save_smach" value="$(arg logger_save_smach)" /> | ||
<arg name="save_faces" value="$(arg logger_save_faces)" /> | ||
<arg name="save_speech" value="$(arg logger_save_speech)" /> | ||
<arg name="save_dialogflow" value="$(arg logger_save_dialogflow)" /> | ||
<arg name="save_google_chat" value="$(arg logger_save_google_chat)" /> | ||
<arg name="save_app" value="$(arg logger_save_app)" /> | ||
|
||
<arg name="enable_monitor" value="false" /> | ||
<arg name="log_rate" value="1.0" /> | ||
<arg name="launch_manager" value="$(arg start_mongodb_record_nodelet_manager)" /> | ||
<arg name="manager" value="mongodb_record_nodelet_manager" /> | ||
<arg name="map_frame_id" value="$(arg logger_map_frame)" /> | ||
<arg name="approximate_sync" value="true"/> | ||
</include> | ||
|
||
<!-- outputs $(arg image)/output/compressed when new scene found --> | ||
<include if="$(arg logger_save_video_to_scene)" | ||
file="$(find jsk_perception)/launch/video_to_scene.launch" > | ||
<arg name="INPUT_IMAGE" value="$(arg image)" /> | ||
<arg name="IMAGE_TRANSPORT" default="compressed" /> | ||
<arg name="launch_manager" value="true" /> | ||
<arg name="manager" value="vidoe_to_scene_nodelet_manager" /> | ||
<arg name="min_percent" value="$(arg min_percent)" /> | ||
<arg name="max_percent" value="$(arg max_percent)" /> | ||
</include> | ||
|
||
<!-- publish /publish_trigger_mongodb_event when video_to_scene, */class or dialogflow are detected --> | ||
<node if="$(arg logger_save_video_to_scene)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_video_to_scene" | ||
args="--wait-for-start $(arg image)/output/compressed /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=m.header.stamp, frame_id=m._connection_header["callerid"])' --import std_msgs" /> | ||
|
||
<node if="$(arg logger_save_faces)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_event_aws_auto_checkin" | ||
args="--wait-for-start /aws_auto_checkin_app/output/class /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=m.header.stamp, frame_id=m._connection_header["callerid"])' --import std_msgs" /> | ||
<node if="$(arg logger_save_faces)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_event_aws_detect_faces" | ||
args="--wait-for-start /aws_detect_faces/attributes /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=m.header.stamp, frame_id=m._connection_header["callerid"])' --import std_msgs" /> | ||
<node if="$(arg logger_save_dialogflow)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_event_dialogflow_client" | ||
args="--wait-for-start /dialogflow_client/text_action/result /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=m.header.stamp, frame_id=m._connection_header["callerid"])' --import std_msgs" /> | ||
<node if="$(arg logger_save_google_chat)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_event_google_chat_ros_send_goal" | ||
args="--wait-for-start /google_chat_ros/send/goal /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=m.header.stamp, frame_id=m._connection_header["callerid"])' --import std_msgs" /> | ||
<node if="$(arg logger_save_google_chat)" | ||
pkg="topic_tools" type="transform" name="publish_trigger_mongodb_event_google_chat_ros_message_activity" | ||
args="--wait-for-start /google_chat_ros/message_activity /publish_trigger_mongodb_event std_msgs/Header | ||
'std_msgs.msg.Header(stamp=rospy.Time.now(), frame_id=m._connection_header["callerid"])' --import std_msgs rospy" /> | ||
|
||
<!-- republish compressed/throttled image data only when /publish_trigger_mongodb_event is published --> | ||
<node name="camera_throttle_nodelet" | ||
pkg="nodelet" type="nodelet" | ||
args="load jsk_topic_tools/SynchronizedThrottle mongodb_record_nodelet_manager" | ||
if="$(arg start_camera_throttle_nodelet)" > | ||
<rosparam subst_value="true"> | ||
approximate_sync: true | ||
topics: | ||
- /publish_trigger_mongodb_event | ||
- $(arg image)/compressed | ||
</rosparam> | ||
</node> | ||
|
||
<!-- store thottled image --> | ||
<group ns="lifelog" if="$(arg logger_save_throttled_image)" > | ||
<include file="$(find jsk_robot_startup)/lifelog/lifelog_rgb_image.launch" > | ||
<arg name="node_name" value="hand_color_logger" /> | ||
<arg name="image" value="$(arg image)/compressed/throttled" /> | ||
<arg name="manager" value="mongodb_record_nodelet_manager" /> | ||
</include> | ||
</group> | ||
|
||
<!-- save classification data --> | ||
<!-- sample code for object detection | ||
<node name="classification_logger" | ||
pkg="jsk_robot_startup" type="mongo_record.py" > | ||
<rosparam subst_value="true"> | ||
topics: | ||
- /spot/ncb_provider/hand_color_image/class | ||
</rosparam> | ||
</node> | ||
--> | ||
|
||
<!-- save bbox data --> | ||
<!-- sample code for object detection | ||
<node name="bbox_logger" | ||
pkg="jsk_robot_startup" type="mongo_record.py" > | ||
<rosparam subst_value="true"> | ||
topics: | ||
- /spot/ncb_provider/bbox_array | ||
</rosparam> | ||
</node> | ||
--> | ||
|
||
</launch> |
19 changes: 19 additions & 0 deletions
19
jsk_robot_common/jsk_robot_startup/lifelog/lifelog_rgb_image.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<launch> | ||
<arg name="launch_manager" default="true" /> | ||
<arg if="$(arg launch_manager)" name="manager" default="mongodb_record_nodelet_manager" /> | ||
<arg unless="$(arg launch_manager)" name="manager" /> | ||
<arg name="respawn" default="false" /> | ||
<arg name="image" default="image" /> | ||
<arg name="node_name" default="rgb_image_logger" /> | ||
|
||
<node name="$(arg node_name)" | ||
pkg="nodelet" type="nodelet" | ||
args="load jsk_robot_lifelog/LightweightLogger /$(arg manager)" | ||
respawn="$(arg respawn)"> | ||
<remap from="~input" to="$(arg image)" /> | ||
<rosparam subst_value="true"> | ||
enable_monitor: false | ||
vital_check: false | ||
</rosparam> | ||
</node> | ||
</launch> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
Use jsk-ros-pkg/jsk_3rdparty#460