|
Stepdance Software Library
|
Used for generating a 2D sinusoidal waveform signal along a given 2D direction. More...
#include <generators.hpp>
Public Attributes | |
| volatile ControlParameter | amplitude = 1.0 |
| Wave amplitude. | |
| BlockPort | input_frequency |
| Input BlockPort to map a variable wave frequency value. | |
| BlockPort | input_t |
| Input BlockPort to map a parameter that will be used to compute the wave. | |
| BlockPort | input_theta |
| Input BlockPort to map the desired 2D orientation of the wave. This is given as an angle in radians, indicating the desired orientation of the horizontal axis of the wave on the 2D plane. | |
| BlockPort | output_x |
| Output BlockPort for the generated position signal on axis X. | |
| BlockPort | output_y |
| Output BlockPort for the generated position signal on axis Y. | |
Protected Member Functions | |
| void | run () |
Protected Attributes | |
| volatile float64_t | current_angle_rad = 0 |
Used for generating a 2D sinusoidal waveform signal along a given 2D direction.
A WaveGenerator2D produces a sinusoidal waveform output based on an input 2D direction (provided as an angle input_theta). It allows control over amplitude, phase, and frequency, making it useful for generating or modifying motion signals with an oscillation. Here's an example of how to instantiate and configure a WaveGenerator2D:
| BlockPort WaveGenerator2D::input_frequency |
Input BlockPort to map a variable wave frequency value.
| BlockPort WaveGenerator2D::input_t |
Input BlockPort to map a parameter that will be used to compute the wave.
| BlockPort WaveGenerator2D::input_theta |
Input BlockPort to map the desired 2D orientation of the wave. This is given as an angle in radians, indicating the desired orientation of the horizontal axis of the wave on the 2D plane.
| BlockPort WaveGenerator2D::output_x |
Output BlockPort for the generated position signal on axis X.
| BlockPort WaveGenerator2D::output_y |
Output BlockPort for the generated position signal on axis Y.