From e3d90b99722ae59a13aea6721e859f6a5b7f7768 Mon Sep 17 00:00:00 2001 From: Pooyan Jamshidi Date: Tue, 13 Mar 2018 19:48:16 -0400 Subject: [PATCH] Added plugin file and some other boilerplate --- .gitignore | 121 ++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 8 +-- LICENSE | 19 +++++++ README.md | 6 +++ src/config_list.json | 52 ++++++++++++++++++ src/config_plugin.cpp | 1 + src/config_plugin.h | 10 ++++ 7 files changed, 213 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100755 README.md create mode 100644 src/config_list.json create mode 100644 src/config_plugin.cpp create mode 100644 src/config_plugin.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d79a542 --- /dev/null +++ b/.gitignore @@ -0,0 +1,121 @@ +# Docker stuff +*.swp +*.swo + +# temp folders +tmp/ +temp/ + +# mac stuff +.DS_Store + +# PyCharm +.idea/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +cmake-build-debug/ +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index f548ee9..079bba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,10 +120,10 @@ include_directories( ${catkin_INCLUDE_DIRS} ) -## Declare a C++ library -# add_library(${PROJECT_NAME} -# src/${PROJECT_NAME}/brass_gazebo_config_manager.cpp -# ) +# Declare a C++ library + add_library(${PROJECT_NAME} + src/config_plugin.cpp + ) ## Add cmake target dependencies of the library ## as an example, code may need to be generated before libraries diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7aa3caf --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..584f3e9 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Functionality +The configuration manager of the bot that receives a power model and maintain the current configuration of the robot. When the configuration of the robot would change, it will reflect the change to power consumption by changing the coefficient of the power usage in the battery plugin. + +# Maintainer + +If you need a new feature to be added, please contact [Pooyan Jamshidi](https://pooyanjamshidi.github.io) \ No newline at end of file diff --git a/src/config_list.json b/src/config_list.json new file mode 100644 index 0000000..f553807 --- /dev/null +++ b/src/config_list.json @@ -0,0 +1,52 @@ +{ + "1":{ + "config_id": 12, + "power_load": 60, + "speed": 0.4 + }, + "2":{ + "config_id": 32, + "power_load": 55, + "speed": 0.5 + }, + "3":{ + "config_id": 125, + "power_load": 76, + "speed": 0.7 + }, + "4":{ + "config_id": 345, + "power_load": 76, + "speed": 0.7 + }, + "5":{ + "config_id": 432, + "power_load": 76, + "speed": 0.7 + }, + "6":{ + "config_id": 555, + "power_load": 76, + "speed": 0.7 + }, + "7":{ + "config_id": 666, + "power_load": 76, + "speed": 0.7 + }, + "8":{ + "config_id": 777, + "power_load": 76, + "speed": 0.7 + }, + "9":{ + "config_id": 999, + "power_load": 76, + "speed": 0.7 + }, + "10":{ + "config_id": 888, + "power_load": 76, + "speed": 0.7 + } +} \ No newline at end of file diff --git a/src/config_plugin.cpp b/src/config_plugin.cpp new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/config_plugin.cpp @@ -0,0 +1 @@ + diff --git a/src/config_plugin.h b/src/config_plugin.h new file mode 100644 index 0000000..70a2a9b --- /dev/null +++ b/src/config_plugin.h @@ -0,0 +1,10 @@ +#ifndef BRASS_GAZEBO_CONFIG_MANAGER_CONFIG_PLUGIN_H +#define BRASS_GAZEBO_CONFIG_MANAGER_CONFIG_PLUGIN_H + +namespace gazebo{ + +} + + + +#endif //BRASS_GAZEBO_CONFIG_MANAGER_CONFIG_PLUGIN_H