Module liba.trajbell
bell-shaped velocity trajectory
Functions
new () | constructor for bell-shaped velocity trajectory |
gen (ctx, jm, am, vm, p0, p1[, v0[, v1]]) | generate for bell-shaped velocity trajectory |
pos (ctx, x) | calculate position for bell-shaped velocity trajectory |
vel (ctx, x) | calculate velocity for bell-shaped velocity trajectory |
acc (ctx, x) | calculate acceleration for bell-shaped velocity trajectory |
jer (ctx, x) | calculate jerk for bell-shaped velocity trajectory |
Functions
- new ()
-
constructor for bell-shaped velocity trajectory
Returns:
-
a.trajbell
bell-shaped velocity trajectory userdata
- gen (ctx, jm, am, vm, p0, p1[, v0[, v1]])
-
generate for bell-shaped velocity trajectory
Parameters:
- ctx a.trajbell bell-shaped velocity trajectory userdata
- jm number defines the maximum jerk during system operation
- am number defines the maximum acceleration during system operation
- vm number defines the maximum velocity during system operation
- p0 number defines the initial position
- p1 number defines the final position
- v0 number defines the initial velocity (optional)
- v1 number defines the final velocity (optional)
Returns:
-
number
total duration
- pos (ctx, x)
-
calculate position for bell-shaped velocity trajectory
Parameters:
- ctx a.trajbell bell-shaped velocity trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
position output
- vel (ctx, x)
-
calculate velocity for bell-shaped velocity trajectory
Parameters:
- ctx a.trajbell bell-shaped velocity trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
velocity output
- acc (ctx, x)
-
calculate acceleration for bell-shaped velocity trajectory
Parameters:
- ctx a.trajbell bell-shaped velocity trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
acceleration output
- jer (ctx, x)
-
calculate jerk for bell-shaped velocity trajectory
Parameters:
- ctx a.trajbell bell-shaped velocity trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
jerk output