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

[database_talker] add database_talker #1388

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 Apr 13, 2023
6389a4a
[database_talker] update gitignore
sktometometo Apr 13, 2023
4612b0c
[database_talker] add empty directories
sktometometo Apr 13, 2023
10ba553
[database_talker] fix hoge.py
sktometometo Apr 13, 2023
5a56b74
[database_talker] fix bugs
sktometometo Apr 13, 2023
5b638ad
Modify hoge.py to work in Fetch1075
tkmtnt7000 Apr 13, 2023
00989ff
clean up code, respont to original space etc
k-okada Apr 26, 2023
421a565
use date-period time, optimize translation process
k-okada Jun 1, 2023
862e299
add make aibo diary
k-okada Nov 21, 2023
66c9dba
add message of datas
k-okada Nov 21, 2023
f3fd4aa
cleanup make_aibo_diary.py
k-okada Nov 22, 2023
b33fa06
check if answer length
k-okada Nov 22, 2023
ea37202
fix for python3
k-okada Nov 22, 2023
fb3921c
check if complition returns null text
k-okada Nov 22, 2023
e9debce
add launch/aibo_example.launch to work with ./make_aibo_diary.py --test
k-okada Nov 28, 2023
9226cc4
scripts/make_aibo_diary.py: cleanup code
k-okada Nov 29, 2023
27d025f
fix to check all image_activities in same day
k-okada Nov 29, 2023
1dee230
[database_talker] update make_aibo_diary.py for spot support
sktometometo Nov 29, 2023
afa8f51
[database_talker] add executable permission to make_aibo_diary.py
sktometometo Nov 29, 2023
6d211cd
[database_talker] support roslaunch for make_aibo_diary.py
sktometometo Nov 29, 2023
96ca9b5
[database_talker] use python3 for make_aibo_diary.py
sktometometo Nov 29, 2023
830d364
fix to work on both python2/python3, use robot/type to check filtered…
k-okada Nov 29, 2023
56ef986
add code when too long prompt for image_activities
k-okada Nov 29, 2023
ead8861
davesarmoury remove catkin_virutalenv, so use k-okada/openai_ros for now
k-okada Dec 15, 2023
c712f63
fix when no data is stored
k-okada Jan 13, 2024
0dcf017
fix typo resut -> result
k-okada Jan 13, 2024
a2c18f6
show none when always_action is 0
k-okada Feb 19, 2024
7cdadc8
add new prompt-type, named personality based on Ichikura's comment on…
k-okada Feb 19, 2024
bcc7f8c
use VQATaskActionResult to get robot status. Use last seen date for '…
k-okada Feb 22, 2024
ffe194d
check length of translated diary, add missing '<Prompt>' word, show o…
k-okada Feb 27, 2024
7878018
add launch/make_aibo_diary.launch
k-okada Mar 17, 2024
6fd0429
minor fix : image_activities duplication, to omany activities, fix as…
k-okada Mar 17, 2024
df966c4
move common function into src/databse_talker/__init__.py
k-okada Mar 27, 2024
9162f89
add make_aibo_diary, make_lovot_diary, make_diary
k-okada Mar 27, 2024
2393c47
update README.md
k-okada Mar 29, 2024
714242e
add more depends to package.xml
k-okada Mar 29, 2024
42e114b
src/database_talker/__init__.py: fix for headless mode
k-okada Mar 29, 2024
e31b072
put store_image_description into sample/include/
k-okada Mar 29, 2024
2b085e4
add sample/sample.launch
k-okada Mar 29, 2024
be2c1ac
update rosinstall
k-okada Mar 29, 2024
c361fd4
install store_image_descripton and make_diary.py
k-okada Mar 29, 2024
6278272
use USE_SYSTEM_PACKAGES FALSE to avoid bson error
k-okada Apr 3, 2024
bdea63b
add launch/aibo_diary.launch launch/include/database_talker.launch
k-okada Apr 12, 2024
d4fdd24
make_aibo_diary.py: need to call super(MessageListner before super(),…
k-okada Apr 14, 2024
80d3f1f
src/database_talker/__init__.py: add info mesage for types
k-okada Apr 14, 2024
e1af22e
database_talker/src/database_talker/__init__.py: cleanup debug message
k-okada Apr 25, 2024
83da0d9
launch/include/database_talker.launch: add start_periodic_mongodb_tri…
k-okada Apr 25, 2024
73d38f2
sample/include/store_image_description.py write to /tmp/image.jpg, if…
k-okada Apr 25, 2024
fd03657
sample/sample.launch, fix location of resize.launch
k-okada Apr 25, 2024
124a7ae
launch/aibo_diary.launch: start usb_cam, and log aibo data
k-okada Apr 25, 2024
f9bb1cd
DatabaseTalkerBase.make_response: write all result images
k-okada Apr 26, 2024
3afe66e
DatabaseTalkerBase.make_response: select most closest images from tim…
k-okada Apr 26, 2024
c67cdc1
make_aibo_dairy: support --test-response
k-okada Apr 26, 2024
d832ee5
database_talker/__init__.py: add ~message Action Server to check if s…
k-okada Apr 26, 2024
8c058f4
sample/include/store_image_description.py: check if image is black/bl…
k-okada Apr 26, 2024
1883a38
launch/include/database_talker.launch : set respawn true to thorottle…
k-okada Apr 26, 2024
228062a
launch/include/database_talker.launch: add start_mongodb_record_nodel…
k-okada Jun 14, 2024
bdc2189
src/database_talker/__init__.py : check is pickle activities start fr…
k-okada Aug 1, 2024
e5481d7
scripts/make_lovot_diary.py : lovot need to use yesterday's data, bec…
k-okada Aug 1, 2024
e57ac56
add launch/lovot_diary.launch
k-okada Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions database_talker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
auth/*
test_db/*
.vscode/*
17 changes: 17 additions & 0 deletions database_talker/CMakeLists.txt
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}
)
34 changes: 34 additions & 0 deletions database_talker/README.md
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 added database_talker/auth/.keepme
Empty file.
62 changes: 62 additions & 0 deletions database_talker/launch/demo.launch
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>
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

<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>
19 changes: 19 additions & 0 deletions database_talker/package.xml
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>
2 changes: 2 additions & 0 deletions database_talker/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bson
pymongo
12 changes: 12 additions & 0 deletions database_talker/rosinstall
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
Loading