diff --git a/bayesopt_ros_bridge/README.md b/bayesopt_ros_bridge/README.md deleted file mode 100644 index 981f7ac..0000000 --- a/bayesopt_ros_bridge/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# bayesopt_ros_bridge - -bayesopt_ros_bridge is a package that includes bridge software to operate instance of bayesian optimization through ROS msgs. - -# Components -- bayesopt_ros_bridge: base part -- physbo_ros_bridge: bridge between PHYSBO and ROS -- combo_ros_bridge: bridge between COMBO and ROS - -# Use Case -- Experimental parameter optimization using bayesian optimization during robot experiments -- Integration of a ROS robot system with science experiments -- Lab-automation diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/CMakeLists.txt b/bayesopt_ros_bridge/bayesopt_ros_bridge/CMakeLists.txt deleted file mode 100644 index 6bb03af..0000000 --- a/bayesopt_ros_bridge/bayesopt_ros_bridge/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 2.8.0) -project(bayesopt_ros_bridge) - -find_package(catkin REQUIRED COMPONENTS - std_msgs - rospy -) - -catkin_python_setup() - -catkin_package() diff --git a/bayesopt_ros_bridge/combo_ros_bridge/.gitignore b/bayesopt_ros_bridge/combo_ros_bridge/.gitignore deleted file mode 100644 index 4c42203..0000000 --- a/bayesopt_ros_bridge/combo_ros_bridge/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.~ -*.pyc -data \ No newline at end of file diff --git a/bayesopt_ros_bridge/combo_ros_bridge/CMakeLists.txt b/bayesopt_ros_bridge/combo_ros_bridge/CMakeLists.txt deleted file mode 100644 index fc9bde2..0000000 --- a/bayesopt_ros_bridge/combo_ros_bridge/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -cmake_minimum_required(VERSION 2.8.0) -project(combo_ros_bridge) - -find_package(catkin REQUIRED COMPONENTS - std_msgs - rospy -) - -catkin_python_setup() - -catkin_package() - - -############# -## Install ## -############# - -catkin_install_python( - PROGRAMS - scripts/combo_ros_bridge_node.py - DESTINATION - ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -foreach(dir config launch) - install(DIRECTORY ${dir}/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir}) -endforeach() diff --git a/bayesopt_ros_bridge/combo_ros_bridge/data/test_candidates.csv b/bayesopt_ros_bridge/combo_ros_bridge/data/test_candidates.csv deleted file mode 100644 index 9e57e35..0000000 --- a/bayesopt_ros_bridge/combo_ros_bridge/data/test_candidates.csv +++ /dev/null @@ -1,26 +0,0 @@ -p1,p2,p3,p4,p5,y -10,10,50,0,20, -10,11,50,0,20, -10,12,50,0,20, -10,13,50,0,20, -10,14,50,0,20, -11,10,50,0,20, -11,11,50,0,20, -11,12,50,0,20, -11,13,50,0,20, -11,14,50,0,20, -12,10,50,0,20, -12,11,50,0,20, -12,12,50,0,20, -12,13,50,0,20, -12,14,50,0,20, -13,10,50,0,20, -13,11,50,0,20, -13,12,50,0,20, -13,13,50,0,20, -13,14,50,0,20, -14,10,50,0,20, -14,11,50,0,20, -14,12,50,0,20, -14,13,50,0,20, -14,14,50,0,20, diff --git a/bayesopt_ros_bridge/combo_ros_bridge/package.xml b/bayesopt_ros_bridge/combo_ros_bridge/package.xml deleted file mode 100644 index ce50ea2..0000000 --- a/bayesopt_ros_bridge/combo_ros_bridge/package.xml +++ /dev/null @@ -1,17 +0,0 @@ - - combo_ros_bridge - 1.1.0 - Bridge software between ROS and Bayesian optimization - - Yuki Asano - Yuki Asano - - BSD - - catkin - - rospy - std_msgs - bayesopt_ros_bridge - - diff --git a/bayesopt_ros_bridge/combo_ros_bridge/setup.py b/bayesopt_ros_bridge/combo_ros_bridge/setup.py deleted file mode 100644 index 31b6303..0000000 --- a/bayesopt_ros_bridge/combo_ros_bridge/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#! THIS setup.py IS MADE FROM THE TEMPLATE IN THE LINK BELOW -# duplicating information is fetched from the package.xml -# http://docs.ros.org/en/jade/api/catkin/html/user_guide/setup_dot_py.html - -from distutils.core import setup -from catkin_pkg.python_setup import generate_distutils_setup - -d = generate_distutils_setup( - packages=['combo_ros_bridge'], - package_dir={'': 'src'} -) - -setup(**d) diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/.gitignore b/bayesopt_ros_bridge/physbo_ros_bridge/.gitignore deleted file mode 100644 index 825abc2..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.~ -*.pyc -examples/data/chosen_actions.csv -examples/data/result \ No newline at end of file diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/LICENSE b/bayesopt_ros_bridge/physbo_ros_bridge/LICENSE deleted file mode 100644 index b835df0..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2024, Yuki Asano - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/README.md b/bayesopt_ros_bridge/physbo_ros_bridge/README.md deleted file mode 100644 index 86b7830..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# physbo_ros_bridge - -physbo_ros_bridge is a package that includes a bridge software to commanding PHYSBO through ROS msgs. - - -## PHYSBO -PHYSBO is an optimization tools for PHYsics based on Bayesian Optimization - -### doc -https://www.pasums.issp.u-tokyo.ac.jp/physbo/en - -### source code -https://github.com/issp-center-dev/PHYSBO - - -## Install -- PHYSBO requires python3 -``` -sudo apt install python3-pip -sudo pip3 install rospkg -sudo pip3 install numpy -sudo pip3 install pandas -sudo pip3 install Cython -sudo pip3 install matplotlib -``` - -- install physbo - - https://github.com/issp-center-dev/PHYSBO#install - - -## Usage -### physbo_interface -- test program node for only PHYSBO -- load test candidates (examples/data/candidates.csv) -- visualize mean, std and scores(acquisition functions) -``` -cd examples -./test_physbo_interface.py -``` - -### physbo_ros_bridge -- bridge node for communication between PHYSBO and ROS system -- publish PHYSBO data to ROS system (e.g. next_param) -- subscribe evaluation value or flags to write the value to PHYSBO -``` -roslaunch physbo_ros_bridge physbo_ros_bridge.launch -``` -and then command the node from another terminal using ROS msgs. -``` -rostopic pub -1 /bayesopt_ros_bridge/start_param_search std_msgs/Bool "data: true" -rostopic pub -1 /bayesopt_ros_bridge/result_to_bayesopt std_msgs/Float32 "data: 0.5" -``` -repeat this process several times, and then terminate the terminal by Ctrl+C. - - -### memo -- Result and history data are saved in the dir specified by `policy_save_dir` (`data` dir as defalult). -- if you want to continue an experiment with the previous/existing data, `use_saved_policy=True` should be used. - - The arg with `False` does not consider the existing data and learning history. diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/config/candidates_config.yaml b/bayesopt_ros_bridge/physbo_ros_bridge/config/candidates_config.yaml deleted file mode 100644 index a8ce668..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/config/candidates_config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -config: - candidates: - label: ['x1', 'x2', 'x3', 'y'] - param: - # INT format is better for COMBO/PHYSBO - - x1: [100, 200] # [degC] - x2: [10, 50] # [N] - x3: [0, 2, 5] # [sec] diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/package.xml b/bayesopt_ros_bridge/physbo_ros_bridge/package.xml deleted file mode 100644 index 9a12be8..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/package.xml +++ /dev/null @@ -1,18 +0,0 @@ - - physbo_ros_bridge - 1.1.0 - Bridge software between ROS and Bayesian optimization - - Yuki Asano - Yuki Asano - - GPL 3.0 - - catkin - - rospy - std_msgs - bayesopt_ros_bridge - combo_ros_bridge - - diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/setup.py b/bayesopt_ros_bridge/physbo_ros_bridge/setup.py deleted file mode 100644 index a75c759..0000000 --- a/bayesopt_ros_bridge/physbo_ros_bridge/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#! THIS setup.py IS MADE FROM THE TEMPLATE IN THE LINK BELOW -# duplicating information is fetched from the package.xml -# http://docs.ros.org/en/jade/api/catkin/html/user_guide/setup_dot_py.html - -from distutils.core import setup -from catkin_pkg.python_setup import generate_distutils_setup - -d = generate_distutils_setup( - packages=['physbo_ros_bridge'], - package_dir={'': 'src'} -) - -setup(**d) diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/__init__.py b/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/.gitignore b/ml_interfaces/bayesopt_interfaces/.gitignore similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/.gitignore rename to ml_interfaces/bayesopt_interfaces/.gitignore diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/LICENSE b/ml_interfaces/bayesopt_interfaces/LICENSE similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/LICENSE rename to ml_interfaces/bayesopt_interfaces/LICENSE diff --git a/bayesopt_ros_bridge/combo_ros_bridge/README.md b/ml_interfaces/bayesopt_interfaces/README.md similarity index 51% rename from bayesopt_ros_bridge/combo_ros_bridge/README.md rename to ml_interfaces/bayesopt_interfaces/README.md index caeafd0..ea61a8a 100644 --- a/bayesopt_ros_bridge/combo_ros_bridge/README.md +++ b/ml_interfaces/bayesopt_interfaces/README.md @@ -1,6 +1,39 @@ -# combo_ros_bridge +# bayesopt_interfaces -combo_ros_bridge is a package that includes a bridge software to commanding COMBO through ROS msgs. +## PHYSBO +PHYSBO is an optimization tools for PHYsics based on Bayesian Optimization + +### doc +https://www.pasums.issp.u-tokyo.ac.jp/physbo/en + +### source code +https://github.com/issp-center-dev/PHYSBO + + +## Install +- PHYSBO requires python3 +``` +sudo apt install python3-pip +sudo pip3 install rospkg +sudo pip3 install numpy +sudo pip3 install pandas +sudo pip3 install Cython +sudo pip3 install matplotlib +``` + +- install physbo + - https://github.com/issp-center-dev/PHYSBO#install + + +## Usage +### physbo_interface +- test program node for only PHYSBO +- load test candidates (examples/data/candidates.csv) +- visualize mean, std and scores(acquisition functions) +``` +cd examples +./test_physbo_interface.py +``` ## COMBO @@ -44,19 +77,3 @@ see above link for latest information cd scripts ./test_combo_interface.py ``` - -### combo_ros_bridge -- bridge node for communication between COMBO and ROS system -- publish COMBO data to ROS system (e.g. next_param) -- subscribe evaluation value or flags to write the value to COMBO -``` -roslaunch combo_ros_bridge combo_ros_bridge.launch -``` - -### memo -- Result and history data are saved in the dir specified by `policy_save_dir` (`data` dir as defalult). -- if you want to continue an experiment with the previous/existing data, `use_saved_policy=True` should be used. - - The arg with `False` does not consider the existing data and learning history. -- However, COMBO is not recommended when you want to continue experiments from existing data due to the following issue which was fixed in PHYSBO. - - https://github.com/issp-center-dev/PHYSBO/issues/44 - - PHYSBO is a candidate for this purpose. diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/__init__.py b/ml_interfaces/bayesopt_interfaces/bayesopt_if/__init__.py similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/__init__.py rename to ml_interfaces/bayesopt_interfaces/bayesopt_if/__init__.py diff --git a/bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/combo_interface.py b/ml_interfaces/bayesopt_interfaces/bayesopt_if/combo_interface.py similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/combo_interface.py rename to ml_interfaces/bayesopt_interfaces/bayesopt_if/combo_interface.py diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_interface.py b/ml_interfaces/bayesopt_interfaces/bayesopt_if/physbo_interface.py similarity index 98% rename from bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_interface.py rename to ml_interfaces/bayesopt_interfaces/bayesopt_if/physbo_interface.py index dba5f65..d3d347e 100755 --- a/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_interface.py +++ b/ml_interfaces/bayesopt_interfaces/bayesopt_if/physbo_interface.py @@ -6,7 +6,7 @@ import pandas as pd import physbo import matplotlib.pyplot as plt -from combo_ros_bridge.combo_interface import ComboInterface +from .combo_interface import ComboInterface class PhysboInterface(ComboInterface): diff --git a/ml_interfaces/bayesopt_interfaces/setup.py b/ml_interfaces/bayesopt_interfaces/setup.py new file mode 100644 index 0000000..1d062a1 --- /dev/null +++ b/ml_interfaces/bayesopt_interfaces/setup.py @@ -0,0 +1,10 @@ +from setuptools import setup, find_packages + +setup( + name='bayesopt_interfaces', + version='0.1.0', + author='Yuki Asano', + author_email='yasano@g.ecc.u-tokyo.ac.jp', + description='', + packages=find_packages() +) diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/examples/data/candidates.csv b/ml_interfaces/bayesopt_interfaces/tests/data/candidates.csv similarity index 100% rename from bayesopt_ros_bridge/physbo_ros_bridge/examples/data/candidates.csv rename to ml_interfaces/bayesopt_interfaces/tests/data/candidates.csv diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/examples/data/results.csv b/ml_interfaces/bayesopt_interfaces/tests/data/results.csv similarity index 100% rename from bayesopt_ros_bridge/physbo_ros_bridge/examples/data/results.csv rename to ml_interfaces/bayesopt_interfaces/tests/data/results.csv diff --git a/bayesopt_ros_bridge/combo_ros_bridge/scripts/test_combo_interface.py b/ml_interfaces/bayesopt_interfaces/tests/test_combo_interface.py similarity index 79% rename from bayesopt_ros_bridge/combo_ros_bridge/scripts/test_combo_interface.py rename to ml_interfaces/bayesopt_interfaces/tests/test_combo_interface.py index 3f08cb6..bca9c10 100755 --- a/bayesopt_ros_bridge/combo_ros_bridge/scripts/test_combo_interface.py +++ b/ml_interfaces/bayesopt_interfaces/tests/test_combo_interface.py @@ -3,15 +3,17 @@ import os import random +import sys + import combo -from combo_ros_bridge.combo_interface import ComboInterface +from bayesopt_if.combo_interface import ComboInterface def main(): # dir setting - candidates_path = '../data/test_candidates.csv' - policy_load_dir = '../data/test_result' - policy_save_dir = '../data/test_result' + candidates_path = './data/candidates.csv' + policy_load_dir = './data/load' + policy_save_dir = './data/result' # Generate combo ci = ComboInterface(combo, candidates_path, policy_load_dir, policy_save_dir, use_saved_policy=False) diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/examples/test_physbo_interface.py b/ml_interfaces/bayesopt_interfaces/tests/test_physbo_interface.py similarity index 89% rename from bayesopt_ros_bridge/physbo_ros_bridge/examples/test_physbo_interface.py rename to ml_interfaces/bayesopt_interfaces/tests/test_physbo_interface.py index 1cc4a6b..1b97ff5 100755 --- a/bayesopt_ros_bridge/physbo_ros_bridge/examples/test_physbo_interface.py +++ b/ml_interfaces/bayesopt_interfaces/tests/test_physbo_interface.py @@ -3,7 +3,9 @@ import csv import os -from physbo_ros_bridge.physbo_interface import PhysboInterface +import sys + +from bayesopt_if.physbo_interface import PhysboInterface def get_data_from_result_list(index): @@ -21,7 +23,7 @@ def main(): policy_save_dir = './data/result' # Generate physbo - pi = PhysboInterface(candidates_path, policy_load_dir, policy_save_dir, use_saved_policy=False, search_score='PI') + pi = PhysboInterface(candidates_path, policy_load_dir, policy_save_dir, use_saved_policy=False, search_score='EI') pi.start_bayesopt() # Procedure of search and register data to PHYSBO @@ -34,7 +36,7 @@ def main(): result = get_data_from_result_list(pi.get_next_index()) # get result/evaluation data from experiment. (Result list is used for this test program). pi.write_result(result) # write result to PHYSBO # Search with Bayesian optimization - for i in range(17): + for i in range(3): pi.search_next_param_bayes() result = get_data_from_result_list(pi.get_next_index()) pi.write_result(result) diff --git a/ml_interfaces/bayesopt_ros_bridge/.gitignore b/ml_interfaces/bayesopt_ros_bridge/.gitignore new file mode 100644 index 0000000..e708b3f --- /dev/null +++ b/ml_interfaces/bayesopt_ros_bridge/.gitignore @@ -0,0 +1,5 @@ +*.~ +*.pyc +examples/data/chosen_actions.csv +examples/data/chosed_actions.csv +examples/data/result diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/CMakeLists.txt b/ml_interfaces/bayesopt_ros_bridge/CMakeLists.txt similarity index 86% rename from bayesopt_ros_bridge/physbo_ros_bridge/CMakeLists.txt rename to ml_interfaces/bayesopt_ros_bridge/CMakeLists.txt index 4dcdaac..a01ad01 100644 --- a/bayesopt_ros_bridge/physbo_ros_bridge/CMakeLists.txt +++ b/ml_interfaces/bayesopt_ros_bridge/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8.0) -project(physbo_ros_bridge) +project(bayesopt_ros_bridge) find_package(catkin REQUIRED COMPONENTS std_msgs @@ -17,6 +17,7 @@ catkin_package() catkin_install_python( PROGRAMS + scripts/combo_ros_bridge_node.py scripts/physbo_ros_bridge_node.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/bayesopt_ros_bridge/combo_ros_bridge/LICENSE b/ml_interfaces/bayesopt_ros_bridge/LICENSE similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/LICENSE rename to ml_interfaces/bayesopt_ros_bridge/LICENSE diff --git a/ml_interfaces/bayesopt_ros_bridge/README.md b/ml_interfaces/bayesopt_ros_bridge/README.md new file mode 100644 index 0000000..b62a629 --- /dev/null +++ b/ml_interfaces/bayesopt_ros_bridge/README.md @@ -0,0 +1,61 @@ +# bayesopt_ros_bridge + +bayesopt_ros_bridge is a package that includes bridge software to operate instance of bayesian optimization through ROS msgs. + +# Components +- bayesopt_ros_bridge: base part +- physbo_ros_bridge: bridge between PHYSBO and ROS +- combo_ros_bridge: bridge between COMBO and ROS + +# Use Case +- Experimental parameter optimization using bayesian optimization during robot experiments +- Integration of a ROS robot system with science experiments +- Lab-automation + + +# physbo_ros_bridge + +physbo_ros_bridge is a package that includes a bridge software to commanding PHYSBO through ROS msgs. + + +### physbo_ros_bridge +- bridge node for communication between PHYSBO and ROS system +- publish PHYSBO data to ROS system (e.g. next_param) +- subscribe evaluation value or flags to write the value to PHYSBO +``` +roslaunch physbo_ros_bridge physbo_ros_bridge.launch +``` +and then command the node from another terminal using ROS msgs. +``` +rostopic pub -1 /bayesopt_ros_bridge/start_param_search std_msgs/Bool "data: true" +rostopic pub -1 /bayesopt_ros_bridge/result_to_bayesopt std_msgs/Float32 "data: 0.5" +``` +repeat this process several times, and then terminate the terminal by Ctrl+C. + + +### memo +- Result and history data are saved in the dir specified by `policy_save_dir` (`data` dir as defalult). +- if you want to continue an experiment with the previous/existing data, `use_saved_policy=True` should be used. + - The arg with `False` does not consider the existing data and learning history. + + +# combo_ros_bridge + +combo_ros_bridge is a package that includes a bridge software to commanding COMBO through ROS msgs. + + +### combo_ros_bridge +- bridge node for communication between COMBO and ROS system +- publish COMBO data to ROS system (e.g. next_param) +- subscribe evaluation value or flags to write the value to COMBO +``` +roslaunch combo_ros_bridge combo_ros_bridge.launch +``` + +### memo +- Result and history data are saved in the dir specified by `policy_save_dir` (`data` dir as defalult). +- if you want to continue an experiment with the previous/existing data, `use_saved_policy=True` should be used. + - The arg with `False` does not consider the existing data and learning history. +- However, COMBO is not recommended when you want to continue experiments from existing data due to the following issue which was fixed in PHYSBO. + - https://github.com/issp-center-dev/PHYSBO/issues/44 + - PHYSBO is a candidate for this purpose. diff --git a/bayesopt_ros_bridge/combo_ros_bridge/config/bridge_config_combo.yaml b/ml_interfaces/bayesopt_ros_bridge/config/bridge_config_combo.yaml similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/config/bridge_config_combo.yaml rename to ml_interfaces/bayesopt_ros_bridge/config/bridge_config_combo.yaml diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/config/bridge_config_physbo.yaml b/ml_interfaces/bayesopt_ros_bridge/config/bridge_config_physbo.yaml similarity index 94% rename from bayesopt_ros_bridge/physbo_ros_bridge/config/bridge_config_physbo.yaml rename to ml_interfaces/bayesopt_ros_bridge/config/bridge_config_physbo.yaml index a35fd6b..79f3c9f 100644 --- a/bayesopt_ros_bridge/physbo_ros_bridge/config/bridge_config_physbo.yaml +++ b/ml_interfaces/bayesopt_ros_bridge/config/bridge_config_physbo.yaml @@ -16,4 +16,4 @@ config: topic_type: 'Float32MultiArray' # # bayesopt_interface config - acquisition_function: 'PI' + acquisition_function: 'EI' diff --git a/bayesopt_ros_bridge/combo_ros_bridge/config/candidates_config.yaml b/ml_interfaces/bayesopt_ros_bridge/config/candidates_config.yaml similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/config/candidates_config.yaml rename to ml_interfaces/bayesopt_ros_bridge/config/candidates_config.yaml diff --git a/ml_interfaces/bayesopt_ros_bridge/examples/data/candidates.csv b/ml_interfaces/bayesopt_ros_bridge/examples/data/candidates.csv new file mode 100644 index 0000000..2a1b71f --- /dev/null +++ b/ml_interfaces/bayesopt_ros_bridge/examples/data/candidates.csv @@ -0,0 +1,21 @@ +p1,p2,p3,p4,y +180,0,100,200, +180,0,200,200, +180,0,300,200, +180,0,400,200, +180,100,100,200, +180,100,200,200, +180,100,300,200, +180,100,400,200, +180,200,100,200, +180,200,200,200, +180,200,300,200, +180,200,400,200, +180,300,100,200, +180,300,200,200, +180,300,300,200, +180,300,400,200, +180,400,100,200, +180,400,200,200, +180,400,300,200, +180,400,400,200, diff --git a/ml_interfaces/bayesopt_ros_bridge/examples/data/results.csv b/ml_interfaces/bayesopt_ros_bridge/examples/data/results.csv new file mode 100644 index 0000000..be0f592 --- /dev/null +++ b/ml_interfaces/bayesopt_ros_bridge/examples/data/results.csv @@ -0,0 +1,21 @@ +y +0.001 +0.401 +0.398 +0.305 +0.001 +0.352 +0.350 +0.237 +0.350 +0.374 +0.288 +0.262 +0.290 +0.250 +0.245 +0.204 +0.216 +0.129 +0.151 +0.091 diff --git a/bayesopt_ros_bridge/combo_ros_bridge/launch/combo_ros_bridge.launch b/ml_interfaces/bayesopt_ros_bridge/launch/combo_ros_bridge.launch similarity index 53% rename from bayesopt_ros_bridge/combo_ros_bridge/launch/combo_ros_bridge.launch rename to ml_interfaces/bayesopt_ros_bridge/launch/combo_ros_bridge.launch index 23ea514..3ebdb1b 100644 --- a/bayesopt_ros_bridge/combo_ros_bridge/launch/combo_ros_bridge.launch +++ b/ml_interfaces/bayesopt_ros_bridge/launch/combo_ros_bridge.launch @@ -2,11 +2,11 @@ - - - + + + - + diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/launch/physbo_ros_bridge.launch b/ml_interfaces/bayesopt_ros_bridge/launch/physbo_ros_bridge.launch similarity index 53% rename from bayesopt_ros_bridge/physbo_ros_bridge/launch/physbo_ros_bridge.launch rename to ml_interfaces/bayesopt_ros_bridge/launch/physbo_ros_bridge.launch index 9f71122..e01b2b7 100644 --- a/bayesopt_ros_bridge/physbo_ros_bridge/launch/physbo_ros_bridge.launch +++ b/ml_interfaces/bayesopt_ros_bridge/launch/physbo_ros_bridge.launch @@ -2,11 +2,11 @@ - - - + + + - + diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/package.xml b/ml_interfaces/bayesopt_ros_bridge/package.xml similarity index 93% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/package.xml rename to ml_interfaces/bayesopt_ros_bridge/package.xml index 64a1690..db27ef9 100644 --- a/bayesopt_ros_bridge/bayesopt_ros_bridge/package.xml +++ b/ml_interfaces/bayesopt_ros_bridge/package.xml @@ -1,6 +1,6 @@ bayesopt_ros_bridge - 1.1.0 + 0.1.0 Bridge software between ROS and Bayesian optimization Yuki Asano diff --git a/bayesopt_ros_bridge/combo_ros_bridge/scripts/combo_ros_bridge_node.py b/ml_interfaces/bayesopt_ros_bridge/scripts/combo_ros_bridge_node.py similarity index 93% rename from bayesopt_ros_bridge/combo_ros_bridge/scripts/combo_ros_bridge_node.py rename to ml_interfaces/bayesopt_ros_bridge/scripts/combo_ros_bridge_node.py index 47de358..068020e 100755 --- a/bayesopt_ros_bridge/combo_ros_bridge/scripts/combo_ros_bridge_node.py +++ b/ml_interfaces/bayesopt_ros_bridge/scripts/combo_ros_bridge_node.py @@ -4,8 +4,8 @@ import os import rospy import combo -from combo_ros_bridge.combo_interface import ComboInterface -from combo_ros_bridge.combo_ros_bridge import ComboROSBridge +from bayesopt_if.combo_interface import ComboInterface +from bayesopt_ros_bridge.combo_ros_bridge import ComboROSBridge def main(): diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/scripts/physbo_ros_bridge_node.py b/ml_interfaces/bayesopt_ros_bridge/scripts/physbo_ros_bridge_node.py similarity index 92% rename from bayesopt_ros_bridge/physbo_ros_bridge/scripts/physbo_ros_bridge_node.py rename to ml_interfaces/bayesopt_ros_bridge/scripts/physbo_ros_bridge_node.py index f622e31..f71fed5 100755 --- a/bayesopt_ros_bridge/physbo_ros_bridge/scripts/physbo_ros_bridge_node.py +++ b/ml_interfaces/bayesopt_ros_bridge/scripts/physbo_ros_bridge_node.py @@ -3,8 +3,8 @@ import os import rospy -from physbo_ros_bridge.physbo_interface import PhysboInterface -from physbo_ros_bridge.physbo_ros_bridge import PhysboROSBridge +from bayesopt_if.physbo_interface import PhysboInterface +from bayesopt_ros_bridge.physbo_ros_bridge import PhysboROSBridge def main(): diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/setup.py b/ml_interfaces/bayesopt_ros_bridge/setup.py similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/setup.py rename to ml_interfaces/bayesopt_ros_bridge/setup.py diff --git a/bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/__init__.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/__init__.py similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/__init__.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/__init__.py diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge.py similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge.py diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_publisher.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_publisher.py similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_publisher.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_publisher.py diff --git a/bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_subscriber.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_subscriber.py similarity index 100% rename from bayesopt_ros_bridge/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_subscriber.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/bayesopt_ros_bridge_subscriber.py diff --git a/bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/combo_ros_bridge.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/combo_ros_bridge.py similarity index 100% rename from bayesopt_ros_bridge/combo_ros_bridge/src/combo_ros_bridge/combo_ros_bridge.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/combo_ros_bridge.py diff --git a/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_ros_bridge.py b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/physbo_ros_bridge.py similarity index 88% rename from bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_ros_bridge.py rename to ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/physbo_ros_bridge.py index ab3dbb2..c5b401b 100644 --- a/bayesopt_ros_bridge/physbo_ros_bridge/src/physbo_ros_bridge/physbo_ros_bridge.py +++ b/ml_interfaces/bayesopt_ros_bridge/src/bayesopt_ros_bridge/physbo_ros_bridge.py @@ -3,7 +3,7 @@ import rospy from std_msgs.msg import * -from combo_ros_bridge.combo_ros_bridge import ComboROSBridge +from bayesopt_ros_bridge.combo_ros_bridge import ComboROSBridge class PhysboROSBridge(ComboROSBridge):