diff --git a/.github/workflows/catkin_2.yml b/.github/workflows/ws_2.yml similarity index 90% rename from .github/workflows/catkin_2.yml rename to .github/workflows/ws_2.yml index f33439c7..2290858d 100644 --- a/.github/workflows/catkin_2.yml +++ b/.github/workflows/ws_2.yml @@ -44,7 +44,7 @@ jobs: repository: asherikov/ccws - uses: actions/checkout@v4 with: - path: src/ariles_catkin + path: src/ariles_ws - run: make bp_install_build BUILD_PROFILE=reldebug - - run: make dep_install PKG=ariles2_ros2param_catkin - - run: make ariles2_ros2param_catkin + - run: make dep_install PKG=ariles2_ros2param_ws + - run: make ariles2_ros2param_ws diff --git a/.make/ros.mk b/.make/ros.mk index c6532535..e5f0404f 100644 --- a/.make/ros.mk +++ b/.make/ros.mk @@ -1,16 +1,16 @@ PROJECT=ariles2 -CATKIN_PKGS= \ - ariles2_core_catkin \ - ariles2_namevalue_catkin \ - ariles2_graphviz_catkin \ - ariles2_octave_catkin \ - ariles2_rapidjson_catkin \ - ariles2_yamlcpp_catkin \ - ariles2_rosparam_catkin \ - ariles2_pugixml_catkin - -CATKIN_DEPENDENCY_TEST_PKG=ariles2_catkin_demo +WS_PKGS= \ + ariles2_core_ws \ + ariles2_namevalue2_ws \ + ariles2_graphviz_ws \ + ariles2_octave_ws \ + ariles2_rapidjson_ws \ + ariles2_yamlcpp_ws \ + ariles2_rosparam_ws \ + ariles2_pugixml_ws + +CATKIN_DEPENDENCY_TEST_PKG=ariles2_ws_demo CATKIN_ARGS=--cmake-args -DARILES_ROS_ENABLE_TESTS=ON CATKIN_TARGETS=all test @@ -28,7 +28,7 @@ ros_release: # 0. Add Forthcoming section to the changelog ${MAKE} update_version VERSION=${VERSION} -git commit -a - catkin_prepare_release -t 'catkin-' --version "${VERSION}" -y + catkin_prepare_release -t 'ws-' --version "${VERSION}" -y # initial release -> https://wiki.ros.org/bloom/Tutorials/FirstTimeRelease # subsequent releases -> bloom-release --rosdistro melodic --track melodic ${PKG} @@ -73,7 +73,7 @@ catkin_test_deb: clean ${MAKE} catkin_prepare_workspace ${MAKE} catkin_fake_rosdep mkdir -p build/dependency_test - echo ${CATKIN_PKGS} | tr " " "\n" | xargs -I {} ${MAKE} catkin_test_deb_pkg PKG="{}" ROS_DISTRO=${ROS_DISTRO} + echo ${WS_PKGS} | tr " " "\n" | xargs -I {} ${MAKE} catkin_test_deb_pkg PKG="{}" ROS_DISTRO=${ROS_DISTRO} bash -c 'source /opt/ros/${ROS_DISTRO}/setup.bash; \ cd build/dependency_test; \ cmake ../../${DEPENDENCY_PATH}/; \ @@ -88,14 +88,14 @@ catkin_fake_rosdep: # https://answers.ros.org/question/280213/generate-deb-from-dependent-res-package-locally/#280235 sudo /bin/sh -c 'echo "yaml file:///tmp/rosdep.yaml" > /etc/ros/rosdep/sources.list.d/50-ariles2.list' sudo rm -Rf /tmp/rosdep.yaml - echo ${CATKIN_PKGS} | tr " " "\n" | \ + echo ${WS_PKGS} | tr " " "\n" | \ xargs -I {} sudo /bin/sh -c 'echo "{}:" >> /tmp/rosdep.yaml; echo " ubuntu: [ros-${ROS_DISTRO}-{}]" | tr "_" "-" >> /tmp/rosdep.yaml' rosdep update catkin_old_build: catkin_prepare_workspace cd ${CATKIN_WORKING_DIR}/src; catkin_init_workspace - cd ${CATKIN_WORKING_DIR}; catkin_make_isolated --pkg ${CATKIN_PKGS} ${CATKIN_ARGS} --make-args ${CATKIN_TARGETS} # old + cd ${CATKIN_WORKING_DIR}; catkin_make_isolated --pkg ${WS_PKGS} ${CATKIN_ARGS} --make-args ${CATKIN_TARGETS} # old catkin_old_build_with_dependent: catkin_prepare_workspace cd ${CATKIN_WORKING_DIR}/src; catkin_init_workspace @@ -113,7 +113,7 @@ catkin_old_deb: catkin_prepare_workspace catkin_new_build: catkin_prepare_workspace cd ${CATKIN_WORKING_DIR}; catkin init - cd ${CATKIN_WORKING_DIR}; catkin build -i --verbose --summary ${CATKIN_PKGS} --make-args ${CATKIN_TARGETS} ${CATKIN_ARGS} + cd ${CATKIN_WORKING_DIR}; catkin build -i --verbose --summary ${WS_PKGS} --make-args ${CATKIN_TARGETS} ${CATKIN_ARGS} catkin_new_build_with_dependent: catkin_prepare_workspace cd ${CATKIN_PKGS_PATH}/demo; mv package.xml.disable package.xml diff --git a/README.md b/README.md index 812258aa..61152f2d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -This is a proxy catkin package for Ariles serialization/configuration library, -see https://github.com/asherikov/ariles for more information. +This is a proxy ROS1/ROS2 package for Ariles serialization/configuration +library, see for more information. Available data formats: - yaml @@ -7,7 +7,8 @@ Available data formats: - ROS parameter server - ROS2 parameters - Octave script (output) -- array (flattened key-value pairs) +- namevalue2 (flattened key-value pairs) +- ... Note: ariles is not a catkin package, use `catkin(DEPENDS ariles2_core_catkin)` in your CMakeLists.txt, `find_package(catkin REQUIRED ariles2_core_catkin)` diff --git a/ariles/README.md b/ariles/README.md index 1cc0e6ae..445d461b 100644 --- a/ariles/README.md +++ b/ariles/README.md @@ -11,24 +11,19 @@ Ariles pkg_catkin_2
(ROS/ROS2 packages) - - pkg_freebsd_2
- (FreeBSD package) - CI status - Build Status + Build Status - Build Status + Build Status - package @@ -45,7 +40,6 @@ Ariles - @@ -187,7 +181,7 @@ representation formats, in particular: * A set of flattened key-value pairs, output only, no dependencies: - + * `graphviz` dot files for diagram generation: diff --git a/ariles/cmake/cmakeut_compiler_flags.cmake b/ariles/cmake/cmakeut_compiler_flags.cmake index f4640668..4fc94df7 100644 --- a/ariles/cmake/cmakeut_compiler_flags.cmake +++ b/ariles/cmake/cmakeut_compiler_flags.cmake @@ -59,7 +59,7 @@ function(cmakeut_compiler_flags STANDARD) if (CMAKEUT_CLANG_TIDY) - find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy clang-tidy18 clang-tidy15 clang-tidy-14 clang-tidy-12 REQUIRED) + find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy clang-tidy18 clang-tidy15 clang-tidy-15 clang-tidy-14 clang-tidy-12 REQUIRED) set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-warnings-as-errors=*;-checks=*") diff --git a/ariles/extra_visitors/graphviz/ariles2/visitors/graphviz.h b/ariles/extra_visitors/graphviz/ariles2/visitors/graphviz.h index e8e5b37a..1f853fb8 100644 --- a/ariles/extra_visitors/graphviz/ariles2/visitors/graphviz.h +++ b/ariles/extra_visitors/graphviz/ariles2/visitors/graphviz.h @@ -131,12 +131,12 @@ namespace ariles2 void endArrayElement(); void endArray(); - - template - const Parameters getParameters(const t_Ariles &ariles_class) const - { - return (ariles_class.arilesGetParameters(*this)); - } + /* + template + const Parameters getParameters(const t_Ariles &ariles_class) const + { + return (ariles_class.arilesGetParameters(*this)); + }*/ template void startMap(t_Entry &, const Parameters ¶meters) diff --git a/ariles/extra_visitors/msgpack/src/reader.cpp b/ariles/extra_visitors/msgpack/src/reader.cpp index 4b698b3e..b6861815 100644 --- a/ariles/extra_visitors/msgpack/src/reader.cpp +++ b/ariles/extra_visitors/msgpack/src/reader.cpp @@ -69,7 +69,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW(std::string("Failed to parse the configuration file: ") + e.what()); + CPPUT_THROW("Failed to parse the configuration file: ", e.what()); } nameless_counter_ = 0; diff --git a/ariles/extra_visitors/msgpack/src/reader_compact.cpp b/ariles/extra_visitors/msgpack/src/reader_compact.cpp index b013115f..b6f32080 100644 --- a/ariles/extra_visitors/msgpack/src/reader_compact.cpp +++ b/ariles/extra_visitors/msgpack/src/reader_compact.cpp @@ -60,7 +60,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW(std::string("Failed to parse the configuration file: ") + e.what()); + CPPUT_THROW("Failed to parse the configuration file: ", e.what()); } } diff --git a/ariles/extra_visitors/namevalue/README.md b/ariles/extra_visitors/namevalue/README.md new file mode 100644 index 00000000..4be58394 --- /dev/null +++ b/ariles/extra_visitors/namevalue/README.md @@ -0,0 +1,2 @@ +Deprecated, use namevalue2. + diff --git a/ariles/extra_visitors/namevalue2/CMakeLists.txt b/ariles/extra_visitors/namevalue2/CMakeLists.txt new file mode 100644 index 00000000..a107b328 --- /dev/null +++ b/ariles/extra_visitors/namevalue2/CMakeLists.txt @@ -0,0 +1,7 @@ +set (TGT_ARILES_VISITOR_LIB "${PROJECT_NAME}_visitor_${ARILES_VISITOR}") + +add_library(${TGT_ARILES_VISITOR_LIB} STATIC + ${ARILES_VISITOR_${ARILES_VISITOR}_DIR}/src/writer.cpp +) + +include(ariles_install_component) diff --git a/ariles/extra_visitors/namevalue2/ariles2/visitors/namevalue2.h b/ariles/extra_visitors/namevalue2/ariles2/visitors/namevalue2.h new file mode 100644 index 00000000..60327243 --- /dev/null +++ b/ariles/extra_visitors/namevalue2/ariles2/visitors/namevalue2.h @@ -0,0 +1,104 @@ +/** + @file + @author Alexander Sherikov + + @copyright 2018-2024 Alexander Sherikov, Licensed under the Apache License, Version 2.0. + (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0) + + @brief +*/ + +/** +@defgroup namevalue2 NameValue2 +@ingroup config + +@brief Generates a set of pairs with flattened member names, +e.g., <"ariles_class.class_member.real_member", 3.4>. +*/ + + +#pragma once + +#define ARILES2_VISITOR_INCLUDED_namevalue2 + +#include +#include + +#include +#include + + +namespace ariles2 +{ + namespace ns_namevalue2 + { + class NameValueContainer + { + public: + virtual ~NameValueContainer() = default; + + virtual std::string &name(const std::size_t index) = 0; + virtual double &value(const std::size_t index) = 0; + virtual std::size_t size() const = 0; + virtual void reserve(const std::size_t size) = 0; + virtual void resize(const std::size_t size) = 0; + }; + + + /** + * @brief Configuration writer class + */ + class ARILES2_VISIBILITY_ATTRIBUTE Writer + : public ariles2::write::Visitor, + public serialization::NodeStackBase> + { + protected: + bool initialize_names_; + std::size_t index_; + std::shared_ptr name_value_pairs_; + + const std::string separator_ = "."; + const std::string bracket_left_ = "{"; + const std::string bracket_right_ = "}"; + + + public: + explicit Writer(const std::shared_ptr &container, const std::size_t reserve = 0); + virtual void startRoot(const std::string &name, const Parameters ¶m); + void flush(); + virtual void startMap(const Parameters &, const std::size_t num_entries); + virtual void startMapEntry(const std::string &map_name); + virtual void endMapEntry(); + virtual void endMap(); + virtual bool startIteratedMap(const std::size_t /*num_entries*/, const Parameters &); + virtual void startArray(const std::size_t size, const bool /*compact*/ = false); + virtual void endArrayElement(); + virtual void endArray(); + + +#define ARILES2_BASIC_TYPE(type) void writeElement(const type &element, const Parameters &); + + CPPUT_MACRO_SUBSTITUTE(ARILES2_BASIC_NUMERIC_TYPES_LIST) + +#undef ARILES2_BASIC_TYPE + + + void writeElement(const std::string &element, const Parameters ¶meters); + virtual const Parameters &getDefaultParameters() const; + }; + } // namespace ns_namevalue2 +} // namespace ariles2 + + +namespace ariles2 +{ + /** + * @brief NameValue2 visitor. + * @ingroup namevalue2 + */ + struct ARILES2_VISIBILITY_ATTRIBUTE namevalue2 + { + using NameValueContainer = ns_namevalue2::NameValueContainer; + using Writer = ns_namevalue2::Writer; + }; +} // namespace ariles2 diff --git a/ariles/extra_visitors/namevalue2/src/writer.cpp b/ariles/extra_visitors/namevalue2/src/writer.cpp new file mode 100644 index 00000000..bbd90f02 --- /dev/null +++ b/ariles/extra_visitors/namevalue2/src/writer.cpp @@ -0,0 +1,186 @@ +/** + @file + @author Alexander Sherikov + + @copyright 2018-2024 Alexander Sherikov, Licensed under the Apache License, Version 2.0. + (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0) + + @brief +*/ + +#include + +#include + + +namespace ariles2 +{ + namespace ns_namevalue2 + { + Writer::Writer(const std::shared_ptr &container, const std::size_t reserve) + { + name_value_pairs_ = container; + name_value_pairs_->reserve(reserve); + initialize_names_ = true; + index_ = 0; + } + + void Writer::startRoot(const std::string &name, const Writer::Parameters ¶m) + { + CPPUT_TRACE_FUNCTION; + if (not param.persistent_structure_ or 0 == name_value_pairs_->size()) + { + initialize_names_ = true; + } + + if (not name.empty()) + { + startMapEntry(name); + } + } + + void Writer::flush() + { + if (initialize_names_) + { + // drop trailing leftovers + name_value_pairs_->resize(index_); + initialize_names_ = false; + } + index_ = 0; + } + + + void Writer::startMap(const Writer::Parameters &, const std::size_t num_entries) + { + if (initialize_names_) + { + name_value_pairs_->reserve(index_ + num_entries); + } + } + + void Writer::startMapEntry(const std::string &map_name) + { + if (initialize_names_) + { + if (empty()) + { + emplace(map_name); + } + else + { + if (back().isArray()) + { + concatWithNodeAndEmplace( + bracket_left_, + boost::lexical_cast(back().index_), + bracket_right_, + separator_, + map_name); + } + else + { + concatWithNodeAndEmplace(separator_, map_name); + } + } + } + } + + void Writer::endMapEntry() + { + if (initialize_names_) + { + pop(); + } + } + + void Writer::endMap() + { + } + + + bool Writer::startIteratedMap(const std::size_t /*num_entries*/, const Writer::Parameters &) + { + return (false); + } + + void Writer::startArray(const std::size_t size, const bool /*compact*/) + { + if (initialize_names_) + { + name_value_pairs_->reserve(index_ + size); + if (back().isArray()) + { + emplace(concatWithNode(std::string("_"), boost::lexical_cast(back().index_)), 0, size); + } + else + { + emplace(back().node_, 0, size); + } + } + } + + void Writer::endArrayElement() + { + if (initialize_names_) + { + shiftArray(); + } + } + + void Writer::endArray() + { + if (initialize_names_) + { + pop(); + } + } + + +#define ARILES2_BASIC_TYPE(type) \ + void Writer::writeElement(const type &element, const Writer::Parameters &) \ + { \ + if (index_ == name_value_pairs_->size()) \ + { \ + name_value_pairs_->resize(index_ + 1); \ + } \ + if (initialize_names_) \ + { \ + name_value_pairs_->name(index_) = back().node_; \ + if (back().isArray()) \ + { \ + name_value_pairs_->name(index_) += "_"; \ + name_value_pairs_->name(index_) += boost::lexical_cast(back().index_); \ + } \ + } \ + name_value_pairs_->value(index_) = element; \ + ++index_; \ + } + + CPPUT_MACRO_SUBSTITUTE(ARILES2_BASIC_NUMERIC_TYPES_LIST) + +#undef ARILES2_BASIC_TYPE + + + void Writer::writeElement(const std::string &element, const Writer::Parameters ¶meters) + { + writeElement(element.size(), parameters); + } + + const Writer::Parameters &Writer::getDefaultParameters() const + { + static Writer::Parameters parameters(/*override_parameters=*/true); + + parameters.sloppy_maps_ = true; + parameters.sloppy_pairs_ = true; + parameters.explicit_matrix_size_ = false; + parameters.fallback_to_string_floats_ = false; + parameters.flat_matrices_ = false; + parameters.allow_missing_entries_ = true; + + parameters.persistent_structure_ = false; + + return parameters; + } + } // namespace ns_namevalue2 +} // namespace ariles2 diff --git a/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/reader.h b/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/reader.h index 2ec3db6a..b6896351 100644 --- a/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/reader.h +++ b/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/reader.h @@ -21,11 +21,13 @@ namespace ariles2 public: + /* template const Parameters &getParameters(const t_Ariles &ariles_class) const { return (ariles_class.arilesGetParameters(*this)); } + */ template @@ -38,7 +40,7 @@ namespace ariles2 } catch (std::exception &e) { - CPPUT_THROW(std::string("Copying failed: ") + e.what()); + CPPUT_THROW("Copying failed: ", e.what()); } } @@ -57,7 +59,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW("entry: " + name + " // " + std::string(e.what())); + CPPUT_THROW("entry: ", name, " // ", e.what()); } } }; diff --git a/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/writer.h b/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/writer.h index d1b688c7..94e291c3 100644 --- a/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/writer.h +++ b/ariles/extra_visitors/protobuf3/ariles2/visitors/protobuf3/writer.h @@ -21,11 +21,13 @@ namespace ariles2 public: + /* template const Parameters &getParameters(const t_Ariles &ariles_class) const { return (ariles_class.arilesGetParameters(*this)); } + */ template @@ -38,7 +40,7 @@ namespace ariles2 } catch (std::exception &e) { - CPPUT_THROW(std::string("Copying failed: ") + e.what()); + CPPUT_THROW("Copying failed: ", e.what()); } } }; diff --git a/ariles/include/ariles2/internal/exception.h b/ariles/include/ariles2/internal/exception.h index f00753fb..d3cc231f 100644 --- a/ariles/include/ariles2/internal/exception.h +++ b/ariles/include/ariles2/internal/exception.h @@ -20,16 +20,16 @@ CPPUT_THROW_EXCEPTION(std::runtime_error, cpput::concat::simple("In ", __func__, "() // ", __VA_ARGS__)) -#define CPPUT_PERSISTENT_ASSERT(condition, message) \ +#define CPPUT_PERSISTENT_ASSERT(condition, ...) \ if (!(condition)) \ { \ - CPPUT_THROW(message); \ + CPPUT_THROW(__VA_ARGS__); \ }; #ifdef DNDEBUG -# define CPPUT_ASSERT(condition, message) +# define CPPUT_ASSERT(condition, ...) #else -# define CPPUT_ASSERT(condition, message) CPPUT_PERSISTENT_ASSERT(condition, message) +# define CPPUT_ASSERT(condition, ...) CPPUT_PERSISTENT_ASSERT(condition, __VA_ARGS__) #endif #endif diff --git a/ariles/include/ariles2/visitors/common.h b/ariles/include/ariles2/visitors/common.h index 6ff11e9a..8ab80829 100644 --- a/ariles/include/ariles2/visitors/common.h +++ b/ariles/include/ariles2/visitors/common.h @@ -48,7 +48,7 @@ namespace ariles2 using Parameters = t_Parameters; public: - const t_Parameters &getDefaultParameters() const + virtual const t_Parameters &getDefaultParameters() const { const static t_Parameters parameters(false); return parameters; diff --git a/ariles/include/ariles2/visitors/copyfrom.h b/ariles/include/ariles2/visitors/copyfrom.h index 92f0d120..c5da65a3 100644 --- a/ariles/include/ariles2/visitors/copyfrom.h +++ b/ariles/include/ariles2/visitors/copyfrom.h @@ -53,7 +53,7 @@ namespace ariles2 } catch (std::exception &e) { - CPPUT_THROW(std::string("Copying failed: ") + e.what()); + CPPUT_THROW("Copying failed: ", e.what()); } } @@ -72,7 +72,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW("entry: " + name + " // " + std::string(e.what())); + CPPUT_THROW("entry: ", name, " // ", e.what()); } } }; diff --git a/ariles/include/ariles2/visitors/copyto.h b/ariles/include/ariles2/visitors/copyto.h index 87d24c70..8a0e3f81 100644 --- a/ariles/include/ariles2/visitors/copyto.h +++ b/ariles/include/ariles2/visitors/copyto.h @@ -53,7 +53,7 @@ namespace ariles2 } catch (std::exception &e) { - CPPUT_THROW(std::string("Copying failed: ") + e.what()); + CPPUT_THROW("Copying failed: ", e.what()); } } @@ -72,7 +72,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW("entry: " + name + " // " + std::string(e.what())); + CPPUT_THROW("entry: ", name, " // ", std::string(e.what())); } } }; diff --git a/ariles/include/ariles2/visitors/read.h b/ariles/include/ariles2/visitors/read.h index 6c378c6c..7a0009c2 100644 --- a/ariles/include/ariles2/visitors/read.h +++ b/ariles/include/ariles2/visitors/read.h @@ -85,8 +85,7 @@ namespace ariles2 std::string file_name_default = file_name; config_ifs.open(file_name_default.c_str()); } - CPPUT_PERSISTENT_ASSERT( - config_ifs.good(), std::string("Could not open configuration file: ") + file_name.c_str()); + CPPUT_PERSISTENT_ASSERT(config_ifs.good(), "Could not open configuration file: ", file_name.c_str()); } @@ -419,9 +418,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW( - std::string("Failed to parse entry <") + convertSubtreeToString(subtree) + "> || " - + e.what()); + CPPUT_THROW("Failed to parse entry <", convertSubtreeToString(subtree), "> || ", e.what()); } this->endRoot(subtree); @@ -430,8 +427,9 @@ namespace ariles2 { CPPUT_PERSISTENT_ASSERT( param.allow_missing_entries_, - std::string("Configuration file does not contain entry '") + convertSubtreeToString(subtree) - + "'."); + "Configuration file does not contain entry '", + convertSubtreeToString(subtree), + "'."); } } @@ -455,7 +453,7 @@ namespace ariles2 } catch (const std::exception &e) { - CPPUT_THROW(std::string("Failed to parse entry <") + name + "> || " + e.what()); + CPPUT_THROW("Failed to parse entry <", name, "> || ", e.what()); } this->endMapEntry(); @@ -465,7 +463,9 @@ namespace ariles2 { CPPUT_PERSISTENT_ASSERT( not override_missing_entries_locally and param.allow_missing_entries_, - std::string("Configuration file does not contain entry '") + name + "'."); + "Configuration file does not contain entry '", + name, + "'."); return (false); } } diff --git a/ariles/include/ariles2/visitors/serialization.h b/ariles/include/ariles2/visitors/serialization.h index 165623d0..276fbd59 100644 --- a/ariles/include/ariles2/visitors/serialization.h +++ b/ariles/include/ariles2/visitors/serialization.h @@ -26,12 +26,13 @@ namespace ariles2 class ARILES2_VISIBILITY_ATTRIBUTE Parameters : public visitor::Parameters { public: - bool sloppy_maps_; - bool sloppy_pairs_; - bool explicit_matrix_size_; - bool fallback_to_string_floats_; - bool flat_matrices_; - bool allow_missing_entries_; + bool sloppy_maps_; /// Treat key values in maps as entry names if they are strings + bool sloppy_pairs_; /// Treat first entry in an std::pair as entry name if it is a string + bool explicit_matrix_size_; /// Specify matrix size even if it is known to be constant + bool fallback_to_string_floats_; /// Allow saving floats as strings if necessary + bool flat_matrices_; /// Save matrix as a single vector + bool allow_missing_entries_; /// Do not treat missing entries as errors + bool persistent_structure_; /// Hint: expect Ariles classes with constant number of entries public: @@ -43,6 +44,7 @@ namespace ariles2 fallback_to_string_floats_ = true; flat_matrices_ = true; allow_missing_entries_ = false; + persistent_structure_ = false; } }; diff --git a/ariles/include/ariles2/visitors/write.h b/ariles/include/ariles2/visitors/write.h index 5ec97ffe..5036e0c1 100644 --- a/ariles/include/ariles2/visitors/write.h +++ b/ariles/include/ariles2/visitors/write.h @@ -56,8 +56,7 @@ namespace ariles2 config_ofs.open(file_name.c_str()); CPPUT_PERSISTENT_ASSERT( - config_ofs.good(), - std::string("Could not open configuration file for writing: ") + file_name.c_str()); + config_ofs.good(), "Could not open configuration file for writing: ", file_name.c_str()); } diff --git a/ariles/tests/api_v2/CMakeLists.txt b/ariles/tests/api_v2/CMakeLists.txt index e81bb08b..b4cfb0a7 100644 --- a/ariles/tests/api_v2/CMakeLists.txt +++ b/ariles/tests/api_v2/CMakeLists.txt @@ -80,3 +80,4 @@ ariles_define_regression_test("232" "yaml_cpp") # No ariles_define_regression_test("233" "ANY" "${ARILES_TEST_ALL_VISITORS}") # subtree read ariles_define_regression_test("234" "ANY" "${ARILES_TEST_ALL_VISITORS}") # OptionalPointer ariles_define_regression_test("235" "ros2param") # Parameter declaration +ariles_define_regression_test("236" "namevalue2") # namevalue2 diff --git a/ariles/tests/api_v2/all_enabled_visitors.h b/ariles/tests/api_v2/all_enabled_visitors.h index 63024bc3..7fb0bba0 100644 --- a/ariles/tests/api_v2/all_enabled_visitors.h +++ b/ariles/tests/api_v2/all_enabled_visitors.h @@ -48,6 +48,10 @@ // #include // #endif // +// #ifdef ARILES_VISITOR_namevalue2 +// #include +// #endif +// // #ifdef ARILES_VISITOR_graphviz -// #include +// #include // #endif diff --git a/ariles/tests/api_v2/fixtures/023_write_namevalue2.h b/ariles/tests/api_v2/fixtures/023_write_namevalue2.h new file mode 100644 index 00000000..6dec8282 --- /dev/null +++ b/ariles/tests/api_v2/fixtures/023_write_namevalue2.h @@ -0,0 +1,176 @@ +/** + @file + @author Alexander Sherikov + + @copyright 2017-2018 Alexander Sherikov, Licensed under the Apache License, Version 2.0. + (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0) + + @brief +*/ + +#pragma once + +#include +#include +#include + + +namespace ariles_tests +{ + template + class NameValue2Fixture : public t_FixtureBase + { + public: + using t_FixtureBase::getWriterInitializer; + + class NameValueVector : public ariles2::namevalue2::NameValueContainer + { + public: + std::vector> name_value_pairs_; + + public: + std::string &name(const std::size_t index) override + { + return (name_value_pairs_[index].first); + } + double &value(const std::size_t index) override + { + return (name_value_pairs_[index].second); + } + + void reserve(const std::size_t size) override + { + name_value_pairs_.reserve(size); + } + std::size_t size() const override + { + return (name_value_pairs_.size()); + } + void resize(const std::size_t size) override + { + name_value_pairs_.resize(size); + } + }; + + + + protected: + template + void test() + { + // Explicit instantiation of reader and writer classes + { + t_Configurable configurable; + configurable.randomize(); + + std::shared_ptr data = std::make_shared(); + typename t_Visitor::Writer writer(data); + ariles2::apply(writer, configurable); + + for (std::size_t i = 0; i < data->size(); ++i) + { + std::cout << data->name(i) << " = " << data->value(i) << std::endl; + } + } + + + // Explicit instantiation of reader and writer classes + id + { + t_Configurable configurable; + configurable.randomize(); + + std::shared_ptr data = std::make_shared(); + typename t_Visitor::Writer writer(data); + ariles2::apply(writer, configurable, std::string("id")); + + for (std::size_t i = 0; i < data->size(); ++i) + { + std::cout << data->name(i) << " = " << data->value(i) << std::endl; + } + } + + + // External buffers + reset + { + t_Configurable configurable; + configurable.randomize(); + + std::shared_ptr data = std::make_shared(); + typename t_Visitor::Writer writer(data); + ariles2::apply(writer, configurable); + + + NameValueVector name_value_pairs_back = *data; + + ariles2::apply(writer, configurable); + + + BOOST_CHECK_EQUAL(name_value_pairs_back.size(), data->size()); + + for (std::size_t i = 0; i < name_value_pairs_back.size(); ++i) + { + BOOST_CHECK_EQUAL(name_value_pairs_back.name(i), data->name(i)); + BOOST_CHECK_EQUAL(name_value_pairs_back.value(i), data->value(i)); + } + } + + // External buffers + reset (initialize_names = false) + { + t_Configurable configurable; + configurable.randomize(); + + ariles2::write::Parameters param; + param.persistent_structure_ = true; + std::shared_ptr data = std::make_shared(); + typename t_Visitor::Writer writer(data); + ariles2::apply(writer, configurable, param); + + + // --- + + NameValueVector name_value_pairs_back = *data; + + ariles2::apply(writer, configurable, param); + + BOOST_CHECK_EQUAL(name_value_pairs_back.size(), data->size()); + + for (std::size_t i = 0; i < data->size(); ++i) + { + BOOST_CHECK_EQUAL(name_value_pairs_back.name(i), data->name(i)); + BOOST_CHECK_EQUAL(name_value_pairs_back.value(i), data->value(i)); + } + + // --- + + data->resize(0); + + ariles2::apply(writer, configurable, param); + + BOOST_CHECK_EQUAL(name_value_pairs_back.size(), data->size()); + + for (std::size_t i = 0; i < data->size(); ++i) + { + BOOST_CHECK_EQUAL(name_value_pairs_back.name(i), data->name(i)); + BOOST_CHECK_EQUAL(name_value_pairs_back.value(i), data->value(i)); + } + + // --- + + for (std::size_t i = 0; i < data->size(); ++i) + { + data->name(i) = ""; + } + + ariles2::apply(writer, configurable, param); + + BOOST_CHECK_EQUAL(name_value_pairs_back.size(), data->size()); + + for (std::size_t i = 0; i < data->size(); ++i) + { + BOOST_CHECK_EQUAL(data->name(i), ""); + BOOST_CHECK_EQUAL(name_value_pairs_back.value(i), data->value(i)); + } + } + } + }; +} // namespace ariles_tests diff --git a/ariles/tests/api_v2/instantiate.h b/ariles/tests/api_v2/instantiate.h index 1572348f..63f0244e 100644 --- a/ariles/tests/api_v2/instantiate.h +++ b/ariles/tests/api_v2/instantiate.h @@ -53,6 +53,10 @@ ARILES_TESTS_SHORTCUT(octave, FilenameInitializer) ARILES_TESTS_SHORTCUT(namevalue, SizeInitializer) #endif +#ifdef ARILES2_VISITOR_INCLUDED_namevalue2 +ARILES_TESTS_SHORTCUT(namevalue2, SizeInitializer) +#endif + #ifdef ARILES2_VISITOR_INCLUDED_pugixml // A dirty hack to avoid fixture, which is known to fail for XML. # define ComparisonMultiFixture ComparisonSimpleFixture diff --git a/ariles/tests/api_v2/regression_test_236.cpp b/ariles/tests/api_v2/regression_test_236.cpp new file mode 100644 index 00000000..7f28dd77 --- /dev/null +++ b/ariles/tests/api_v2/regression_test_236.cpp @@ -0,0 +1,47 @@ +/** + @file + @author Alexander Sherikov + + @copyright 2017-2018 Alexander Sherikov, Licensed under the Apache License, Version 2.0. + (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0) + + @brief +*/ + + +#include "utility.h" + +#ifdef ARILES_VISITOR_namevalue2 +# include +#endif +#include "all_enabled_adapters.h" + +#include + + +// =============================================================== +// TYPES +// =============================================================== + +#include "types/complex_auto_declare.h" +#include "types/empty.h" + + +// =============================================================== +// FIXTURES +// =============================================================== + + +#include "fixtures/initializers.h" +#include "fixtures/023_write_namevalue2.h" + + +// =============================================================== +// TESTS +// =============================================================== + +#define ARILES_TESTS(VISITOR_ID, NAMESPACE, INITIALIZER) \ + ARILES_FIXTURE_TEST_CASE(NameValue2Fixture, VISITOR_ID, NAMESPACE, ConfigurableComplex, INITIALIZER) \ + ARILES_FIXTURE_TEST_CASE(NameValue2Fixture, VISITOR_ID, NAMESPACE, ConfigurableEmpty, INITIALIZER) + +#include "instantiate.h" diff --git a/ariles2_core_catkin/CHANGELOG.rst b/ariles2_core_catkin/CHANGELOG.rst deleted file mode 100644 index 047a0a40..00000000 --- a/ariles2_core_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_core_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_core_ws/CHANGELOG.rst b/ariles2_core_ws/CHANGELOG.rst new file mode 100644 index 00000000..28a50c08 --- /dev/null +++ b/ariles2_core_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_core_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_core_catkin/CMakeLists.txt b/ariles2_core_ws/CMakeLists.txt similarity index 81% rename from ariles2_core_catkin/CMakeLists.txt rename to ariles2_core_ws/CMakeLists.txt index 6e1047bd..fb07ab18 100644 --- a/ariles2_core_catkin/CMakeLists.txt +++ b/ariles2_core_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_core_catkin VERSION 2.2.0) +project(ariles2_core_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_core_catkin/package.xml b/ariles2_core_ws/package.xml similarity index 92% rename from ariles2_core_catkin/package.xml rename to ariles2_core_ws/package.xml index c25bfaae..9d4f2483 100644 --- a/ariles2_core_catkin/package.xml +++ b/ariles2_core_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_core_catkin + ariles2_core_ws 2.2.0 Ariles serialization/configuration library (core module) diff --git a/ariles2_graphviz_catkin/CHANGELOG.rst b/ariles2_graphviz_catkin/CHANGELOG.rst deleted file mode 100644 index 4b9f3e5b..00000000 --- a/ariles2_graphviz_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_graphviz_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_graphviz_ws/CHANGELOG.rst b/ariles2_graphviz_ws/CHANGELOG.rst new file mode 100644 index 00000000..e4ba0ac9 --- /dev/null +++ b/ariles2_graphviz_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_graphviz_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_graphviz_catkin/CMakeLists.txt b/ariles2_graphviz_ws/CMakeLists.txt similarity index 80% rename from ariles2_graphviz_catkin/CMakeLists.txt rename to ariles2_graphviz_ws/CMakeLists.txt index 74c1b648..55262990 100644 --- a/ariles2_graphviz_catkin/CMakeLists.txt +++ b/ariles2_graphviz_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_graphviz_catkin VERSION 2.2.0) +project(ariles2_graphviz_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_graphviz_catkin/package.xml b/ariles2_graphviz_ws/package.xml similarity index 83% rename from ariles2_graphviz_catkin/package.xml rename to ariles2_graphviz_ws/package.xml index 3afd72ba..41a0f337 100644 --- a/ariles2_graphviz_catkin/package.xml +++ b/ariles2_graphviz_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_graphviz_catkin + ariles2_graphviz_ws 2.2.0 Ariles serialization/configuration library (graphviz module) @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws cmake diff --git a/ariles2_namevalue2_ws/CMakeLists.txt b/ariles2_namevalue2_ws/CMakeLists.txt new file mode 100644 index 00000000..27f906ed --- /dev/null +++ b/ariles2_namevalue2_ws/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.0) +project(ariles2_namevalue2_ws VERSION 2.2.0) + + +option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) + +#----- +set(ARILES_COMPONENTS namevalue2) +#----- + +include(${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/common.cmake) diff --git a/ariles2_namevalue_catkin/package.xml b/ariles2_namevalue2_ws/package.xml similarity index 77% rename from ariles2_namevalue_catkin/package.xml rename to ariles2_namevalue2_ws/package.xml index 726b51ef..821bf08d 100644 --- a/ariles2_namevalue_catkin/package.xml +++ b/ariles2_namevalue2_ws/package.xml @@ -1,8 +1,8 @@ - ariles2_namevalue_catkin + ariles2_namevalue2_ws 2.2.0 - Ariles serialization/configuration library (namevalue module) + Ariles serialization/configuration library (namevalue2 module) Alexander Sherikov @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws cmake diff --git a/ariles2_namevalue_catkin/CHANGELOG.rst b/ariles2_namevalue_catkin/CHANGELOG.rst deleted file mode 100644 index f5dc1fae..00000000 --- a/ariles2_namevalue_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_namevalue_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_namevalue_catkin/CMakeLists.txt b/ariles2_namevalue_catkin/CMakeLists.txt deleted file mode 100644 index e8af2255..00000000 --- a/ariles2_namevalue_catkin/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(ariles2_namevalue_catkin VERSION 2.2.0) - - -option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) - -#----- -set(ARILES_COMPONENTS namevalue) -#----- - -include(${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/common.cmake) diff --git a/ariles2_namevalue_ws/CHANGELOG.rst b/ariles2_namevalue_ws/CHANGELOG.rst new file mode 100644 index 00000000..f3a505d9 --- /dev/null +++ b/ariles2_namevalue_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_namevalue_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_octave_catkin/CHANGELOG.rst b/ariles2_octave_catkin/CHANGELOG.rst deleted file mode 100644 index 78497b45..00000000 --- a/ariles2_octave_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_octave_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_octave_ws/CHANGELOG.rst b/ariles2_octave_ws/CHANGELOG.rst new file mode 100644 index 00000000..b94d5066 --- /dev/null +++ b/ariles2_octave_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_octave_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_octave_catkin/CMakeLists.txt b/ariles2_octave_ws/CMakeLists.txt similarity index 81% rename from ariles2_octave_catkin/CMakeLists.txt rename to ariles2_octave_ws/CMakeLists.txt index 7075aae9..d064fbff 100644 --- a/ariles2_octave_catkin/CMakeLists.txt +++ b/ariles2_octave_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_octave_catkin VERSION 2.2.0) +project(ariles2_octave_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_octave_catkin/package.xml b/ariles2_octave_ws/package.xml similarity index 83% rename from ariles2_octave_catkin/package.xml rename to ariles2_octave_ws/package.xml index 7add6f65..e121e7ef 100644 --- a/ariles2_octave_catkin/package.xml +++ b/ariles2_octave_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_octave_catkin + ariles2_octave_ws 2.2.0 Ariles serialization/configuration library (octave module) @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws cmake diff --git a/ariles2_pugixml_catkin/CHANGELOG.rst b/ariles2_pugixml_catkin/CHANGELOG.rst deleted file mode 100644 index 03808d0d..00000000 --- a/ariles2_pugixml_catkin/CHANGELOG.rst +++ /dev/null @@ -1,8 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_pugixml_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.2 (2023-03-08) ------------------- - -* Initial release of 2.X diff --git a/ariles2_pugixml_ws/CHANGELOG.rst b/ariles2_pugixml_ws/CHANGELOG.rst new file mode 100644 index 00000000..5b0994c7 --- /dev/null +++ b/ariles2_pugixml_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_pugixml_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_pugixml_catkin/CMakeLists.txt b/ariles2_pugixml_ws/CMakeLists.txt similarity index 81% rename from ariles2_pugixml_catkin/CMakeLists.txt rename to ariles2_pugixml_ws/CMakeLists.txt index 04f9b7a8..d8e66e34 100644 --- a/ariles2_pugixml_catkin/CMakeLists.txt +++ b/ariles2_pugixml_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_pugixml_catkin VERSION 2.2.0) +project(ariles2_pugixml_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_pugixml_catkin/package.xml b/ariles2_pugixml_ws/package.xml similarity index 84% rename from ariles2_pugixml_catkin/package.xml rename to ariles2_pugixml_ws/package.xml index c6303041..2b1bf00b 100644 --- a/ariles2_pugixml_catkin/package.xml +++ b/ariles2_pugixml_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_pugixml_catkin + ariles2_pugixml_ws 2.2.0 Ariles serialization/configuration library (PugiXML module) @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws pugixml-dev diff --git a/ariles2_rapidjson_catkin/CHANGELOG.rst b/ariles2_rapidjson_catkin/CHANGELOG.rst deleted file mode 100644 index c7465120..00000000 --- a/ariles2_rapidjson_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_rapidjson_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_rapidjson_ws/CHANGELOG.rst b/ariles2_rapidjson_ws/CHANGELOG.rst new file mode 100644 index 00000000..d8eb51f6 --- /dev/null +++ b/ariles2_rapidjson_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_rapidjson_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_rapidjson_catkin/CMakeLists.txt b/ariles2_rapidjson_ws/CMakeLists.txt similarity index 80% rename from ariles2_rapidjson_catkin/CMakeLists.txt rename to ariles2_rapidjson_ws/CMakeLists.txt index dbe9302d..48bdc6b1 100644 --- a/ariles2_rapidjson_catkin/CMakeLists.txt +++ b/ariles2_rapidjson_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_rapidjson_catkin VERSION 2.2.0) +project(ariles2_rapidjson_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_rapidjson_catkin/package.xml b/ariles2_rapidjson_ws/package.xml similarity index 84% rename from ariles2_rapidjson_catkin/package.xml rename to ariles2_rapidjson_ws/package.xml index 82596671..02ff9b9d 100644 --- a/ariles2_rapidjson_catkin/package.xml +++ b/ariles2_rapidjson_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_rapidjson_catkin + ariles2_rapidjson_ws 2.2.0 Ariles serialization/configuration library (RapidJSON module) @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws rapidjson-dev diff --git a/ariles2_ros2param_catkin/CHANGELOG.rst b/ariles2_ros2param_catkin/CHANGELOG.rst deleted file mode 100644 index f7456ae2..00000000 --- a/ariles2_ros2param_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_rosparam_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_ros2param_ws/CHANGELOG.rst b/ariles2_ros2param_ws/CHANGELOG.rst new file mode 100644 index 00000000..9a3994be --- /dev/null +++ b/ariles2_ros2param_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_rosparam_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_ros2param_catkin/CMakeLists.txt b/ariles2_ros2param_ws/CMakeLists.txt similarity index 80% rename from ariles2_ros2param_catkin/CMakeLists.txt rename to ariles2_ros2param_ws/CMakeLists.txt index cc7466ab..e2a67d07 100644 --- a/ariles2_ros2param_catkin/CMakeLists.txt +++ b/ariles2_ros2param_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_ros2param_catkin VERSION 2.2.0) +project(ariles2_ros2param_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_ros2param_catkin/package.xml b/ariles2_ros2param_ws/package.xml similarity index 83% rename from ariles2_ros2param_catkin/package.xml rename to ariles2_ros2param_ws/package.xml index d3b1d4d9..273b4682 100644 --- a/ariles2_ros2param_catkin/package.xml +++ b/ariles2_ros2param_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_ros2param_catkin + ariles2_ros2param_ws 2.2.0 Ariles serialization/configuration library (rosparam module) @@ -11,7 +11,7 @@ cmake rclcpp - ariles2_core_catkin + ariles2_core_ws cmake diff --git a/ariles2_rosparam_catkin/CHANGELOG.rst b/ariles2_rosparam_catkin/CHANGELOG.rst deleted file mode 100644 index f7456ae2..00000000 --- a/ariles2_rosparam_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_rosparam_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_rosparam_ws/CHANGELOG.rst b/ariles2_rosparam_ws/CHANGELOG.rst new file mode 100644 index 00000000..9a3994be --- /dev/null +++ b/ariles2_rosparam_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_rosparam_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_rosparam_catkin/CMakeLists.txt b/ariles2_rosparam_ws/CMakeLists.txt similarity index 80% rename from ariles2_rosparam_catkin/CMakeLists.txt rename to ariles2_rosparam_ws/CMakeLists.txt index c94e3c04..8141d6dc 100644 --- a/ariles2_rosparam_catkin/CMakeLists.txt +++ b/ariles2_rosparam_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_rosparam_catkin VERSION 2.2.0) +project(ariles2_rosparam_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_rosparam_catkin/package.xml b/ariles2_rosparam_ws/package.xml similarity index 84% rename from ariles2_rosparam_catkin/package.xml rename to ariles2_rosparam_ws/package.xml index bf54d1f3..be31ab98 100644 --- a/ariles2_rosparam_catkin/package.xml +++ b/ariles2_rosparam_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_rosparam_catkin + ariles2_rosparam_ws 2.2.0 Ariles serialization/configuration library (rosparam module) @@ -11,7 +11,7 @@ cmake roscpp - ariles2_core_catkin + ariles2_core_ws cmake diff --git a/ariles2_yamlcpp_catkin/CHANGELOG.rst b/ariles2_yamlcpp_catkin/CHANGELOG.rst deleted file mode 100644 index 8864db68..00000000 --- a/ariles2_yamlcpp_catkin/CHANGELOG.rst +++ /dev/null @@ -1,9 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package ariles2_yamlcpp_catkin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -2.0.0 (2020-12-17) ------------------- - -* Initial release of 2.X -* Separate ROS packages for ariles modules with 3-rd party dependencies. diff --git a/ariles2_yamlcpp_ws/CHANGELOG.rst b/ariles2_yamlcpp_ws/CHANGELOG.rst new file mode 100644 index 00000000..677009bc --- /dev/null +++ b/ariles2_yamlcpp_ws/CHANGELOG.rst @@ -0,0 +1,7 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ariles2_yamlcpp_ws +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2.3.0 (2024-07-20) +------------------ + diff --git a/ariles2_yamlcpp_catkin/CMakeLists.txt b/ariles2_yamlcpp_ws/CMakeLists.txt similarity index 81% rename from ariles2_yamlcpp_catkin/CMakeLists.txt rename to ariles2_yamlcpp_ws/CMakeLists.txt index 1f58c84d..78cccb7b 100644 --- a/ariles2_yamlcpp_catkin/CMakeLists.txt +++ b/ariles2_yamlcpp_ws/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(ariles2_yamlcpp_catkin VERSION 2.2.0) +project(ariles2_yamlcpp_ws VERSION 2.2.0) option(ARILES_ROS_ENABLE_TESTS "Enable tests." OFF) diff --git a/ariles2_yamlcpp_catkin/package.xml b/ariles2_yamlcpp_ws/package.xml similarity index 84% rename from ariles2_yamlcpp_catkin/package.xml rename to ariles2_yamlcpp_ws/package.xml index 21e1a9b5..9fd4c7e8 100644 --- a/ariles2_yamlcpp_catkin/package.xml +++ b/ariles2_yamlcpp_ws/package.xml @@ -1,6 +1,6 @@ - ariles2_yamlcpp_catkin + ariles2_yamlcpp_ws 2.2.0 Ariles serialization/configuration library (yaml-cpp module) @@ -10,7 +10,7 @@ cmake - ariles2_core_catkin + ariles2_core_ws yaml-cpp diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 1f5b79aa..854d72a9 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -4,24 +4,24 @@ set(CMAKE_VERBOSE_MAKEFILE ON) if (DEFINED CATKIN_DEVEL_PREFIX) - project(ariles2_catkin_demo) + project(ariles2_ws_demo) find_package(catkin REQUIRED - ariles2_core_catkin - ariles2_rosparam_catkin - ariles2_rapidjson_catkin - ariles2_yamlcpp_catkin - ariles2_octave_catkin - ariles2_pugixml_catkin + ariles2_core_ws + ariles2_rosparam_ws + ariles2_rapidjson_ws + ariles2_yamlcpp_ws + ariles2_octave_ws + ariles2_pugixml_ws ) catkin_package(DEPENDS - ariles2_core_catkin - ariles2_rosparam_catkin - ariles2_rapidjson_catkin - ariles2_yamlcpp_catkin - ariles2_octave_catkin - ariles2_pugixml_catkin + ariles2_core_ws + ariles2_rosparam_ws + ariles2_rapidjson_ws + ariles2_yamlcpp_ws + ariles2_octave_ws + ariles2_pugixml_ws ) include_directories( @@ -41,21 +41,21 @@ if (DEFINED CATKIN_DEVEL_PREFIX) else() project(ariles2_demo) - find_package(ariles2_core_catkin REQUIRED) - find_package(ariles2_rosparam_catkin REQUIRED) - find_package(ariles2_rapidjson_catkin REQUIRED) - find_package(ariles2_yamlcpp_catkin REQUIRED) - find_package(ariles2_octave_catkin REQUIRED) - find_package(ariles2_pugixml_catkin REQUIRED) + find_package(ariles2_core_ws REQUIRED) + find_package(ariles2_rosparam_ws REQUIRED) + find_package(ariles2_rapidjson_ws REQUIRED) + find_package(ariles2_yamlcpp_ws REQUIRED) + find_package(ariles2_octave_ws REQUIRED) + find_package(ariles2_pugixml_ws REQUIRED) add_executable(demo demo.cpp) target_link_libraries(demo - ${ariles2_core_catkin_LIBRARIES} - ${ariles2_rosparam_catkin_LIBRARIES} - ${ariles2_rapidjson_catkin_LIBRARIES} - ${ariles2_yamlcpp_catkin_LIBRARIES} - ${ariles2_octave_catkin_LIBRARIES} - ${ariles2_pugixml_catkin_LIBRARIES} + ${ariles2_core_ws_LIBRARIES} + ${ariles2_rosparam_ws_LIBRARIES} + ${ariles2_rapidjson_ws_LIBRARIES} + ${ariles2_yamlcpp_ws_LIBRARIES} + ${ariles2_octave_ws_LIBRARIES} + ${ariles2_pugixml_ws_LIBRARIES} ) endif() diff --git a/demo/package.xml.disable b/demo/package.xml.disable index 2e5eb99f..378b6b11 100644 --- a/demo/package.xml.disable +++ b/demo/package.xml.disable @@ -1,6 +1,6 @@ - ariles2_catkin_demo + ariles2_ws_demo 0.0.0 ariles2 demo / dependency test @@ -10,12 +10,12 @@ catkin - ariles2_core_catkin - ariles2_rosparam_catkin - ariles2_rapidjson_catkin - ariles2_yamlcpp_catkin - ariles2_octave_catkin - ariles2_pugixml_catkin + ariles2_core_ws + ariles2_rosparam_ws + ariles2_rapidjson_ws + ariles2_yamlcpp_ws + ariles2_octave_ws + ariles2_pugixml_ws