Slew-rate limiter that ramps speed up linearly over a configurable distance.
More...
#include <slew.hpp>
|
| | slew () |
| | Default constructor.
|
| |
| | slew (double distance, int minimum_speed) |
| | Sets constants for slew.
|
| |
| void | constants_set (double distance, int minimum_speed) |
| | Sets constants for slew.
|
| |
| Constants | constants_get () |
| |
| void | initialize (bool enabled, double maximum_speed, double target, double current) |
| | Initializes slew for the motion.
|
| |
| double | iterate (double current) |
| | Iterates slew and ramps up speed the farther along the motion the robot gets.
|
| |
| bool | enabled () |
| | Returns true if slew is enabled, and false if it isn't.
|
| |
| double | output () |
| | Returns the last output of iterate.
|
| |
| void | speed_max_set (double speed) |
| | Sets the max speed the slew can be.
|
| |
| double | speed_max_get () |
| | Returns the max speed the slew can be.
|
| |
Slew-rate limiter that ramps speed up linearly over a configurable distance.
Initialize at the start of a motion via initialize(), then call iterate() each cycle with the current sensor position. The output ramps from min_speed to maximum_speed as the robot travels distance_to_travel.
Definition at line 29 of file slew.hpp.
◆ slew() [1/2]
◆ slew() [2/2]
| light::slew::slew |
( |
double |
distance, |
|
|
int |
minimum_speed |
|
) |
| |
Sets constants for slew.
Slew ramps up the speed of the robot until the set distance is traveled.
- Parameters
-
| distance | the distance the robot travels before reaching max speed |
| minimum_speed | the starting speed for the movement |
◆ constants_get()
◆ constants_set()
| void light::slew::constants_set |
( |
double |
distance, |
|
|
int |
minimum_speed |
|
) |
| |
Sets constants for slew.
Slew ramps up the speed of the robot until the set distance is traveled.
- Parameters
-
| distance | the distance the robot travels before reaching max speed |
| minimum_speed | the starting speed for the movement |
◆ enabled()
| bool light::slew::enabled |
( |
| ) |
|
Returns true if slew is enabled, and false if it isn't.
◆ initialize()
| void light::slew::initialize |
( |
bool |
enabled, |
|
|
double |
maximum_speed, |
|
|
double |
target, |
|
|
double |
current |
|
) |
| |
Initializes slew for the motion.
- Parameters
-
| enabled | true enables slew, false disables slew |
| maximum_speed | the target speed the robot will ramp up too |
| target | the target position for the motion |
| current | the position at the start of the motion |
◆ iterate()
| double light::slew::iterate |
( |
double |
current | ) |
|
Iterates slew and ramps up speed the farther along the motion the robot gets.
- Parameters
-
| current | current sensor value |
◆ output()
| double light::slew::output |
( |
| ) |
|
Returns the last output of iterate.
◆ speed_max_get()
| double light::slew::speed_max_get |
( |
| ) |
|
Returns the max speed the slew can be.
◆ speed_max_set()
| void light::slew::speed_max_set |
( |
double |
speed | ) |
|
Sets the max speed the slew can be.
- Parameters
-
◆ constants
Active slew constants (read/write).
Definition at line 41 of file slew.hpp.
The documentation for this class was generated from the following file: