Generates a sine sweep for frequency analysis of a joint. More...
#include <sine_sweep.h>
Public Member Functions | |
bool | init (double start_freq, double end_freq, double duration, double amplitude) |
Intializes everything and calculates the constants for the sweep. More... | |
SineSweep () | |
Constructor. More... | |
double | update (ros::Duration dt) |
Update the SineSweep loop with nonuniform time step size. More... | |
~SineSweep () | |
Destructor. More... | |
Private Attributes | |
double | amplitude_ |
double | cmd_ |
ros::Duration | duration_ |
double | end_angular_freq_ |
double | K_ |
double | L_ |
double | start_angular_freq_ |
Generates a sine sweep for frequency analysis of a joint.
This class basically calculates the output for a sine sweep. Where the signal is a sine wave, whose frequency is exponentially increased from to over seconds.
where:
.
Definition at line 92 of file sine_sweep.h.
control_toolbox::SineSweep::SineSweep | ( | ) |
Constructor.
Definition at line 74 of file sine_sweep.cpp.
control_toolbox::SineSweep::~SineSweep | ( | ) |
Destructor.
Definition at line 83 of file sine_sweep.cpp.
bool control_toolbox::SineSweep::init | ( | double | start_freq, |
double | end_freq, | ||
double | duration, | ||
double | amplitude | ||
) |
Intializes everything and calculates the constants for the sweep.
start_freq | Start frequency of the sweep, . |
end_freq | End frequency of the sweep, . |
duration | The duration of the sweep, . |
amplitude | The amplitude of the sweep, . |
Definition at line 87 of file sine_sweep.cpp.
double control_toolbox::SineSweep::update | ( | ros::Duration | dt | ) |
Update the SineSweep loop with nonuniform time step size.
dt | Change in time since last call |
Definition at line 110 of file sine_sweep.cpp.
|
private |
Amplitude of the sweep.
Definition at line 124 of file sine_sweep.h.
|
private |
Command to send.
Definition at line 130 of file sine_sweep.h.
|
private |
Duration of the sweep.
Definition at line 125 of file sine_sweep.h.
|
private |
End angular frequency of the sweep.
Definition at line 127 of file sine_sweep.h.
|
private |
Constant .
Definition at line 128 of file sine_sweep.h.
|
private |
Constant .
Definition at line 129 of file sine_sweep.h.
|
private |
Start angular frequency of the sweep.
Definition at line 126 of file sine_sweep.h.