diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ee84da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.sw* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..30372ed --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.5) +cmake_policy(SET CMP0048 NEW) +project(mrs_vins_mono_estimator_plugin) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +find_package(catkin REQUIRED COMPONENTS + roscpp + mrs_uav_managers + mrs_uav_state_estimators + ) + +set(LIBRARIES + MrsUavStateEstimators_VinsMono + ) + +catkin_package( + CATKIN_DEPENDS + mrs_uav_managers + mrs_uav_state_estimators + ) + +find_package(mrs_uav_state_estimators REQUIRED) + +########### +## Build ## +########### + +add_library(MrsUavStateEstimators_VinsMono + src/vins_mono_plugin.cpp + ) + +add_dependencies(MrsUavStateEstimators_VinsMono + ${${PROJECT_NAME}_EXPORTED_TARGETS} + ${catkin_EXPORTED_TARGETS} + ) + +target_link_libraries(MrsUavStateEstimators_VinsMono + ${catkin_LIBRARIES} + ) + +target_include_directories(MrsUavStateEstimators_VinsMono + PRIVATE + ${catkin_INCLUDE_DIRS} + ) + +## -------------------------------------------------------------- +## | Install | +## -------------------------------------------------------------- + +install(TARGETS ${LIBRARIES} + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} + ) + +install(DIRECTORY custom_configs + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + ) + +install(FILES estimator_plugins.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + ) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1d04bbf --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2023, Multi-robot Systems (MRS) group at Czech Technical University in Prague + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c940ed9 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# MRS VINS-Mono Estimator Plugin + +The state estimator plugin based on corrections from vins_mono algorithm. +Loaded by EstimationManager from `mrs_uav_managers`. + +> :warning: **Attention please: This README needs work.** +> +> The MRS UAV System 1.5 is being released and this page needs updating. Please, keep in mind that the information on this page might not be valid. + diff --git a/estimator_plugins.xml b/estimator_plugins.xml new file mode 100644 index 0000000..c6fab9a --- /dev/null +++ b/estimator_plugins.xml @@ -0,0 +1,5 @@ + + + vins_mono state estimator + + diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..a382276 --- /dev/null +++ b/package.xml @@ -0,0 +1,24 @@ + + + + mrs_vins_mono_estimator_plugin + 1.0.0 + MRS vins_mono state estimator plugin + + Matej Petrlik + Matej Petrlik + + TODO + + catkin + + roscpp + + mrs_uav_managers + mrs_uav_state_estimators + + + + + + diff --git a/src/vins_mono_plugin.cpp b/src/vins_mono_plugin.cpp new file mode 100644 index 0000000..630df47 --- /dev/null +++ b/src/vins_mono_plugin.cpp @@ -0,0 +1,22 @@ +#include + +namespace vins_mono +{ + +const char estimator_name[] = "vins_mono"; +const bool is_core_plugin = false; + +class VinsMono : public mrs_uav_state_estimators::StateGeneric { +public: + VinsMono() : mrs_uav_state_estimators::StateGeneric(estimator_name, is_core_plugin) { + } + + ~VinsMono(void) { + } +}; + +} // namespace vins_mono + +#include +PLUGINLIB_EXPORT_CLASS(vins_mono::VinsMono, mrs_uav_managers::StateEstimator) +