python_parser.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #include <iostream>
6 
7 #include "pinocchio/multibody/model.hpp"
8 #include "pinocchio/multibody/data.hpp"
9 #include "pinocchio/parsers/python.hpp"
10 
11 #include <boost/test/unit_test.hpp>
12 
13 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
14 
16 {
17  std::string filename = PINOCCHIO_MODEL_DIR + std::string("/simple_model.py");
18 
19  #ifndef NDEBUG
20  std::cout << "Parse filename \"" << filename << "\"" << std::endl;
21  #endif
23  #ifndef NDEBUG
24  std::cout << "This model has \"" << model.nq << "\" DoF" << std::endl;
25  #endif
26 
27  BOOST_CHECK(model.nq==9);
28  BOOST_CHECK(model.nv==8);
29 }
30 
31 BOOST_AUTO_TEST_SUITE_END()
#define PINOCCHIO_MODEL_DIR
BOOST_AUTO_TEST_CASE(buildModel)
Model buildModel(const std::string &filename, const std::string &model_name)
Load a model from a Python script.
int nv
Dimension of the velocity vector space.
int nq
Dimension of the configuration vector representation.


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:04