sot-torque-control  1.6.5
Collection of dynamic-graph entities aimed at implementing torque control on different robots.
stc-commands.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2017,
3  * Florent Lamiraux, Rohan Budhiraja
4  *
5  * CNRS/AIST
6  *
7  */
8 
9 #ifndef STC_COMMAND_HH
10 #define STC_COMMAND_HH
11 
12 #include <dynamic-graph/command-getter.h>
13 #include <dynamic-graph/command-setter.h>
14 #include <dynamic-graph/command.h>
15 
16 #include <boost/assign/list_of.hpp>
17 #include <fstream>
19 
20 namespace dynamicgraph {
21 namespace sot {
22 namespace command {
23 using ::dynamicgraph::command::Command;
24 using ::dynamicgraph::command::Value;
25 using ::dynamicgraph::sot::torque_control::JointTrajectoryGenerator;
26 // Command DisplayModel
27 class IsTrajectoryEnded : public Command {
28  public:
29  virtual ~IsTrajectoryEnded() {
30  sotDEBUGIN(15);
31  sotDEBUGOUT(15);
32  }
36  IsTrajectoryEnded(JointTrajectoryGenerator& entity,
37  const std::string& docstring)
38  : Command(entity, std::vector<Value::Type>(), docstring) {}
39  virtual Value doExecute() {
40  JointTrajectoryGenerator& jtg =
41  static_cast<JointTrajectoryGenerator&>(owner());
42  bool output = jtg.isTrajectoryEnded();
43  return Value(output);
44  }
45 }; // class IsTrajectoryEnded
46 
47 } // namespace command
48 } /* namespace sot */
49 } /* namespace dynamicgraph */
50 
51 #endif // STC_COMMAND_HH
IsTrajectoryEnded(JointTrajectoryGenerator &entity, const std::string &docstring)
Definition: stc-commands.hh:36
to read text file
Definition: treeview.dox:22