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__
bool m_firstIter
true if the entity has been successfully initialized
parametriccurves::Spline< double, Eigen::Dynamic > * m_splineTrajGen
std::vector< SinusoidTrajectoryGenerator * > m_sinTrajGen
std::vector< NoTrajectoryGenerator * > m_noTrajGen
#define SOTSE3TRAJECTORYGENERATOR_EXPORT
std::vector< ConstantAccelerationTrajectoryGenerator * > m_constAccTrajGen
TextFileTrajectoryGenerator * m_textFileTrajGen
std::vector< TG_Status > m_status
unsigned int m_np
control loop time period
std::vector< MinimumJerkTrajectoryGenerator * > m_minJerkTrajGen
std::vector< AbstractTrajectoryGenerator * > m_currentTrajGen
status of the component
unsigned int m_nv
size of position vector
unsigned int m_iterLast
size of velocity vector
double m_dt
true if it is the first iteration, false otherwise
Eigen::Matrix3d m_splineRotation
std::vector< TriangleTrajectoryGenerator * > m_triangleTrajGen
double m_t
last iter index
AdmittanceController EntityClassName
void sendMsg(const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0)
std::vector< LinearChirpTrajectoryGenerator * > m_linChirpTrajGen