test_dyn.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 /* -------------------------------------------------------------------------- */
11 /* --- INCLUDES ------------------------------------------------------------- */
12 /* -------------------------------------------------------------------------- */
14 
15 #include <iostream>
16 #include <sstream>
17 
18 using namespace std;
19 using namespace dynamicgraph::sot;
20 
21 int main(int argc, char* argv[]) {
22  if (argc != 5) {
23  cerr << "Usage:" << endl;
24  cerr << "./" << argv[0]
25  << " DIR_OF_VRML_MODEL VRML_MODEL_FILENAME PATH_TO_SPECIFICITIES_FILE "
26  "PATH_TO_LINK2JOINT_FILE "
27  << endl;
28  cerr << " DIR_OF_VRML_MODEL : Directory where the robot VRML model lies. "
29  << endl;
30  cerr << " VRML_MODEL_FILENAME : Filename of the VRML model describing the "
31  "robot."
32  << endl;
33  cerr << " PATH_TO_SPECIFICITIES_FILE : Path to the file describing the "
34  "humanoid robot specificities."
35  << endl;
36  cerr << " PATH_TO_LINK2JOINT_FILE: Path to the file describing the "
37  "relationship of the joint and the state vector."
38  << endl;
39  }
40  Dynamic* dyn = new Dynamic("tot");
41  try {
42  dyn->setVrmlDirectory(argv[1]);
43  dyn->setXmlSpecificityFile(argv[3]);
44  dyn->setXmlRankFile(argv[4]);
45  dyn->setVrmlMainFile(argv[2]);
46 
47  dyn->parseConfigFiles();
48  } catch (ExceptionDynamic& e) {
49  if (!strcmp(e.what(), "Error while parsing.")) {
50  cout << "Could not locate the necessary files for this test" << endl;
51  return 77;
52  } else
53  // rethrow
54  throw e;
55  }
56 
57  istringstream iss;
58  string help("help");
59 
60  delete dyn;
61  return 0;
62 }
kineromeo.dyn
dyn
Definition: kineromeo.py:86
dynamic-pinocchio.h
dynamicgraph::sot::ExceptionDynamic
dynamic_pinocchio.tools.help
help
Definition: tools.py:150
main
int main(int argc, char *argv[])
Definition: test_dyn.cpp:21
dynamicgraph::sot
dynamicgraph::ExceptionAbstract::what
virtual const char * what() const


sot-dynamic-pinocchio
Author(s): Olivier Stasse
autogenerated on Fri Jul 28 2023 02:10:01