![]() |
fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
|
#include "fastcat/trap.h"#include <assert.h>#include <math.h>#include <stdbool.h>#include "jsd/jsd_print.h"
Macros | |
| #define | SIGN(X) (((X) >= 0) - ((X) < 0)) |
Functions | |
| int | fastcat_trap_generate (fastcat_trap_t *self, double t_init_sec, double pos_init, double pos_fini, double vel_init, double vel_fini, double vel_max, double acc) |
| Sets up math for creating a simple trapezoidal position profile. | |
| int | fastcat_trap_update (fastcat_trap_t *self, double t, double *pos, double *vel) |
| int | fastcat_trap_generate_vel (fastcat_trap_t *self, double t_init_sec, double pos_init, double vel_init, double vel_fini, double acc, double max_time) |
| int | fastcat_trap_update_vel (fastcat_trap_t *self, double t, double *pos, double *vel) |
| void | fastcat_trap_print_fastcat_trap_values (fastcat_trap_t *self) |
| #define SIGN | ( | X | ) | (((X) >= 0) - ((X) < 0)) |
| int fastcat_trap_generate | ( | fastcat_trap_t * | self, |
| double | t_init_sec, | ||
| double | pos_init, | ||
| double | pos_fini, | ||
| double | vel_init, | ||
| double | vel_fini, | ||
| double | vel_max, | ||
| double | acc | ||
| ) |
Sets up math for creating a simple trapezoidal position profile.
| self | trap main object |
| t_init_sec | initial absolute time in seconds |
| pos_init | initial position for the profile |
| pos_fini | final position for the profile |
| vel_init | initial velocity for the profile |
| vel_fini | final velocity for the profile |
| vel_max | cruising speed for the profile |
| acc | max acceleration/deceleration for the profile |
< initial velocity
< final velocity
< cruising ("max") velocity
< total distance from initial to final
< acceleration time from initial to max
< decleration time from max to final
< acceleration distance from initial to max
< deceleration distance from max to final
< initial position
< final position
< total time for constant velocity phase (cruising time)
< distance travelled during constant velocity phase (cruising distance)
< min value
< actual capped max velocity in order to not overshoot during a non-trapezoidal profile
< total distance (including direction)
< initial velocity
< final velocity
< acceleration magnitude. direction is enforced elsewhere
| int fastcat_trap_generate_vel | ( | fastcat_trap_t * | self, |
| double | t_init_sec, | ||
| double | pos_init, | ||
| double | vel_init, | ||
| double | vel_fini, | ||
| double | acc, | ||
| double | max_time | ||
| ) |
| void fastcat_trap_print_fastcat_trap_values | ( | fastcat_trap_t * | self | ) |
| int fastcat_trap_update | ( | fastcat_trap_t * | self, |
| double | t, | ||
| double * | pos, | ||
| double * | vel | ||
| ) |

| int fastcat_trap_update_vel | ( | fastcat_trap_t * | self, |
| double | t, | ||
| double * | pos, | ||
| double * | vel | ||
| ) |