6 #ifndef __sot_torque_control_se3_trajectory_generator_H__
7 #define __sot_torque_control_se3_trajectory_generator_H__
14 #if defined(se3_position_controller_EXPORTS)
15 #define SOTSE3TRAJECTORYGENERATOR_EXPORT __declspec(dllexport)
17 #define SOTSE3TRAJECTORYGENERATOR_EXPORT __declspec(dllimport)
20 #define SOTSE3TRAJECTORYGENERATOR_EXPORT
28 #include "boost/assign.hpp"
30 #include <parametric-curves/spline.hpp>
33 #include <dynamic-graph/signal-helper.h>
34 #include <sot/core/matrix-geometry.hh>
48 DYNAMIC_GRAPH_ENTITY_DECL();
54 void init(
const double& dt);
57 DECLARE_SIGNAL_IN(initial_value, dynamicgraph::Vector);
58 DECLARE_SIGNAL(x, OUT, dynamicgraph::Vector);
59 DECLARE_SIGNAL_IN(trigger,
bool);
60 DECLARE_SIGNAL_OUT(dx, dynamicgraph::Vector);
61 DECLARE_SIGNAL_OUT(ddx, dynamicgraph::Vector);
64 DECLARE_SIGNAL_OUT_FUNCTION(x, dynamicgraph::Vector);
69 void playTrajectoryFile(
const std::string& fileName);
71 void setSpline(
const std::string& filename,
const double& timeToInitConf,
const Eigen::MatrixXd& init_rotation);
74 void getValue(
const int&
id);
81 void move(
const int&
id,
const double& xFinal,
const double& time);
88 void startSinusoid(
const int&
id,
const double& xFinal,
const double& time);
95 void startTriangle(
const int&
id,
const double& xFinal,
const double& time,
const double& Tacc);
103 void startConstAcc(
const int&
id,
const double& xFinal,
const double& time);
113 void startLinearChirp(
const int&
id,
const double& xFinal,
const double& f0,
const double& f1,
const double& time);
119 void stop(
const int&
id);
122 virtual void display(std::ostream& os)
const;
124 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
const char* =
"",
int = 0) {
125 logger_.stream(t) << (
"[SE3TrajectoryGenerator-" + name +
"] " + msg) <<
'\n';
168 #endif // #ifndef __sot_torque_control_nd_trajectory_generator_H__