# Trapezoidal Trajectory Planner

**URL:** <https://discourse.odriverobotics.com/t/trapezoidal-trajectory-planner/1104>\
**Category:** General\
**Created:** [September 8, 2018, 5:40pm UTC](https://discourse.odriverobotics.com/t/trapezoidal-trajectory-planner/1104 "2018-09-08T17:40:05Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Wetmelon](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/wetmelon/32/10_2.png) [@Wetmelon](https://discourse.odriverobotics.com/u/Wetmelon)\
**Post date:** [October 24, 2018, 3:24am UTC](https://discourse.odriverobotics.com/t/trapezoidal-trajectory-planner/1104/11 "2018-10-24T03:24:20Z")

</div>

Just so everyone is aware, the Trajectory Planner module for trapezoidal trajectories is now available in FW 4.6.

# Parameters

To use it, you have a whole new module and four new configuration values:

```auto
<odrv>.<axis>.trap_traj.config.vel_limit = <Float>
<odrv>.<axis>.trap_traj.config.accel_limit = <Float>
<odrv>.<axis>.trap_traj.config.decel_limit = <Float>
<odrv>.<axis>.trap_traj.config.A_per_css = <Float>

```

`vel_limit` is the maximum planned trajectory speed. This sets your coasting speed.  
`accel_limit` is the maximum acceleration in counts / sec^2  
`decel_limit` is the maximum deceleration in counts / sec^2  
`A_per_css` is a value which correlates acceleration (in counts / sec^2) and motor current. It is 0 by default, and is not strictly necessary, but can improve response of your system if correctly tuned. Keep in mind this will need to change with the load / mass of your system.

All values should be strictly positive (\>= 0).

Keep in mind that you must still set your safety limits as before. I recommend you set these a little higher ( \> 10%) than the planner values, to give the PID controller enough control authority.

```auto
<odrv>.<axis>.motor.config.current_lim = <Float>
<odrv>.<axis>.controller.config.vel_limit = <Float>

```

# Functions

Use the `move_to_pos` function to move to an absolute position:

```auto
<odrv>.<axis>.controller.move_to_pos(<Float>)

```

`move_incremental` is not yet implemented.  
`ramp_to_vel` is not yet implemented.

---

_[View the full topic](https://discourse.odriverobotics.com/t/trapezoidal-trajectory-planner/1104)._
