2 bell-shaped velocity trajectory
6 #ifndef LUA_LIBA_TRAJBELL_H
7 #define LUA_LIBA_TRAJBELL_H
12 bell-shaped velocity trajectory
13 @field t total duration
14 @field tv constant velocity phase
15 @field ta acceleration phase
16 @field td deceleration phase
17 @field taj time-interval in which the jerk is constant (j max or j min ) during the acceleration phase
18 @field tdj time-interval in which the jerk is constant (j max or j min ) during the deceleration phase
19 @field p0 initial position
20 @field p1 final position
21 @field v0 initial velocity
22 @field v1 final velocity
23 @field vm maximum velocity
24 @field jm maximum jerk
25 @field am maximum acceleration
26 @field dm maximum deceleration
29 #if defined(__cplusplus)
31 #endif /* __cplusplus */
34 constructor for bell-shaped velocity trajectory
35 @treturn a.trajbell bell-shaped velocity trajectory userdata
38 int liba_trajbell_new(lua_State
*L
);
41 generate for bell-shaped velocity trajectory
42 @tparam number jm defines the maximum jerk during system operation
43 @tparam number am defines the maximum acceleration during system operation
44 @tparam number vm defines the maximum velocity during system operation
45 @tparam number p0 defines the initial position
46 @tparam number p1 defines the final position
47 @tparam[opt] number v0 defines the initial velocity
48 @tparam[opt] number v1 defines the final velocity
49 @treturn number total duration
52 int liba_trajbell_gen(lua_State
*L
);
55 calculate position for bell-shaped velocity trajectory
56 @tparam number x difference between current time and initial time
57 @treturn number position output
60 int liba_trajbell_pos(lua_State
*L
);
63 calculate velocity for bell-shaped velocity trajectory
64 @tparam number x difference between current time and initial time
65 @treturn number velocity output
68 int liba_trajbell_vel(lua_State
*L
);
71 calculate acceleration for bell-shaped velocity trajectory
72 @tparam number x difference between current time and initial time
73 @treturn number acceleration output
76 int liba_trajbell_acc(lua_State
*L
);
79 calculate jerk for bell-shaped velocity trajectory
80 @tparam number x difference between current time and initial time
81 @treturn number jerk output
84 int liba_trajbell_jer(lua_State
*L
);
86 #if defined(__cplusplus)
88 #endif /* __cplusplus */
90 #endif /* trajbell.h */