Robotran C Documentation
mbs_trajectories.h
Go to the documentation of this file.
1 /*
2  * Main header of some trajectories functions
3  *
4  * authors: Robotran Team
5  */
6 #ifndef _MBS_TRAJECTORIES_H_
7 #define _MBS_TRAJECTORIES_H_
8 
9 #ifndef _USE_MATH_DEFINES
10 #define _USE_MATH_DEFINES // to use M_PI in Windows
11 #endif // !_USE_MATH_DEFINES
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <string.h>
15 #include <math.h>
16 
34 int mbs_get_ramp_time(double *t1, double *t2, double *t3,
35  double delta_q, double v12, double a01, double a23, double t0);
36 
37 
55 int mbs_ramp_3_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax);
56 
57 
75 int mbs_ramp_5_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax);
76 
77 
98 int mbs_ramp_2_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax);
99 
121 int mbs_ramp_3_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax);
122 
145 int mbs_ramp_4_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax);
146 
168 int mbs_ramp_2_order_3_piece_from_acc_vel(double *q, double *qd, double *qdd, double tsim, double v12, double a01, double a23, double t0, double qmax);
169 
186 void mbs_cosine_signal(double tsim, double ampl, double phi, double f, double off, double* q, double* qd, double* qdd);
187 
204 void mbs_sine_signal(double tsim, double ampl, double phi, double f, double off, double* q, double* qd, double* qdd);
205 
206 
224 void sweep(double tsim, double t0, double f0, double t1, double f1, double zmax, double* z, double* zd, double *zdd);
225 
241 void mbs_sigmoid(double tsim, double lambda, double t0, double* q, double* qd, double* qdd);
242 
259 void mbs_add_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double* q3, double* qd3, double* qdd3);
260 
277 void mbs_sub_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double* q3, double* qd3, double* qdd3);
278 
295 void mbs_mult_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double* q3, double* qd3, double* qdd3);
296 
314 int mbs_div_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double* q3, double* qd3, double* qdd3);
315 
316 
317 #endif
mbs_ramp_4_order_3_piece
int mbs_ramp_4_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 4-order ramp trajectory.
Definition: mbs_trajectories.c:218
mbs_div_signal
int mbs_div_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the division of 2 signals.
Definition: mbs_trajectories.c:329
mbs_ramp_2_order_3_piece
int mbs_ramp_2_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 2-order ramp trajectory.
Definition: mbs_trajectories.c:112
mbs_error_msg
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
mbs_mult_signal
void mbs_mult_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the multiplication of 2 signals.
Definition: mbs_trajectories.c:322
sweep
void sweep(double tsim, double t0, double f0, double t1, double f1, double zmax, double *z, double *zd, double *zdd)
Compute a frequency sweep on a sine signal.
Definition: mbs_trajectories.c:272
mbs_ramp_4_order_3_piece
int mbs_ramp_4_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 4-order ramp trajectory.
Definition: mbs_trajectories.c:218
mbs_ramp_3_order_3_piece
int mbs_ramp_3_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 3-order ramp trajectory.
Definition: mbs_trajectories.c:163
mbs_ramp_2_order_3_piece_from_acc_vel
int mbs_ramp_2_order_3_piece_from_acc_vel(double *q, double *qd, double *qdd, double tsim, double v12, double a01, double a23, double t0, double qmax)
Compute a 3-piece 2-order ramp trajectory.
Definition: mbs_trajectories.c:94
mbs_ramp_5_order
int mbs_ramp_5_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax)
Compute a 5-order ramp trajectory.
Definition: mbs_trajectories.c:62
mbs_div_signal
int mbs_div_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the division of 2 signals.
Definition: mbs_trajectories.c:329
mbs_add_signal
void mbs_add_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the sum of 2 signals.
Definition: mbs_trajectories.c:308
mbs_sub_signal
void mbs_sub_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the substraction of 2 signals.
Definition: mbs_trajectories.c:315
mbs_cosine_signal
void mbs_cosine_signal(double tsim, double ampl, double phi, double f, double off, double *q, double *qd, double *qdd)
Compute a cosine trajectory.
Definition: mbs_trajectories.c:293
sweep
void sweep(double tsim, double t0, double f0, double t1, double f1, double zmax, double *z, double *zd, double *zdd)
Compute a frequency sweep on a sine signal.
Definition: mbs_trajectories.c:272
mbs_trajectories.h
mbs_sigmoid
void mbs_sigmoid(double tsim, double lambda, double t0, double *q, double *qd, double *qdd)
Compute a sigmoid signal.
Definition: mbs_trajectories.c:300
mbs_get_ramp_time
int mbs_get_ramp_time(double *t1, double *t2, double *t3, double delta_q, double v12, double a01, double a23, double t0)
Compute the time related to a ramp trajectory.
Definition: mbs_trajectories.c:10
mbs_sine_signal
void mbs_sine_signal(double tsim, double ampl, double phi, double f, double off, double *q, double *qd, double *qdd)
Compute a sine trajectory.
Definition: mbs_trajectories.c:285
mbs_message.h
mbs_ramp_2_order_3_piece_from_acc_vel
int mbs_ramp_2_order_3_piece_from_acc_vel(double *q, double *qd, double *qdd, double tsim, double v12, double a01, double a23, double t0, double qmax)
Compute a 3-piece 2-order ramp trajectory.
Definition: mbs_trajectories.c:94
mbs_sub_signal
void mbs_sub_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the substraction of 2 signals.
Definition: mbs_trajectories.c:315
mbs_ramp_5_order
int mbs_ramp_5_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax)
Compute a 5-order ramp trajectory.
Definition: mbs_trajectories.c:62
mbs_mult_signal
void mbs_mult_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the multiplication of 2 signals.
Definition: mbs_trajectories.c:322
mbs_ramp_3_order_3_piece
int mbs_ramp_3_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 3-order ramp trajectory.
Definition: mbs_trajectories.c:163
mbs_get_ramp_time
int mbs_get_ramp_time(double *t1, double *t2, double *t3, double delta_q, double v12, double a01, double a23, double t0)
Compute the time related to a ramp trajectory.
Definition: mbs_trajectories.c:10
mbs_sigmoid
void mbs_sigmoid(double tsim, double lambda, double t0, double *q, double *qd, double *qdd)
Compute a sigmoid signal.
Definition: mbs_trajectories.c:300
mbs_cosine_signal
void mbs_cosine_signal(double tsim, double ampl, double phi, double f, double off, double *q, double *qd, double *qdd)
Compute a cosine trajectory.
Definition: mbs_trajectories.c:293
mbs_ramp_3_order
int mbs_ramp_3_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax)
Compute a 3-order ramp trajectory.
Definition: mbs_trajectories.c:31
mbs_add_signal
void mbs_add_signal(double q1, double qd1, double qdd1, double q2, double qd2, double qdd2, double *q3, double *qd3, double *qdd3)
Compute the sum of 2 signals.
Definition: mbs_trajectories.c:308
mbs_ramp_2_order_3_piece
int mbs_ramp_2_order_3_piece(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double t2, double t3, double qmax)
Compute a 3-piece 2-order ramp trajectory.
Definition: mbs_trajectories.c:112
mbs_sine_signal
void mbs_sine_signal(double tsim, double ampl, double phi, double f, double off, double *q, double *qd, double *qdd)
Compute a sine trajectory.
Definition: mbs_trajectories.c:285
mbs_ramp_3_order
int mbs_ramp_3_order(double *q, double *qd, double *qdd, double tsim, double t0, double t1, double qmax)
Compute a 3-order ramp trajectory.
Definition: mbs_trajectories.c:31