Skip to content
Snippets Groups Projects
Commit 1b3f25ea authored by Pierre-Alexandre Leziart's avatar Pierre-Alexandre Leziart
Browse files

Switching to mpc-wbc-cpp library instead of example-adder

parent 46850de6
No related branches found
No related tags found
No related merge requests found
Pipeline #12504 failed
......@@ -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})
......
File moved
File moved
#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 {
......
from .libexample_adder import * # noqa: F401
#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);
......
from .libmpc_wbc_cpp import * # noqa: F401
#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;
......
#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) {
......
#include "example-adder/gepadd.hpp"
#include "mpc-wbc-cpp/gepadd.hpp"
namespace gepetto {
namespace example {
......
......@@ -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) {
......
#include <cassert>
#include "example-adder/gepadd.hpp"
#include "mpc-wbc-cpp/gepadd.hpp"
int main() {
assert(gepetto::example::add(1, 2) == 3);
......
#include <boost/test/unit_test.hpp>
#include "example-adder/gepadd.hpp"
#include "mpc-wbc-cpp/gepadd.hpp"
BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
......
import unittest
import example_adder as exa
import mpc_wbc_cpp as exa
class TestAdder(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment