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 <parametric-curves/spline.hpp>
30 #include "boost/assign.hpp"
33 #include <dynamic-graph/signal-helper.h>
35 #include <sot/core/matrix-geometry.hh>
48 :
public ::dynamicgraph::Entity {
50 DYNAMIC_GRAPH_ENTITY_DECL();
56 void init(
const double& dt);
59 DECLARE_SIGNAL_IN(initial_value, dynamicgraph::Vector);
60 DECLARE_SIGNAL(x, OUT, dynamicgraph::Vector);
61 DECLARE_SIGNAL_IN(trigger,
bool);
62 DECLARE_SIGNAL_OUT(dx, dynamicgraph::Vector);
63 DECLARE_SIGNAL_OUT(ddx, dynamicgraph::Vector);
66 DECLARE_SIGNAL_OUT_FUNCTION(x, dynamicgraph::Vector);
71 void playTrajectoryFile(
const std::string& fileName);
73 void setSpline(
const std::string& filename,
const double& timeToInitConf,
74 const Eigen::MatrixXd& init_rotation);
77 void getValue(
const int&
id);
84 void move(
const int&
id,
const double& xFinal,
const double& time);
92 void startSinusoid(
const int&
id,
const double& xFinal,
const double& time);
100 void startTriangle(
const int&
id,
const double& xFinal,
const double& time,
110 void startConstAcc(
const int&
id,
const double& xFinal,
const double& time);
121 void startLinearChirp(
const int&
id,
const double& xFinal,
const double& f0,
122 const double& f1,
const double& time);
128 void stop(
const int&
id);
131 virtual void display(std::ostream& os)
const;
133 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
134 const char* =
"",
int = 0) {
135 logger_.stream(t) << (
"[SE3TrajectoryGenerator-" + name +
"] " + msg)
180 #endif // #ifndef __sot_torque_control_nd_trajectory_generator_H__