diff --git a/CMakeLists.txt b/CMakeLists.txt index 16afcf8b28d1689789b8eeca74831e9284cafda4..6cc480a9a7d4bbece36571450e6631ca1a2a4cb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set (CMAKE_CXX_STANDARD 11) # Project properties set(PROJECT_NAMESPACE gepetto) -set(PROJECT_NAME example-adder) +set(PROJECT_NAME mpc-wbc-cpp) set(PROJECT_DESCRIPTION "This is an example project, to show how to use Gepetto's tools") set(PROJECT_URL https://gitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME}) diff --git a/include/example-adder/MPC.hpp b/include/mpc-wbc-cpp/MPC.hpp similarity index 100% rename from include/example-adder/MPC.hpp rename to include/mpc-wbc-cpp/MPC.hpp diff --git a/include/example-adder/Planner.hpp b/include/mpc-wbc-cpp/Planner.hpp similarity index 100% rename from include/example-adder/Planner.hpp rename to include/mpc-wbc-cpp/Planner.hpp diff --git a/include/example-adder/gepadd.hpp b/include/mpc-wbc-cpp/gepadd.hpp similarity index 71% rename from include/example-adder/gepadd.hpp rename to include/mpc-wbc-cpp/gepadd.hpp index d31fe2d50f0f855eb5e9dde03d5800a0db66017a..fa412f2bea40e216bfadbf66db5d48db2275f2e4 100644 --- a/include/example-adder/gepadd.hpp +++ b/include/mpc-wbc-cpp/gepadd.hpp @@ -1,5 +1,5 @@ -#ifndef __example_adder_gep_add__ -#define __example_adder_gep_add__ +#ifndef __mpc_wbc_cpp_gep_add__ +#define __mpc_wbc_cpp_gep_add__ namespace gepetto { namespace example { diff --git a/python/example_adder/__init__.py b/python/example_adder/__init__.py deleted file mode 100644 index d76540ff51866219226c5f821274ee0ff3bf53aa..0000000000000000000000000000000000000000 --- a/python/example_adder/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .libexample_adder import * # noqa: F401 diff --git a/python/gepadd.cpp b/python/gepadd.cpp index 8c780586d67894e09cfede289471196f6daa4c1a..41ce91a39a9a1e80466ffcc4f274ffdbcddf4a7a 100644 --- a/python/gepadd.cpp +++ b/python/gepadd.cpp @@ -1,6 +1,6 @@ -#include "example-adder/gepadd.hpp" -#include "example-adder/MPC.hpp" -#include "example-adder/Planner.hpp" +#include "mpc-wbc-cpp/gepadd.hpp" +#include "mpc-wbc-cpp/MPC.hpp" +#include "mpc-wbc-cpp/Planner.hpp" #include <eigenpy/eigenpy.hpp> #include <boost/python.hpp> @@ -64,7 +64,7 @@ struct PlannerPythonVisitor : public bp::def_visitor<PlannerPythonVisitor<Planne void exposePlanner() { PlannerPythonVisitor<Planner>::expose(); } -BOOST_PYTHON_MODULE(libexample_adder) { +BOOST_PYTHON_MODULE(libmpc_wbc_cpp) { boost::python::def("add", gepetto::example::add); boost::python::def("sub", gepetto::example::sub); diff --git a/python/mpc_wbc_cpp/__init__.py b/python/mpc_wbc_cpp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21b023b09eb750ba7b23bda7e210361fc6ac5acd --- /dev/null +++ b/python/mpc_wbc_cpp/__init__.py @@ -0,0 +1 @@ +from .libmpc_wbc_cpp import * # noqa: F401 diff --git a/src/MPC.cpp b/src/MPC.cpp index 873caa639d0cbb67ad900dfc838389fd83179678..a4fceab34401d079c73aa75c2db0cbe52ad7f7eb 100644 --- a/src/MPC.cpp +++ b/src/MPC.cpp @@ -1,4 +1,4 @@ -#include "example-adder/MPC.hpp" +#include "mpc-wbc-cpp/MPC.hpp" MPC::MPC(double dt_in, int n_steps_in, double T_gait_in) { // std::cout << "START INIT" << std::endl; diff --git a/src/Planner.cpp b/src/Planner.cpp index 4c5354400599c4533b27469123e5a9ef17f6dc47..759010e884ee32e0773cb6fc8eff11b1e3d25d58 100644 --- a/src/Planner.cpp +++ b/src/Planner.cpp @@ -1,4 +1,4 @@ -#include "example-adder/Planner.hpp" +#include "mpc-wbc-cpp/Planner.hpp" Planner::Planner(double dt_in, double dt_tsid_in, double T_gait_in, double T_mpc_in, int k_mpc_in, bool on_solo8_in, double h_ref_in, const Eigen::MatrixXd &fsteps_in) { diff --git a/src/gepadd.cpp b/src/gepadd.cpp index 361da27528ff40845e7860e2b8c283ddc29f01fb..be9b212d5e3d815b276a004b9b4ce50372aa28d5 100644 --- a/src/gepadd.cpp +++ b/src/gepadd.cpp @@ -1,4 +1,4 @@ -#include "example-adder/gepadd.hpp" +#include "mpc-wbc-cpp/gepadd.hpp" namespace gepetto { namespace example { diff --git a/src/main.cpp b/src/main.cpp index ce4c303381ed90414eea32bf07133358b03dda6f..8943f86acda177d3eb36400edeb0b7022f21f423 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,10 +3,10 @@ #include <boost/smart_ptr/shared_ptr.hpp> #include <Eigen/Core> -#include "example-adder/gepadd.hpp" -#include "example-adder/MPC.hpp" +#include "mpc-wbc-cpp/gepadd.hpp" +#include "mpc-wbc-cpp/MPC.hpp" #include "other/st_to_cc.hpp" -#include "example-adder/Planner.hpp" +#include "mpc-wbc-cpp/Planner.hpp" #include "pinocchio/math/rpy.hpp" int main(int argc, char** argv) { diff --git a/tests/add.cpp b/tests/add.cpp index 5d926ed95c9990fec326f1679e5e1a670947ae39..533b90c61b98d263accd3753a842475d7a8f83dc 100644 --- a/tests/add.cpp +++ b/tests/add.cpp @@ -1,5 +1,5 @@ #include <cassert> -#include "example-adder/gepadd.hpp" +#include "mpc-wbc-cpp/gepadd.hpp" int main() { assert(gepetto::example::add(1, 2) == 3); diff --git a/tests/boost_add.cpp b/tests/boost_add.cpp index ca4669bad84aa6e21a241a597edc4830baa04538..1e2277c14eba70ca87f58fb6fe43b3955cde52a7 100644 --- a/tests/boost_add.cpp +++ b/tests/boost_add.cpp @@ -1,6 +1,6 @@ #include <boost/test/unit_test.hpp> -#include "example-adder/gepadd.hpp" +#include "mpc-wbc-cpp/gepadd.hpp" BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE) diff --git a/tests/python/test_add.py b/tests/python/test_add.py index 1a729c35b064bdae3a13d11be82b4535a6e45e1d..c914266ff64d09ef92782d69220589f0d27f5690 100644 --- a/tests/python/test_add.py +++ b/tests/python/test_add.py @@ -1,6 +1,6 @@ import unittest -import example_adder as exa +import mpc_wbc_cpp as exa class TestAdder(unittest.TestCase):