simpleseqplay.hh
Go to the documentation of this file.
1 //
2 // Copyright (C) 2012, 2013 LAAS-CNRS
3 //
4 // From Author: Florent Lamiraux, Mehdi Benallegue,
5 // Author: Olivier Stasse
6 // Simple sequence player just playing back a set of poses.
7 //
8 
9 #ifndef SOT_TOOLS_SIMPLE_SEQPLAY_HH
10 #define SOT_TOOLS_SIMPLE_SEQPLAY_HH
11 
12 #include <dynamic-graph/entity.h>
13 #include <dynamic-graph/factory.h>
17 
18 #include <fstream>
19 #include <iostream>
21 #include <sstream>
22 
23 namespace dynamicgraph {
24 namespace sot {
25 namespace tools {
26 namespace dg = dynamicgraph;
27 
28 class SimpleSeqPlay : public dg::Entity {
29  public:
30  typedef int Dummy;
33 
35 
37  SimpleSeqPlay(const std::string& name);
38 
39  void load(const std::string& filename);
40  void start();
41  virtual std::string getDocString() const;
42 
43  bool waiting() const;
44  bool initializing() const;
45  bool executing() const;
46  bool finished() const;
47 
48  private:
50  // 0: motion not started,
51  // 1: going to the current position to the first position.
52  // 2: motion in progress, 3: motion finished
53  unsigned int state_;
55 
56  std::vector<dg::Vector> posture_;
58 
59  std::vector<double> time_;
60  double dt_;
63  // Number of iterations performed in state1.
65 
66 }; // class SimpleSeqPlay
67 } // namespace tools
68 } // namespace sot
69 } // namespace dynamicgraph
70 
71 #endif // SOT_TOOLS_SIMPLESEQPLAY_HH
signal-ptr.h
signal-time-dependent.h
dynamicgraph::sot::tools::SimpleSeqPlay::startTime_
sigtime_t startTime_
Definition: simpleseqplay.hh:54
dynamicgraph::SignalPtr< dg::Vector, sigtime_t >
dynamicgraph
matrix-geometry.hh
dynamicgraph::sot::tools::SimpleSeqPlay::state_
unsigned int state_
Definition: simpleseqplay.hh:53
dynamicgraph::Entity
dynamicgraph::sot::tools::SimpleSeqPlay::initializing
bool initializing() const
Definition: simpleseqplay.cc:188
dynamicgraph::Entity::name
std::string name
dynamicgraph::sot::tools::SimpleSeqPlay::dt_
double dt_
Definition: simpleseqplay.hh:60
dynamicgraph::sot::tools::SimpleSeqPlay
Definition: simpleseqplay.hh:28
dynamicgraph::sot::tools::SimpleSeqPlay::start
void start()
Definition: simpleseqplay.cc:134
dynamicgraph::sot::tools::SimpleSeqPlay::SimpleSeqPlay
SimpleSeqPlay(const std::string &name)
Definition: simpleseqplay.cc:35
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::sot::tools::SimpleSeqPlay::finished
bool finished() const
Definition: simpleseqplay.cc:190
dynamicgraph::sot::tools::SimpleSeqPlay::DYNAMIC_GRAPH_ENTITY_DECL
DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::Vector
Eigen::VectorXd Vector
dynamicgraph::sot::tools::SimpleSeqPlay::time_
std::vector< double > time_
Definition: simpleseqplay.hh:59
dynamicgraph::sot::tools::SimpleSeqPlay::postureSOUT_
dg::SignalTimeDependent< dg::Vector, sigtime_t > postureSOUT_
Definition: simpleseqplay.hh:32
linear-algebra.h
dynamicgraph::sot::tools::SimpleSeqPlay::waiting
bool waiting() const
Definition: simpleseqplay.cc:187
dynamicgraph::sot::tools::SimpleSeqPlay::firstSINTERN
dg::SignalTimeDependent< Dummy, sigtime_t > firstSINTERN
Definition: simpleseqplay.hh:31
dynamicgraph::sot::tools::SimpleSeqPlay::posture_
std::vector< dg::Vector > posture_
Definition: simpleseqplay.hh:56
dynamicgraph::SignalTimeDependent< Dummy, sigtime_t >
dynamicgraph::sot::tools::SimpleSeqPlay::currentPostureSIN_
dg::SignalPtr< dg::Vector, sigtime_t > currentPostureSIN_
Definition: simpleseqplay.hh:34
dynamicgraph::sot::tools::SimpleSeqPlay::it_nbs_in_state1_
int it_nbs_in_state1_
Definition: simpleseqplay.hh:64
dynamicgraph::sot::tools::SimpleSeqPlay::getDocString
virtual std::string getDocString() const
Definition: simpleseqplay.cc:192
dynamicgraph::sot::tools::SimpleSeqPlay::time_to_start_
double time_to_start_
Time to start.
Definition: simpleseqplay.hh:62
dynamicgraph::sot::tools::SimpleSeqPlay::computePosture
dg::Vector & computePosture(dg::Vector &pos, int t)
Definition: simpleseqplay.cc:141
t
Transform3f t
dynamicgraph::sot::tools::SimpleSeqPlay::executing
bool executing() const
Definition: simpleseqplay.cc:189
dynamicgraph::sot::tools::SimpleSeqPlay::currentPosture_
dg::Vector currentPosture_
Definition: simpleseqplay.hh:57
dynamicgraph::sot::tools::SimpleSeqPlay::Dummy
int Dummy
Definition: simpleseqplay.hh:30
dynamicgraph::sot::tools::SimpleSeqPlay::load
void load(const std::string &filename)
Definition: simpleseqplay.cc:83


sot-tools
Author(s): Mehdi Benallegue, Francois Keith, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Jorrit T'Hooft
autogenerated on Wed Aug 2 2023 02:35:13