test_traces.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 
13 #include <dynamic-graph/signal.h>
14 #include <dynamic-graph/tracer.h>
15 
16 #include <iostream>
17 #include <sot/core/debug.hh>
18 
19 using namespace std;
20 using namespace dynamicgraph;
21 using namespace dynamicgraph::sot;
22 
23 double &f(double &res, const int & /*t*/) {
24  cout << "SIGM!" << endl;
25  return res;
26 }
27 
28 int main() {
29  Signal<Vector, int> sig1("sig1");
30  Vector v1(2);
31  v1.fill(1.1);
32  sig1 = v1;
33 
34  Signal<Vector, int> sig2("sig2");
35  Vector v2(4);
36  v2.fill(2.);
37  sig2 = v2;
38 
39  Signal<Vector, int> sig3("sig3");
40  Vector v3(6);
41  v3.fill(3.);
42  sig3 = v3;
43 
45  sigM.access(0);
46 
47  Tracer *tracer = new Tracer("trace");
48  tracer->addSignalToTrace(sig1);
49  tracer->openFiles("/tmp/sot-core", "tr_", ".dat");
50 
51  tracer->addSignalToTrace(sig2);
52 
53  return 0;
54 }
const T & access(const Time &t1)
Eigen::VectorXd Vector
int main()
Definition: test_traces.cpp:28
void openFiles(const std::string &rootdir, const std::string &basename, const std::string &suffix)
void addSignalToTrace(const SignalBase< int > &sig, const std::string &filename="")
DYNAMIC_GRAPH_DLLAPI SignalArray< int > sotNOSIGNAL
double & f(double &res, const int &)
Definition: test_traces.cpp:23


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26