diff --git a/CMakeLists.txt b/CMakeLists.txt index fd7799af086ffd518448571625253f3ad07e11f2..305d3210e8f1130896930df5173d34a4b52cc970 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,9 @@ include/${PROJECT_NAME}/sensor/sensor_force_torque.h include/${PROJECT_NAME}/sensor/sensor_inertial_kinematics.h include/${PROJECT_NAME}/sensor/sensor_point_feet_nomove.h ) +SET(HDRS_UTILS +include/${PROJECT_NAME}/utils/load_bodydynamics.h + ) # ============ SOURCES ============ SET(SRCS_CAPTURE @@ -158,6 +161,9 @@ src/sensor/sensor_force_torque.cpp src/sensor/sensor_inertial_kinematics.cpp src/sensor/sensor_point_feet_nomove.cpp ) +SET(SRCS_UTILS +src/utils/load_bodydynamics.cpp + ) # create the shared library ADD_LIBRARY(${PLUGIN_NAME} @@ -166,6 +172,7 @@ ADD_LIBRARY(${PLUGIN_NAME} ${SRCS_FEATURE} ${SRCS_PROCESSOR} ${SRCS_SENSOR} + ${SRCS_UTILS} ) # Set compiler options @@ -243,6 +250,8 @@ INSTALL(FILES ${HDRS_PROCESSOR} DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}/processor) INSTALL(FILES ${HDRS_SENSOR} DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}/sensor) +INSTALL(FILES ${HDRS_UTILS} + DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}/utils) INSTALL(FILES "${WOLF_CONFIG_DIR}/config.h" DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}/internal) diff --git a/include/bodydynamics/capture/capture_leg_odom.h b/include/bodydynamics/capture/capture_leg_odom.h index 54f6bfaec0f2226f4dd1f86721d24b0376555b70..a627834d258d68c5baf85d5a895f06b31a437118 100644 --- a/include/bodydynamics/capture/capture_leg_odom.h +++ b/include/bodydynamics/capture/capture_leg_odom.h @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_capture_leg_odom.h - * - * Created on: May 12, 2020 - * \author: mfourmy - */ - #ifndef CAPTURE_LEG_ODOM_H #define CAPTURE_LEG_ODOM_H diff --git a/include/bodydynamics/capture/capture_point_feet_nomove.h b/include/bodydynamics/capture/capture_point_feet_nomove.h index 1223076c798a3acb4d3e6d7ae9dc2325a142e98a..cc6370c969bfd288bf60b29219883cac29d90ef2 100644 --- a/include/bodydynamics/capture/capture_point_feet_nomove.h +++ b/include/bodydynamics/capture/capture_point_feet_nomove.h @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * - * Created on: Oct 23, 2020 - * \author: mfourmy - */ - #ifndef CAPTURE_POINT_FEET_NOMOVE_H #define CAPTURE_POINT_FEET_NOMOVE_H diff --git a/include/bodydynamics/factor/factor_force_torque.h b/include/bodydynamics/factor/factor_force_torque.h index 12af1ce4fff3cef1c30c028403e8173330aeee28..36729a22384aee1398e8a19ed9e50573e9c490e9 100644 --- a/include/bodydynamics/factor/factor_force_torque.h +++ b/include/bodydynamics/factor/factor_force_torque.h @@ -17,16 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file factor_force_torque.h - * - * Created on: Feb 19, 2020 - * \author: mfourmy - * - * Works only for 2 limbs - */ - - #ifndef FACTOR_FORCE_TORQUE_H_ #define FACTOR_FORCE_TORQUE_H_ diff --git a/include/bodydynamics/factor/factor_inertial_kinematics.h b/include/bodydynamics/factor/factor_inertial_kinematics.h index 81c2a76522cd710810bd91f1c53be3617fcd2933..00e175871240151ed6b3088e09cfe0ff92bcec5b 100644 --- a/include/bodydynamics/factor/factor_inertial_kinematics.h +++ b/include/bodydynamics/factor/factor_inertial_kinematics.h @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file factor_inertial_kinematics.h - * - * Created on: Feb 17, 2020 - * \author: mfourmy - */ #ifndef FACTOR_INERTIAL_KINEMATICS_H_ #define FACTOR_INERTIAL_KINEMATICS_H_ diff --git a/include/bodydynamics/factor/factor_point_feet_altitude.h b/include/bodydynamics/factor/factor_point_feet_altitude.h index 1f9faf168e46c25c975963d34ec3defedffcf460..d0ad5cd288d91be9cf6add747fa356cd821b9fe2 100644 --- a/include/bodydynamics/factor/factor_point_feet_altitude.h +++ b/include/bodydynamics/factor/factor_point_feet_altitude.h @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file factor_point_feet_altitude.h - * - * Created on: Nov 5, 2020 - * \author: mfourmy - */ #ifndef FACTOR_POINT_FEET_ALTITUDE_H_ #define FACTOR_POINT_FEET_ALTITUDE_H_ diff --git a/include/bodydynamics/factor/factor_point_feet_nomove.h b/include/bodydynamics/factor/factor_point_feet_nomove.h index 3c5448326316773cf28f5e11990c96926bd93963..efe0dcfb1d44b76ef529b10528b537beef3363de 100644 --- a/include/bodydynamics/factor/factor_point_feet_nomove.h +++ b/include/bodydynamics/factor/factor_point_feet_nomove.h @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file factor_point_feet_nomove.h - * - * Created on: Feb 22, 2020 - * \author: mfourmy - */ #ifndef FACTOR_POINT_FEET_NOMOVE_H_ #define FACTOR_POINT_FEET_NOMOVE_H_ diff --git a/include/bodydynamics/factor/factor_point_feet_zero_velocity.h b/include/bodydynamics/factor/factor_point_feet_zero_velocity.h index 92c5c93a48d785ebd4fe82871e9a2977a59e819c..ac18bc84ea80262df158aa5f46537ae405cf47b3 100644 --- a/include/bodydynamics/factor/factor_point_feet_zero_velocity.h +++ b/include/bodydynamics/factor/factor_point_feet_zero_velocity.h @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file factor_point_feet_nomove.h - * - * Created on: Feb 22, 2020 - * \author: mfourmy - */ #ifndef FACTOR_POINT_FEET_ZERO_VELOCITY_H_ #define FACTOR_POINT_FEET_ZERO_VELOCITY_H_ diff --git a/include/bodydynamics/utils/load_gnss.h b/include/bodydynamics/utils/load_gnss.h new file mode 100644 index 0000000000000000000000000000000000000000..66fbd584ed2c0ebd8db14acb5fd8e0ff3db2b82a --- /dev/null +++ b/include/bodydynamics/utils/load_gnss.h @@ -0,0 +1,51 @@ +// WOLF - Copyright (C) 2020,2021,2022,2023 +// Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and +// Joan Vallvé Navarro (jvallve@iri.upc.edu) +// All rights reserved. +// +// This file is part of WOLF: http://www.iri.upc.edu/wolf +// WOLF is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +#pragma once + +namespace wolf +{ +// This class is just to force the .so to be easily loaded in tests +class LoadGnss +{ + public: + static bool aux_var; +}; + +#ifdef __GNUC__ +#define WOLF_UNUSED __attribute__((used)) +#elif defined _MSC_VER +#pragma warning(disable : Cxxxxx) +#define WOLF_UNUSED +#elif defined(__LCLINT__) +#define WOLF_UNUSED /*@unused@*/ +#elif defined(__cplusplus) +#define WOLF_UNUSED +#else +#define UNUSED(x) x +#endif + +#define WOLF_LOAD_GNSS \ + namespace \ + { \ + const bool WOLF_UNUSED aux_var_gnss = wolf::LoadGnss::aux_var; \ + } + +} // namespace wolf diff --git a/src/capture/capture_leg_odom.cpp b/src/capture/capture_leg_odom.cpp index 04b6e878874b3e05e6d525c03b4fcb8325848fe6..f6d977014c59fb3a59ced7d56a0ddc9d6b472294 100644 --- a/src/capture/capture_leg_odom.cpp +++ b/src/capture/capture_leg_odom.cpp @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file capture_leg_odom.cpp - * - * Created on: May 12, 2020 - * \author: mfourmy - */ #include "core/math/rotations.h" diff --git a/src/capture/capture_point_feet_nomove.cpp b/src/capture/capture_point_feet_nomove.cpp index ea6d4b6dddea5da8013b07f5329d504036c5480b..904db89da9c0ffc5c34b6e3b2b640020a51e57e3 100644 --- a/src/capture/capture_point_feet_nomove.cpp +++ b/src/capture/capture_point_feet_nomove.cpp @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file capture_point_feet_nomove.cpp - * - * Created on: Oct 23, 2020 - * \author: mfourmy - */ #include "core/capture/capture_base.h" diff --git a/src/processor/processor_inertial_kinematics.cpp b/src/processor/processor_inertial_kinematics.cpp index 7802d0b77472b4c3809166dcd6f6545778093a1d..513575d542c9bd122a9664e583f0273942b2c42b 100644 --- a/src/processor/processor_inertial_kinematics.cpp +++ b/src/processor/processor_inertial_kinematics.cpp @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file processor_inertial_kinematics.cpp - * - * Created on: Feb 27, 2020 - * \author: jsola - */ #include "bodydynamics/processor/processor_inertial_kinematics.h" diff --git a/src/processor/processor_point_feet_nomove.cpp b/src/processor/processor_point_feet_nomove.cpp index 363329ea4962fb23ba4d34c7ebb8dbfc6dbf4e14..110ea42787e57339120215a6f266619f3d7b01d0 100644 --- a/src/processor/processor_point_feet_nomove.cpp +++ b/src/processor/processor_point_feet_nomove.cpp @@ -17,12 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file processor_point_feet_nomove.cpp - * - * Created on: Oct 23, 2020 - * \author: mfourmy - */ #include "bodydynamics/processor/processor_point_feet_nomove.h" diff --git a/src/utils/load_gnss.cpp b/src/utils/load_gnss.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5bda1d4e9a0f02de63e3298120599da606fa37c5 --- /dev/null +++ b/src/utils/load_gnss.cpp @@ -0,0 +1,26 @@ +// WOLF - Copyright (C) 2020,2021,2022,2023 +// Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and +// Joan Vallvé Navarro (jvallve@iri.upc.edu) +// All rights reserved. +// +// This file is part of WOLF: http://www.iri.upc.edu/wolf +// WOLF is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +#include "gnss/utils/load_gnss.h" + +namespace wolf +{ +bool LoadGnss::aux_var = true; +} // namespace wolf diff --git a/test/gtest_capture_inertial_kinematics.cpp b/test/gtest_capture_inertial_kinematics.cpp index 1875a5b80e20516be0b1bb9bd6f2437c57d89b2a..bf576e1c3c0999d087aba68d4300d55b8170606d 100644 --- a/test/gtest_capture_inertial_kinematics.cpp +++ b/test/gtest_capture_inertial_kinematics.cpp @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_capture_inertial_kinematics.cpp - * - * Created on: Feb 28, 2020 - * \author: jsola - */ - #include "bodydynamics/capture/capture_inertial_kinematics.h" #include "bodydynamics/sensor/sensor_inertial_kinematics.h" diff --git a/test/gtest_capture_leg_odom.cpp b/test/gtest_capture_leg_odom.cpp index ac3feac7071010ee741881d1e8df946a98438a67..040f186eae8f3d80b5fd180b4ebe37bbc75a09ce 100644 --- a/test/gtest_capture_leg_odom.cpp +++ b/test/gtest_capture_leg_odom.cpp @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_capture_leg_odom.cpp - * - * Created on: May 12, 2020 - * \author: mfourmy - */ - #include "bodydynamics/capture/capture_leg_odom.h" diff --git a/test/gtest_factor_force_torque.cpp b/test/gtest_factor_force_torque.cpp index 7b4f2412aba12e8ba44f4910ba4ff34579dcba94..2953dcb5bae0ba8b9ae8756f57758273bd4ec07f 100644 --- a/test/gtest_factor_force_torque.cpp +++ b/test/gtest_factor_force_torque.cpp @@ -18,16 +18,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_factor_inertial_kinematics.cpp - * - * Created on: Janv 29, 2020 - * \author: Mederic Fourmy - */ - /* - - Organisation: For each test, the problem, sensors, factors (if possible) are instanciated in a base class inheriting fromtesting::Test only. Then, each test case is derived in a child class which defines the data processed by the different sensors and expected estimated test values. Finally, each of these child classes is used in one or several Test in which basically the expected values are compared against estimation and diff --git a/test/gtest_factor_inertial_kinematics.cpp b/test/gtest_factor_inertial_kinematics.cpp index 3f3a4c26d576ab5985009a5d250c71bb91415fc9..fbe458ecacd97ab5a8b4ce7dbc415cfa2f0a7dc3 100644 --- a/test/gtest_factor_inertial_kinematics.cpp +++ b/test/gtest_factor_inertial_kinematics.cpp @@ -18,16 +18,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_factor_inertial_kinematics.cpp - * - * Created on: Janv 29, 2020 - * \author: Mederic Fourmy - */ - /* - - Organisation: For each test, the problem, sensors, factors (if possible) are instanciated in a base class inheriting fromtesting::Test only. Then, each test case is derived in a child class which defines the data processed by the different sensors and expected estimated test values. Finally, each of these child classes is used in one or several Test in which basically the expected values are compared against estimation and diff --git a/test/gtest_feature_inertial_kinematics.cpp b/test/gtest_feature_inertial_kinematics.cpp index 7c2d214ccebcec043e157597ae84285a25fdd42c..41a3ff1801d99f32fe057b20f56af8df15b78541 100644 --- a/test/gtest_feature_inertial_kinematics.cpp +++ b/test/gtest_feature_inertial_kinematics.cpp @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_feature_inertial_kinematics.cpp - * - * Created on: March 9, 2020 - * \author: mfourmy - */ - #include "bodydynamics/feature/feature_inertial_kinematics.h" diff --git a/test/gtest_processor_force_torque_preint.cpp b/test/gtest_processor_force_torque_preint.cpp index 0f41953666862deb475bf7986c5327332e4f9237..a5310ae4c9cc081707a3816dada1838de984ad49 100644 --- a/test/gtest_processor_force_torque_preint.cpp +++ b/test/gtest_processor_force_torque_preint.cpp @@ -18,13 +18,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_factor_force_torque_preint.cpp - * - * Created on: March 20, 2020 - * \author: Mederic Fourmy - */ - // debug #include <iostream> #include <fstream> diff --git a/test/gtest_processor_inertial_kinematics.cpp b/test/gtest_processor_inertial_kinematics.cpp index 0978ee38256bd8f76f478acc3dd9f69fbeb7781f..1fd6469e6d25229dce77fcd01a7c551cdd245113 100644 --- a/test/gtest_processor_inertial_kinematics.cpp +++ b/test/gtest_processor_inertial_kinematics.cpp @@ -18,13 +18,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_factor_inertial_kinematics.cpp - * - * Created on: March 9, 2020 - * \author: Mederic Fourmy - */ - // debug #include <iostream> #include <fstream> diff --git a/test/gtest_processor_point_feet_nomove.cpp b/test/gtest_processor_point_feet_nomove.cpp index 381e0deed7acf8f6e3e940707b368dd0cb61e9cc..9657f6db825e08ce095403c7c83c8bd7c049be88 100644 --- a/test/gtest_processor_point_feet_nomove.cpp +++ b/test/gtest_processor_point_feet_nomove.cpp @@ -18,13 +18,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_processor_point_feet_nomove.cpp - * - * Created on: October 28, 2020 - * \author: Mederic Fourmy - */ - // debug #include <iostream> #include <fstream> diff --git a/test/gtest_sensor_force_torque.cpp b/test/gtest_sensor_force_torque.cpp index 1f61b42da49729f73b555980e17d42c20dc6fd90..a486849b63fef25aa632444156018c39aa6e2e8a 100644 --- a/test/gtest_sensor_force_torque.cpp +++ b/test/gtest_sensor_force_torque.cpp @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_sensor_force_torque.cpp - * - * Created on: Feb 26, 2020 - * \author: jsola - */ - #include "bodydynamics/sensor/sensor_force_torque.h" diff --git a/test/gtest_sensor_inertial_kinematics.cpp b/test/gtest_sensor_inertial_kinematics.cpp index c54c825b35916b3db57721d62c252681a864dd3f..9a623206eea317ec347c4928b0dcef6731900f15 100644 --- a/test/gtest_sensor_inertial_kinematics.cpp +++ b/test/gtest_sensor_inertial_kinematics.cpp @@ -17,13 +17,6 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -/** - * \file gtest_sensor_inertial_kinematics.cpp - * - * Created on: Feb 28, 2020 - * \author: jsola - */ - #include "bodydynamics/sensor/sensor_inertial_kinematics.h"