From e2f9b6c0120f9cd63dce99e82527f595635aaa5c Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Sun, 3 Oct 2021 19:56:29 +0900 Subject: [PATCH 01/14] [switchbot_ros] update ReadMe.md --- switchbot_ros/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/switchbot_ros/README.md b/switchbot_ros/README.md index 982cffec2..11a212fd5 100644 --- a/switchbot_ros/README.md +++ b/switchbot_ros/README.md @@ -15,7 +15,9 @@ JSK members can edit the original file [here](https://docs.google.com/presentati Especially, please set your device name and enable cloud service. 3. Get your token -On switchbot App, profile -> settings, and press `version` for 10 times and you can get token. For JSK members, we already have shared one [here](https://drive.google.com/file/d/1YZ4P4aaPemB_umB9S0xDG66BJt59-2lz/view?usp=sharing). +On switchbot App, profile -> settings, and press `version` for 10 times and you can get token. + +For JSK members, please see [this slide](https://docs.google.com/presentation/d/11UkuxVT4u_LcAYJQnPvt4mzxos9Qvflth5hgZmtqmyk/edit?usp=sharing) for account and token details and installed switchbots for our lab. ### Using switchbot ros Execute `roslaunch switchbot_ros switchbot.launch token:=YOUR_TOKEN` and publish ActionGoal. From e53eab88c287e2dde7f2a38dfc6d1483b1e453dd Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Tue, 9 Nov 2021 16:23:44 +0900 Subject: [PATCH 02/14] [gdrive_ros] add gdrive_ros client --- gdrive_ros/euslisp/gdrive-ros-utils.l | 72 +++++++++++++++++++ gdrive_ros/euslisp/sample-gdrive-ros-client.l | 24 +++++++ gdrive_ros/launch/demo.launch | 21 ++++++ 3 files changed, 117 insertions(+) create mode 100644 gdrive_ros/euslisp/gdrive-ros-utils.l create mode 100755 gdrive_ros/euslisp/sample-gdrive-ros-client.l create mode 100644 gdrive_ros/launch/demo.launch diff --git a/gdrive_ros/euslisp/gdrive-ros-utils.l b/gdrive_ros/euslisp/gdrive-ros-utils.l new file mode 100644 index 000000000..6b99c535f --- /dev/null +++ b/gdrive_ros/euslisp/gdrive-ros-utils.l @@ -0,0 +1,72 @@ +(ros::load-ros-manifest "gdrive_ros") + +(defun wait-for-gdrive-server (&rest args) + (if args + (ros::wait-for-service "/gdrive_ros/upload" args) + (ros::wait-for-service "/gdrive_ros/upload" args) + ) + ) + +(defun upload-file (file-path + file-title + &key + (parents-path nil) + (parents-id nil) + (use-timestamp-folder nil) + (use-timestamp-file-title nil)) + (let ((req (instance gdrive_ros::UploadRequest :init)) + (res nil)) + (if (and (not parents-path) (not parents-id)) + (progn + (ros::log-error "Both of parents-path and parents-id cannot be nil.") + (return-from upload-file nil) + ) + nil) + (send req :file_path file-path) + (send req :file_title file-title) + (send req :parents_path parents-path) + (send req :parents_id parents-id) + (send req :use_timestamp_folder use-timestamp-folder) + (send req :use_timestamp_file_title use-timestamp-file-title) + (setq res (ros::service-call "/gdrive_ros/upload" req t)) + (if (send res :success) + (list (send res :success) + (send res :file_id) + (send res :file_url) + (send res :parents_id) + (send res :parents_url)) + (progn + (ros::log-error "Failed to upload.") + nil + )) + )) + +(defun upload-multiple-files + (file-paths + file-titles + &key + (parents-path nil) + (parents-id nil) + (use-timestamp-folder nil) + (use-timestamp-file-title nil)) + (let ((req (instance gdrive_ros::MultipleUploadRequest :init)) + (res nil)) + (if (and (not parents-path) (not parents-id)) + (progn + (ros::log-error "Both of parents-path and parents-id cannot be nil.") + (return-from upload-file nil) + ) + nil) + (send req :file_paths file-paths) + (send req :file_titles file-titles) + (send req :parents_path parents-path) + (send req :parents_id parents-id) + (send req :use_timestamp_folder use-timestamp-folder) + (send req :use_timestamp_file_title use-timestamp-file-title) + (setq res (ros::service-call "/gdrive_ros/upload_multi" req t)) + (list (send res :successes) + (send res :file_ids) + (send res :file_urls) + (send res :parents_id) + (send res :parents_url)) + )) diff --git a/gdrive_ros/euslisp/sample-gdrive-ros-client.l b/gdrive_ros/euslisp/sample-gdrive-ros-client.l new file mode 100755 index 000000000..be6037b0a --- /dev/null +++ b/gdrive_ros/euslisp/sample-gdrive-ros-client.l @@ -0,0 +1,24 @@ +#!/usr/bin/env roseus + +(require "package://gdrive_ros/euslisp/gdrive-ros-utils.l") + +(ros::roseus "sample_gdrive_ros_client") + +(wait-for-gdrive-server) +(ros::log-info "Gdrive server ready.") + +(setq file-name (ros::get-param "~file_name")) +(setq file-title (ros::get-param "~file_title")) +(setq parents-id (ros::get-param "~parents_id")) + +(ros::log-info "Uploading files...") +(setq res (upload-file file-name file-title :parents-id parents-id)) +(if (elt res 0) + (ros::log-info "File uploading succeeded.") + (ros::log-error "File uploading failed.")) + +(ros::log-info "Uploading multiple files...") +(setq res (upload-multiple-files (list file-name) (list file-title) :parents-id parents-id)) +(if (elt (elt res 0) 0) + (ros::log-info "File uploading succeeded.") + (ros::log-error "File uploading failed.")) diff --git a/gdrive_ros/launch/demo.launch b/gdrive_ros/launch/demo.launch new file mode 100644 index 000000000..3ca40128a --- /dev/null +++ b/gdrive_ros/launch/demo.launch @@ -0,0 +1,21 @@ + + + + + + + + + settings_yaml: $(arg settings_yaml) + + + + + + file_name: $(arg file_name) + file_title: $(arg file_title) + parents_id: $(arg parents_id) + + + From cb31f04670d418c5e283674e84e3ff9e7ce5b5c9 Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Wed, 10 Nov 2021 11:09:57 +0900 Subject: [PATCH 03/14] [gdrive_ros] Add a roseus client library and sample --- gdrive_ros/euslisp/gdrive-ros-utils.l | 14 +++++------ gdrive_ros/euslisp/sample-gdrive-ros-client.l | 25 +++++++++++-------- gdrive_ros/launch/demo.launch | 21 ---------------- gdrive_ros/sample/sample-roseus-client.launch | 16 ++++++++++++ 4 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 gdrive_ros/launch/demo.launch create mode 100644 gdrive_ros/sample/sample-roseus-client.launch diff --git a/gdrive_ros/euslisp/gdrive-ros-utils.l b/gdrive_ros/euslisp/gdrive-ros-utils.l index 6b99c535f..7d86379e0 100644 --- a/gdrive_ros/euslisp/gdrive-ros-utils.l +++ b/gdrive_ros/euslisp/gdrive-ros-utils.l @@ -2,8 +2,8 @@ (defun wait-for-gdrive-server (&rest args) (if args - (ros::wait-for-service "/gdrive_ros/upload" args) - (ros::wait-for-service "/gdrive_ros/upload" args) + (ros::wait-for-service "/gdrive_server/upload" args) + (ros::wait-for-service "/gdrive_server/upload") ) ) @@ -18,7 +18,7 @@ (res nil)) (if (and (not parents-path) (not parents-id)) (progn - (ros::log-error "Both of parents-path and parents-id cannot be nil.") + (ros::ros-error "Both of parents-path and parents-id cannot be nil.") (return-from upload-file nil) ) nil) @@ -28,7 +28,7 @@ (send req :parents_id parents-id) (send req :use_timestamp_folder use-timestamp-folder) (send req :use_timestamp_file_title use-timestamp-file-title) - (setq res (ros::service-call "/gdrive_ros/upload" req t)) + (setq res (ros::service-call "/gdrive_server/upload" req t)) (if (send res :success) (list (send res :success) (send res :file_id) @@ -36,7 +36,7 @@ (send res :parents_id) (send res :parents_url)) (progn - (ros::log-error "Failed to upload.") + (ros::ros-error "Failed to upload.") nil )) )) @@ -53,7 +53,7 @@ (res nil)) (if (and (not parents-path) (not parents-id)) (progn - (ros::log-error "Both of parents-path and parents-id cannot be nil.") + (ros::ros-error "Both of parents-path and parents-id cannot be nil.") (return-from upload-file nil) ) nil) @@ -63,7 +63,7 @@ (send req :parents_id parents-id) (send req :use_timestamp_folder use-timestamp-folder) (send req :use_timestamp_file_title use-timestamp-file-title) - (setq res (ros::service-call "/gdrive_ros/upload_multi" req t)) + (setq res (ros::service-call "/gdrive_server/upload_multi" req t)) (list (send res :successes) (send res :file_ids) (send res :file_urls) diff --git a/gdrive_ros/euslisp/sample-gdrive-ros-client.l b/gdrive_ros/euslisp/sample-gdrive-ros-client.l index be6037b0a..e2613c690 100755 --- a/gdrive_ros/euslisp/sample-gdrive-ros-client.l +++ b/gdrive_ros/euslisp/sample-gdrive-ros-client.l @@ -5,20 +5,23 @@ (ros::roseus "sample_gdrive_ros_client") (wait-for-gdrive-server) -(ros::log-info "Gdrive server ready.") +(ros::ros-info "Gdrive server ready.") (setq file-name (ros::get-param "~file_name")) (setq file-title (ros::get-param "~file_title")) -(setq parents-id (ros::get-param "~parents_id")) +(setq parents-path (ros::get-param "~parents_path")) -(ros::log-info "Uploading files...") -(setq res (upload-file file-name file-title :parents-id parents-id)) -(if (elt res 0) - (ros::log-info "File uploading succeeded.") - (ros::log-error "File uploading failed.")) +(ros::ros-info "Uploading files...") +(setq res (upload-file file-name file-title :parents-path parents-path)) +(if res + (ros::ros-info "File uploading succeeded. res: ~A" res) + (ros::ros-error "File uploading failed.")) -(ros::log-info "Uploading multiple files...") -(setq res (upload-multiple-files (list file-name) (list file-title) :parents-id parents-id)) +(ros::ros-info "Uploading multiple files...") +(setq res (upload-multiple-files (list file-name) (list file-title) :parents-path parents-path)) (if (elt (elt res 0) 0) - (ros::log-info "File uploading succeeded.") - (ros::log-error "File uploading failed.")) + (ros::ros-info "File uploading succeeded. res: ~A" res) + (ros::ros-error "File uploading failed.")) + +(ros::roseus "shutdown") +(exit) diff --git a/gdrive_ros/launch/demo.launch b/gdrive_ros/launch/demo.launch deleted file mode 100644 index 3ca40128a..000000000 --- a/gdrive_ros/launch/demo.launch +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - settings_yaml: $(arg settings_yaml) - - - - - - file_name: $(arg file_name) - file_title: $(arg file_title) - parents_id: $(arg parents_id) - - - diff --git a/gdrive_ros/sample/sample-roseus-client.launch b/gdrive_ros/sample/sample-roseus-client.launch new file mode 100644 index 000000000..20a0d183b --- /dev/null +++ b/gdrive_ros/sample/sample-roseus-client.launch @@ -0,0 +1,16 @@ + + + + + + + + + + file_name: $(arg file_name) + file_title: $(arg file_title) + parents_path: $(arg parents_path) + + + From a6e8bbbbc2e6792ded74cc40a5b76a006d9b4b46 Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Wed, 10 Nov 2021 11:14:07 +0900 Subject: [PATCH 04/14] [gdrive_ros] update CMakeLists.txt to add installation of euslisp and sample --- gdrive_ros/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gdrive_ros/CMakeLists.txt b/gdrive_ros/CMakeLists.txt index cd4dc12fa..75e53bb15 100644 --- a/gdrive_ros/CMakeLists.txt +++ b/gdrive_ros/CMakeLists.txt @@ -27,11 +27,25 @@ install(DIRECTORY node_scripts USE_SOURCE_PERMISSIONS ) +install(PROGRAMS euslisp/sample-gdrive-ros-client.l + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS ) +install(DIRECTORY sample + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + USE_SOURCE_PERMISSIONS +) + +install(DIRECTORY euslisp + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + USE_SOURCE_PERMISSIONS +) + if(CATKIN_ENABLE_TESTING) find_package(catkin REQUIRED COMPONENTS rostest roslaunch) roslaunch_add_file_check(launch/gdrive_server.launch) From dccffa74480dbdeb666dd72a4ed208aff3b8870c Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Wed, 10 Nov 2021 12:51:17 +0900 Subject: [PATCH 05/14] [gdrive_ros] add rospy client and update examples --- gdrive_ros/CMakeLists.txt | 9 +- gdrive_ros/euslisp/gdrive-ros-utils.l | 27 ++---- ...client.l => sample-gdrive-roseus-client.l} | 10 +-- .../sample_gdrive_rospy_client.py | 31 +++++++ gdrive_ros/package.xml | 2 + gdrive_ros/sample/sample_roseus_client.launch | 16 ++++ ...ient.launch => sample_rospy_client.launch} | 2 +- gdrive_ros/setup.py | 9 ++ gdrive_ros/src/gdrive_ros/__init__.py | 0 .../src/gdrive_ros/gdrive_ros_client.py | 82 +++++++++++++++++++ 10 files changed, 154 insertions(+), 34 deletions(-) rename gdrive_ros/euslisp/{sample-gdrive-ros-client.l => sample-gdrive-roseus-client.l} (67%) create mode 100755 gdrive_ros/node_scripts/sample_gdrive_rospy_client.py create mode 100644 gdrive_ros/sample/sample_roseus_client.launch rename gdrive_ros/sample/{sample-roseus-client.launch => sample_rospy_client.launch} (81%) create mode 100644 gdrive_ros/setup.py create mode 100644 gdrive_ros/src/gdrive_ros/__init__.py create mode 100644 gdrive_ros/src/gdrive_ros/gdrive_ros_client.py diff --git a/gdrive_ros/CMakeLists.txt b/gdrive_ros/CMakeLists.txt index 75e53bb15..ab6236df0 100644 --- a/gdrive_ros/CMakeLists.txt +++ b/gdrive_ros/CMakeLists.txt @@ -2,10 +2,13 @@ cmake_minimum_required(VERSION 2.8.3) project(gdrive_ros) find_package(catkin REQUIRED COMPONENTS + rospy std_msgs message_generation ) +catkin_python_setup() + add_service_files( FILES Upload.srv @@ -22,10 +25,8 @@ catkin_package( message_runtime ) -install(DIRECTORY node_scripts - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} - USE_SOURCE_PERMISSIONS -) +catkin_install_python(PROGRAMS node_scripts/gdrive_server_node.py node_scripts/sample_gdrive_rospy_client.py + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) install(PROGRAMS euslisp/sample-gdrive-ros-client.l DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/gdrive_ros/euslisp/gdrive-ros-utils.l b/gdrive_ros/euslisp/gdrive-ros-utils.l index 7d86379e0..59cc2cb93 100644 --- a/gdrive_ros/euslisp/gdrive-ros-utils.l +++ b/gdrive_ros/euslisp/gdrive-ros-utils.l @@ -16,12 +16,6 @@ (use-timestamp-file-title nil)) (let ((req (instance gdrive_ros::UploadRequest :init)) (res nil)) - (if (and (not parents-path) (not parents-id)) - (progn - (ros::ros-error "Both of parents-path and parents-id cannot be nil.") - (return-from upload-file nil) - ) - nil) (send req :file_path file-path) (send req :file_title file-title) (send req :parents_path parents-path) @@ -29,16 +23,11 @@ (send req :use_timestamp_folder use-timestamp-folder) (send req :use_timestamp_file_title use-timestamp-file-title) (setq res (ros::service-call "/gdrive_server/upload" req t)) - (if (send res :success) - (list (send res :success) - (send res :file_id) - (send res :file_url) - (send res :parents_id) - (send res :parents_url)) - (progn - (ros::ros-error "Failed to upload.") - nil - )) + (list (send res :success) + (send res :file_id) + (send res :file_url) + (send res :parents_id) + (send res :parents_url)) )) (defun upload-multiple-files @@ -51,12 +40,6 @@ (use-timestamp-file-title nil)) (let ((req (instance gdrive_ros::MultipleUploadRequest :init)) (res nil)) - (if (and (not parents-path) (not parents-id)) - (progn - (ros::ros-error "Both of parents-path and parents-id cannot be nil.") - (return-from upload-file nil) - ) - nil) (send req :file_paths file-paths) (send req :file_titles file-titles) (send req :parents_path parents-path) diff --git a/gdrive_ros/euslisp/sample-gdrive-ros-client.l b/gdrive_ros/euslisp/sample-gdrive-roseus-client.l similarity index 67% rename from gdrive_ros/euslisp/sample-gdrive-ros-client.l rename to gdrive_ros/euslisp/sample-gdrive-roseus-client.l index e2613c690..4d4e4b89a 100755 --- a/gdrive_ros/euslisp/sample-gdrive-ros-client.l +++ b/gdrive_ros/euslisp/sample-gdrive-roseus-client.l @@ -2,7 +2,7 @@ (require "package://gdrive_ros/euslisp/gdrive-ros-utils.l") -(ros::roseus "sample_gdrive_ros_client") +(ros::roseus "sample_gdrive_roseus_client") (wait-for-gdrive-server) (ros::ros-info "Gdrive server ready.") @@ -13,15 +13,11 @@ (ros::ros-info "Uploading files...") (setq res (upload-file file-name file-title :parents-path parents-path)) -(if res - (ros::ros-info "File uploading succeeded. res: ~A" res) - (ros::ros-error "File uploading failed.")) +(ros::ros-info "Response: ~A" res) (ros::ros-info "Uploading multiple files...") (setq res (upload-multiple-files (list file-name) (list file-title) :parents-path parents-path)) -(if (elt (elt res 0) 0) - (ros::ros-info "File uploading succeeded. res: ~A" res) - (ros::ros-error "File uploading failed.")) +(ros::ros-info "Response: ~A" res) (ros::roseus "shutdown") (exit) diff --git a/gdrive_ros/node_scripts/sample_gdrive_rospy_client.py b/gdrive_ros/node_scripts/sample_gdrive_rospy_client.py new file mode 100755 index 000000000..4a35dce2c --- /dev/null +++ b/gdrive_ros/node_scripts/sample_gdrive_rospy_client.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import rospy +from gdrive_ros.gdrive_ros_client import GDriveROSClient + + +def main(): + + rospy.init_node('sample_gdrive_rospy_client') + + file_name = rospy.get_param('~file_name') + file_title = rospy.get_param('~file_title') + parents_path = rospy.get_param('~parents_path') + + client = GDriveROSClient() + + client.wait_for_gdrive_server() + + rospy.loginfo('Uploading files...') + ret = client.upload_file(file_name, file_title, parents_path=parents_path) + rospy.loginfo('Result: {}'.format(ret)) + + rospy.loginfo('Uploading files...') + ret = client.upload_multiple_files([file_name], [file_title], parents_path=parents_path) + rospy.loginfo('Result: {}'.format(ret)) + + rospy.loginfo('Successfully finished.') + + +if __name__=='__main__': + main() diff --git a/gdrive_ros/package.xml b/gdrive_ros/package.xml index 378890869..cdc0316f0 100644 --- a/gdrive_ros/package.xml +++ b/gdrive_ros/package.xml @@ -13,8 +13,10 @@ https://github.com/jsk-ros-pkg/jsk_3rdparty/issues catkin + rospy message_generation std_msgs + rospy message_runtime pydrive-pip diff --git a/gdrive_ros/sample/sample_roseus_client.launch b/gdrive_ros/sample/sample_roseus_client.launch new file mode 100644 index 000000000..a583ebf2c --- /dev/null +++ b/gdrive_ros/sample/sample_roseus_client.launch @@ -0,0 +1,16 @@ + + + + + + + + + + file_name: $(arg file_name) + file_title: $(arg file_title) + parents_path: $(arg parents_path) + + + diff --git a/gdrive_ros/sample/sample-roseus-client.launch b/gdrive_ros/sample/sample_rospy_client.launch similarity index 81% rename from gdrive_ros/sample/sample-roseus-client.launch rename to gdrive_ros/sample/sample_rospy_client.launch index 20a0d183b..e799ab898 100644 --- a/gdrive_ros/sample/sample-roseus-client.launch +++ b/gdrive_ros/sample/sample_rospy_client.launch @@ -5,7 +5,7 @@ - file_name: $(arg file_name) diff --git a/gdrive_ros/setup.py b/gdrive_ros/setup.py new file mode 100644 index 000000000..a365fe1b0 --- /dev/null +++ b/gdrive_ros/setup.py @@ -0,0 +1,9 @@ +from distutils.core import setup +from catkin_pkg.python_setup import generate_distutils_setup + +d = generate_distutils_setup( + packages=['gdrive_ros'], + package_dir={'': 'src'} +) + +setup(**d) diff --git a/gdrive_ros/src/gdrive_ros/__init__.py b/gdrive_ros/src/gdrive_ros/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py b/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py new file mode 100644 index 000000000..0f1bdca50 --- /dev/null +++ b/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py @@ -0,0 +1,82 @@ +import rospy +from .srv import MultipleUpload +from .srv import MultipleUploadRequest +from .srv import Upload +from .srv import UploadRequest + + +class GDriveROSClient: + + def __init__(self): + + self.srv_upload = rospy.ServiceProxy( + '/gdrive_server/upload', + Upload + ) + self.srv_upload_multi = rospy.ServiceProxy( + '/gdrive_server/upload_multi', + MultipleUpload + ) + + def wait_for_gdrive_server(self,timeout=None): + if timeout is None: + rospy.wait_for_service('/gdrive_server/upload') + rospy.wait_for_service('/gdrive_server/upload_multi') + + try: + rospy.wait_for_service('/gdrive_server/upload', timeout=timeout) + rospy.wait_for_service('/gdrive_server/upload_multi', timeout=timeout) + return True + except rospy.ROSException as e: + rospy.logerr('Error: {}'.format(e)) + return False + + def upload_file(self, + file_path, + file_title, + parents_path='', + parents_id='', + use_timestamp_folder=False, + use_timestamp_file_title=False + ): + # + req = UploadRequest() + req.file_path = file_path + req.file_title = file_title + req.parents_path = parents_path + req.parents_id = parents_id + req.use_timestamp_folder = use_timestamp_folder + req.use_timestamp_file_title = use_timestamp_file_title + # + res = self.srv_upload(req) + # + return (res.success, + res.file_id, + res.file_url, + res.parents_id, + res.parents_url) + + def upload_multiple_files(self, + file_paths, + file_titles, + parents_path='', + parents_id='', + use_timestamp_folder=False, + use_timestamp_file_title=False + ): + # + req = MultipleUploadRequest() + req.file_paths = file_paths + req.file_titles = file_titles + req.parents_path = parents_path + req.parents_id = parents_id + req.use_timestamp_folder = use_timestamp_folder + req.use_timestamp_file_title = use_timestamp_file_title + # + res = self.srv_upload_multi(req) + # + return (res.successes, + res.file_ids, + res.file_urls, + res.parents_id, + res.parents_url) From 781c49e3dee85bc01db67c8d2701637bebfd61d6 Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Wed, 10 Nov 2021 13:17:36 +0900 Subject: [PATCH 06/14] [gdrive_ros] fix module import --- gdrive_ros/src/gdrive_ros/gdrive_ros_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py b/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py index 0f1bdca50..6b8123fa8 100644 --- a/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py +++ b/gdrive_ros/src/gdrive_ros/gdrive_ros_client.py @@ -1,8 +1,8 @@ import rospy -from .srv import MultipleUpload -from .srv import MultipleUploadRequest -from .srv import Upload -from .srv import UploadRequest +from gdrive_ros.srv import MultipleUpload +from gdrive_ros.srv import MultipleUploadRequest +from gdrive_ros.srv import Upload +from gdrive_ros.srv import UploadRequest class GDriveROSClient: From dcb89cb41a275c027559f53f88c88dfefd457d9f Mon Sep 17 00:00:00 2001 From: Dirk Gorissen Date: Mon, 20 Dec 2021 23:03:32 +0000 Subject: [PATCH 07/14] Fix config generation code - import statement refers to non-existing init_respeaker function, replaced with RespeakerInstance - cfg directory does not exist, changed to config, which does exist by default --- respeaker_ros/scripts/respeaker_gencfg.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/respeaker_ros/scripts/respeaker_gencfg.py b/respeaker_ros/scripts/respeaker_gencfg.py index 099499589..db72c0254 100755 --- a/respeaker_ros/scripts/respeaker_gencfg.py +++ b/respeaker_ros/scripts/respeaker_gencfg.py @@ -4,12 +4,13 @@ import os import sys -from respeaker_node import PARAMETERS, init_respeaker +from respeaker_node import PARAMETERS, RespeakerInterface def main(out): - dev = init_respeaker() - if not dev: + try: + dev = RespeakerInterface() + except RuntimeError as e: print('No device found. Please connect a device.') return with open(out, "w") as f: @@ -72,5 +73,5 @@ def main(out): else: outpath = os.path.join( os.path.abspath(os.path.dirname(__file__)), - "..", "cfg", "Respeaker.cfg") + "..", "config", "Respeaker.cfg") main(outpath) From feb890ffeea06e6e598a9fe90ec3b03cdd31468d Mon Sep 17 00:00:00 2001 From: Dirk Gorissen Date: Tue, 21 Dec 2021 12:52:53 +0000 Subject: [PATCH 08/14] Change Respeaker.cfg directory back to cfg from config --- respeaker_ros/scripts/respeaker_gencfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/respeaker_ros/scripts/respeaker_gencfg.py b/respeaker_ros/scripts/respeaker_gencfg.py index db72c0254..63f6548fa 100755 --- a/respeaker_ros/scripts/respeaker_gencfg.py +++ b/respeaker_ros/scripts/respeaker_gencfg.py @@ -73,5 +73,5 @@ def main(out): else: outpath = os.path.join( os.path.abspath(os.path.dirname(__file__)), - "..", "config", "Respeaker.cfg") + "..", "cfg", "Respeaker.cfg") main(outpath) From 2e5c182847f5c11117dfa993124ca88f31370290 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Wed, 5 Jan 2022 14:54:32 +0900 Subject: [PATCH 09/14] euslisp directory is installed via 'install(DIRECTORY euslisp', so we can remove 'install(PROGRAMS euslisp/sample-gdrive-ros-client.l' --- gdrive_ros/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gdrive_ros/CMakeLists.txt b/gdrive_ros/CMakeLists.txt index ab6236df0..f4214cc51 100644 --- a/gdrive_ros/CMakeLists.txt +++ b/gdrive_ros/CMakeLists.txt @@ -28,10 +28,6 @@ catkin_package( catkin_install_python(PROGRAMS node_scripts/gdrive_server_node.py node_scripts/sample_gdrive_rospy_client.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -install(PROGRAMS euslisp/sample-gdrive-ros-client.l - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS From 8fdac3f603b7d2a57cdd45b988cb06bddb3dd5d7 Mon Sep 17 00:00:00 2001 From: iory Date: Wed, 23 Feb 2022 23:31:50 +0900 Subject: [PATCH 10/14] [switchbot_ros] Sort device_list --- switchbot_ros/scripts/switchbot_ros_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/switchbot_ros/scripts/switchbot_ros_server.py b/switchbot_ros/scripts/switchbot_ros_server.py index c1d495fe8..7366b7ff2 100755 --- a/switchbot_ros/scripts/switchbot_ros_server.py +++ b/switchbot_ros/scripts/switchbot_ros_server.py @@ -27,7 +27,10 @@ def __init__(self): try: self.bots = SwitchBotAPIClient(token=self.token) device_list_str = 'Switchbot device list:\n' - for device in self.bots.device_list: + device_list = sorted( + self.bots.device_list, + key=lambda device: str(device['deviceName'])) + for device in device_list: device_list_str += 'Name: ' + str(device['deviceName']) device_list_str += ', Type: ' + str(device['deviceType']) device_list_str += '\n' From e08faef8aecb0bdb96dbe5d72051f13199df162b Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Fri, 1 Apr 2022 21:26:13 +0900 Subject: [PATCH 11/14] [chaplus_ros]support installation of python3-requests --- chaplus_ros/package.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chaplus_ros/package.xml b/chaplus_ros/package.xml index 23eb63681..642265a5e 100644 --- a/chaplus_ros/package.xml +++ b/chaplus_ros/package.xml @@ -1,5 +1,5 @@ - + chaplus_ros 2.1.24 The ROS package for chaplus service @@ -12,8 +12,8 @@ catkin - rospy - python-requests + python-requests + python3-requests rospy From d76def5d25a1daca6df4cf74a60de2d372b673b2 Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Fri, 1 Apr 2022 21:31:39 +0900 Subject: [PATCH 12/14] [switchbot_ros]message_exectime -> message_runtime --- switchbot_ros/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/switchbot_ros/package.xml b/switchbot_ros/package.xml index c6e5576da..a17cd96b4 100644 --- a/switchbot_ros/package.xml +++ b/switchbot_ros/package.xml @@ -15,7 +15,7 @@ python-requests python3-requests - message_exectime + message_runtime rospy std_msgs From b4f8fab302e40d68d5c5740d5cc93c3f7f06b24b Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Sat, 2 Apr 2022 00:03:10 +0900 Subject: [PATCH 13/14] [jsk_travis]use https://github instead of git://github because of dropping support --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index e24492940..fccaa0ed0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule ".travis"] path = .travis - url = git://github.com/jsk-ros-pkg/jsk_travis + url = https://github.com/jsk-ros-pkg/jsk_travis From 5314e9854b4bf22020da08fb954ccab547d05386 Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Sat, 2 Apr 2022 00:03:34 +0900 Subject: [PATCH 14/14] update jsk_travis 0.5.22 to 0.5.24 --- .travis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis b/.travis index 5e0ae4e34..4e8b3cf26 160000 --- a/.travis +++ b/.travis @@ -1 +1 @@ -Subproject commit 5e0ae4e342f736d06b0bdaebb239bf6a260598bf +Subproject commit 4e8b3cf2637d593d05106e84edf2e4532677d37c