-
Notifications
You must be signed in to change notification settings - Fork 89
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
[database_talker] add database_talker #1388
Open
sktometometo
wants to merge
60
commits into
jsk-ros-pkg:master
Choose a base branch
from
sktometometo:PR/hoge-py
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 6 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
b09f8c2
[database_talker] add database_talker
sktometometo 6389a4a
[database_talker] update gitignore
sktometometo 4612b0c
[database_talker] add empty directories
sktometometo 10ba553
[database_talker] fix hoge.py
sktometometo 5a56b74
[database_talker] fix bugs
sktometometo 5b638ad
Modify hoge.py to work in Fetch1075
tkmtnt7000 00989ff
clean up code, respont to original space etc
k-okada 421a565
use date-period time, optimize translation process
k-okada 862e299
add make aibo diary
k-okada 66c9dba
add message of datas
k-okada f3fd4aa
cleanup make_aibo_diary.py
k-okada b33fa06
check if answer length
k-okada ea37202
fix for python3
k-okada fb3921c
check if complition returns null text
k-okada e9debce
add launch/aibo_example.launch to work with ./make_aibo_diary.py --test
k-okada 9226cc4
scripts/make_aibo_diary.py: cleanup code
k-okada 27d025f
fix to check all image_activities in same day
k-okada 1dee230
[database_talker] update make_aibo_diary.py for spot support
sktometometo afa8f51
[database_talker] add executable permission to make_aibo_diary.py
sktometometo 6d211cd
[database_talker] support roslaunch for make_aibo_diary.py
sktometometo 96ca9b5
[database_talker] use python3 for make_aibo_diary.py
sktometometo 830d364
fix to work on both python2/python3, use robot/type to check filtered…
k-okada 56ef986
add code when too long prompt for image_activities
k-okada ead8861
davesarmoury remove catkin_virutalenv, so use k-okada/openai_ros for now
k-okada c712f63
fix when no data is stored
k-okada 0dcf017
fix typo resut -> result
k-okada a2c18f6
show none when always_action is 0
k-okada 7cdadc8
add new prompt-type, named personality based on Ichikura's comment on…
k-okada bcc7f8c
use VQATaskActionResult to get robot status. Use last seen date for '…
k-okada ffe194d
check length of translated diary, add missing '<Prompt>' word, show o…
k-okada 7878018
add launch/make_aibo_diary.launch
k-okada 6fd0429
minor fix : image_activities duplication, to omany activities, fix as…
k-okada df966c4
move common function into src/databse_talker/__init__.py
k-okada 9162f89
add make_aibo_diary, make_lovot_diary, make_diary
k-okada 2393c47
update README.md
k-okada 714242e
add more depends to package.xml
k-okada 42e114b
src/database_talker/__init__.py: fix for headless mode
k-okada e31b072
put store_image_description into sample/include/
k-okada 2b085e4
add sample/sample.launch
k-okada be2c1ac
update rosinstall
k-okada c361fd4
install store_image_descripton and make_diary.py
k-okada 6278272
use USE_SYSTEM_PACKAGES FALSE to avoid bson error
k-okada bdea63b
add launch/aibo_diary.launch launch/include/database_talker.launch
k-okada d4fdd24
make_aibo_diary.py: need to call super(MessageListner before super(),…
k-okada 80d3f1f
src/database_talker/__init__.py: add info mesage for types
k-okada e1af22e
database_talker/src/database_talker/__init__.py: cleanup debug message
k-okada 83da0d9
launch/include/database_talker.launch: add start_periodic_mongodb_tri…
k-okada 73d38f2
sample/include/store_image_description.py write to /tmp/image.jpg, if…
k-okada fd03657
sample/sample.launch, fix location of resize.launch
k-okada 124a7ae
launch/aibo_diary.launch: start usb_cam, and log aibo data
k-okada f9bb1cd
DatabaseTalkerBase.make_response: write all result images
k-okada 3afe66e
DatabaseTalkerBase.make_response: select most closest images from tim…
k-okada c67cdc1
make_aibo_dairy: support --test-response
k-okada d832ee5
database_talker/__init__.py: add ~message Action Server to check if s…
k-okada 8c058f4
sample/include/store_image_description.py: check if image is black/bl…
k-okada 1883a38
launch/include/database_talker.launch : set respawn true to thorottle…
k-okada 228062a
launch/include/database_talker.launch: add start_mongodb_record_nodel…
k-okada bdc2189
src/database_talker/__init__.py : check is pickle activities start fr…
k-okada e5481d7
scripts/make_lovot_diary.py : lovot need to use yesterday's data, bec…
k-okada e57ac56
add launch/lovot_diary.launch
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
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,3 @@ | ||
auth/* | ||
test_db/* | ||
.vscode/* |
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,17 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(database_talker) | ||
|
||
find_package(catkin REQUIRED COMPONENTS catkin_virtualenv) | ||
|
||
catkin_generate_virtualenv( | ||
PYTHON_INTERPRETER python3 | ||
CHECK_VENV FALSE | ||
) | ||
|
||
catkin_package( | ||
) | ||
|
||
catkin_install_python(PROGRAMS | ||
scripts/hoge.py | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) |
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,34 @@ | ||
# hoge.py | ||
|
||
What is this? | ||
## Requirements | ||
|
||
See `requirements.txt` for python requirements. | ||
|
||
For ROS dependency. | ||
|
||
- `google_chat_ros` in `jsk_3rdparty` with [this improvement](https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/451) | ||
- `dialogflow_client` in `dialogflow_task_executive` package in `jsk_3rdparty` with [this improvement](https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/451) | ||
- `mongodb_store` with https://github.com/strands-project/mongodb_store/pull/282 | ||
- CLIP VQA ros node introduced with https://github.com/jsk-ros-pkg/jsk_recognition/pull/2730. | ||
- `ros_google_cloud_language` package in `jsk_3rdparty` | ||
|
||
## How to use | ||
|
||
1. Setup google chat ros with Cloud Pub/Sub | ||
1. prepare `credential_json` and `project_id` and `subscription_id` | ||
2. Setup dialogflow | ||
1. prepare `credential_json` and `project_id` | ||
3. Setup mongodb_store | ||
1. Create database with mondodb | ||
4. Setup CLIP VQA node | ||
1. Make docker model | ||
2. Run ROS Interface node | ||
5. Setup google cloud natural language | ||
1. Prepare `credential_json` | ||
|
||
And run | ||
|
||
```bash | ||
roslaunch database_talker demo.launch | ||
``` |
Empty file.
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,62 @@ | ||
<launch> | ||
<arg name="INPUT_IMAGE" default="/image"/> | ||
|
||
<!-- config --> | ||
<arg name="use_cam" default="true"/> | ||
|
||
<!-- Dependency modules configuration --> | ||
<arg name="google_chat_cloud_credentials_json" | ||
default="$(find database_talker)/auth/fetch-kiedno-default.json"/> | ||
<arg | ||
name="google_chat_project_id" default="fetch-kiedno"/> | ||
<arg | ||
name="google_chat_subscription_id" default="chat-sub"/> | ||
<arg | ||
name="dialogflow_credentials_json" | ||
default="$(find database_talker)/auth/fetch-kiedno-dialogflow.json"/> | ||
<arg | ||
name="dialogflow_project_id" default="axial-iris-343006"/> | ||
<arg name="mongodb_path" | ||
default="$(find database_talker)/test_db"/> | ||
<arg name="google_natural_launguage_credentials_json" | ||
default="$(find database_talker)/auth/eternal-byte-236613-4bc6962824d1.json"/> | ||
|
||
<!-- Dependency modules --> | ||
<include | ||
file="$(find google_chat_ros)/launch/google_chat.launch"> | ||
<arg name="receiving_mode" value="pubsub"/> | ||
<arg name="google_cloud_credentials_json" value="$(arg google_chat_cloud_credentials_json)"/> | ||
<arg name="project_id" value="$(arg google_chat_project_id)"/> | ||
<arg name="subscription_id" value="$(arg google_chat_subscription_id)"/> | ||
</include> | ||
<include | ||
file="$(find dialogflow_task_executive)/launch/dialogflow_ros.launch"> | ||
<arg name="use_tts" value="false"/> | ||
<arg name="credential" value="$(arg dialogflow_credentials_json)"/> | ||
<arg name="project_id" value="$(arg dialogflow_project_id)"/> | ||
</include> | ||
<include | ||
file="$(find mongodb_store)/launch/mongodb_store.launch"> | ||
<arg name="db_path" value="$(arg mongodb_path)"/> | ||
</include> | ||
<include file="$(find jsk_perception)/launch/classification.launch"> | ||
<arg name="run_api" value="true"/> | ||
<arg name="CLASSIFICATION_INPUT_IMAGE" value="$(arg INPUT_IMAGE)"/> | ||
</include> | ||
<include file="$(find ros_google_cloud_language)/launch/analyze_text.launch"> | ||
<arg name="google_cloud_credentials_json" | ||
value="$(arg google_natural_launguage_credentials_json)"/> | ||
</include> | ||
|
||
<group if="$(arg use_cam)"> | ||
<node pkg="usb_cam" type="usb_cam_node" name="usb_cam_node"> | ||
<remap from="~image_raw" to="$(arg INPUT_IMAGE)"/> | ||
<rosparam> | ||
pixel_format: yuyv | ||
</rosparam> | ||
</node> | ||
</group> | ||
|
||
<node pkg="database_talker" type="hoge.py" name="hoge" output="screen"> | ||
</node> | ||
</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 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>database_talker</name> | ||
<version>0.0.0</version> | ||
<description>The database_talker package</description> | ||
|
||
<maintainer | ||
email="[email protected]">sktometometo</maintainer> | ||
|
||
<license>TODO</license> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
<build_depend>catkin_virtualenv</build_depend> | ||
|
||
|
||
<export> | ||
<pip_requirements>requirements.txt</pip_requirements> | ||
</export> | ||
</package> |
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,2 @@ | ||
bson | ||
pymongo |
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,12 @@ | ||
- git: | ||
local-name: jsk-ros-pkg/jsk_3rdparty | ||
uri: https://github.com/k-okada/jsk_3rdparty.git | ||
version: add_more_functions | ||
- git: | ||
local-name: jsk-ros-pkg/jsk_recognition | ||
uri: https://github.com/mqcmd196/jsk_recognition.git | ||
version: PR/large-scale-vil | ||
- git: | ||
local-name: strands-project/mongodb_store | ||
uri: https://github.com/k-okada/mongodb_store.git | ||
version: patch-1 |
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.
I think this and other nodes that need GPU should split launch file because those nodes are usually launched at remote PC such as dlbox.
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.
Or another option, we may use something like
machine tag
and these inference nodes automatically launches at remote PC.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.
@mqcmd196 will privde 24/7 API service at dlbox until 12:00 today, so we only set 'run_api' to false and add
host
here.