sot-torque-control  1.6.5
Collection of dynamic-graph entities aimed at implementing torque control on different robots.
LinearChirpTrajectoryGenerator Class Reference

#include <sot/torque_control/utils/trajectory-generators.hh>

Inheritance diagram for LinearChirpTrajectoryGenerator:
Collaboration diagram for LinearChirpTrajectoryGenerator:

Public Member Functions

 LinearChirpTrajectoryGenerator (double dt, double traj_time, int size)
 
const Eigen::VectorXd & compute_next_point ()
 
virtual bool set_final_frequency (const Eigen::VectorXd &f1)
 
virtual bool set_final_frequency (const double &f1)
 
virtual bool set_initial_frequency (const Eigen::VectorXd &f0)
 
virtual bool set_initial_frequency (const double &f0)
 
- Public Member Functions inherited from AbstractTrajectoryGenerator
 AbstractTrajectoryGenerator (double dt, double traj_time, Eigen::VectorXd::Index size)
 
 AbstractTrajectoryGenerator (double dt, double traj_time, const Eigen::VectorXd &x_init, const Eigen::VectorXd &x_final)
 
virtual const Eigen::VectorXd & get_final_point ()
 
virtual const Eigen::VectorXd & get_initial_point ()
 
virtual const Eigen::VectorXd & getAcc ()
 
virtual const Eigen::VectorXd & getPos ()
 
virtual const Eigen::VectorXd & getVel ()
 
virtual bool isTrajectoryEnded ()
 
virtual bool set_final_point (const Eigen::VectorXd &x_final)
 
virtual bool set_final_point (const double &x_final)
 
virtual bool set_initial_point (const Eigen::VectorXd &x_init)
 
virtual bool set_initial_point (const double &x_init)
 
virtual bool set_trajectory_time (double traj_time)
 

Protected Attributes

Eigen::VectorXd m_ddp
 
Eigen::VectorXd m_dp
 
Eigen::VectorXd m_f
 frequency first derivative More...
 
Eigen::VectorXd m_f0
 
Eigen::VectorXd m_f1
 initial frequency More...
 
Eigen::VectorXd m_k
 final frequency More...
 
Eigen::VectorXd m_p
 phase shift for second half of trajectory More...
 
Eigen::VectorXd m_phi
 current frequency (i.e. time derivative of the phase over 2*pi) More...
 
Eigen::VectorXd m_phi_0
 current phase More...
 
- Protected Attributes inherited from AbstractTrajectoryGenerator
Eigen::VectorXd m_ddx
 current velocity More...
 
double m_dt
 time to go from x_init to x_final (sec) More...
 
Eigen::VectorXd m_dx
 current position More...
 
Eigen::VectorXd::Index m_size
 current time More...
 
double m_t
 control dt (sampling period of the trajectory) More...
 
double m_traj_time
 final position More...
 
Eigen::VectorXd m_x
 
Eigen::VectorXd m_x_final
 initial position More...
 
Eigen::VectorXd m_x_init
 current acceleration More...
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractTrajectoryGenerator
virtual void resizeAllData (Eigen::VectorXd::Index size)
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0)
 

Detailed Description

Linear chirp trajectory generator. A linear chirp is a sinusoid whose frequency is a linear function of time. In particular the frequency starts from a value f0 and it increases linearly up to a value f1. Then it goes back to f0 and the trajectory is ended.

Definition at line 399 of file trajectory-generators.hh.

Constructor & Destructor Documentation

◆ LinearChirpTrajectoryGenerator()

LinearChirpTrajectoryGenerator ( double  dt,
double  traj_time,
int  size 
)
inline

Definition at line 415 of file trajectory-generators.hh.

Member Function Documentation

◆ compute_next_point()

const Eigen::VectorXd& compute_next_point ( )
inlinevirtual

Implements AbstractTrajectoryGenerator.

Definition at line 452 of file trajectory-generators.hh.

◆ set_final_frequency() [1/2]

virtual bool set_final_frequency ( const Eigen::VectorXd &  f1)
inlinevirtual

Definition at line 440 of file trajectory-generators.hh.

◆ set_final_frequency() [2/2]

virtual bool set_final_frequency ( const double &  f1)
inlinevirtual

Definition at line 446 of file trajectory-generators.hh.

◆ set_initial_frequency() [1/2]

virtual bool set_initial_frequency ( const Eigen::VectorXd &  f0)
inlinevirtual

Definition at line 428 of file trajectory-generators.hh.

◆ set_initial_frequency() [2/2]

virtual bool set_initial_frequency ( const double &  f0)
inlinevirtual

Definition at line 434 of file trajectory-generators.hh.

Member Data Documentation

◆ m_ddp

Eigen::VectorXd m_ddp
protected

Definition at line 412 of file trajectory-generators.hh.

◆ m_dp

Eigen::VectorXd m_dp
protected

Definition at line 411 of file trajectory-generators.hh.

◆ m_f

Eigen::VectorXd m_f
protected

frequency first derivative

Definition at line 407 of file trajectory-generators.hh.

◆ m_f0

Eigen::VectorXd m_f0
protected

Definition at line 401 of file trajectory-generators.hh.

◆ m_f1

Eigen::VectorXd m_f1
protected

initial frequency

Definition at line 402 of file trajectory-generators.hh.

◆ m_k

Eigen::VectorXd m_k
protected

final frequency

Variables for temporary results

Definition at line 405 of file trajectory-generators.hh.

◆ m_p

Eigen::VectorXd m_p
protected

phase shift for second half of trajectory

Definition at line 410 of file trajectory-generators.hh.

◆ m_phi

Eigen::VectorXd m_phi
protected

current frequency (i.e. time derivative of the phase over 2*pi)

Definition at line 408 of file trajectory-generators.hh.

◆ m_phi_0

Eigen::VectorXd m_phi_0
protected

current phase

Definition at line 409 of file trajectory-generators.hh.


The documentation for this class was generated from the following file: