Trapezoidal Trajectory Planner

I am using trap_traj input mode for my setup and had a question about the motor speed. Right now I can’t seem to get the motor to move faster than it’s current movement. I’ve increased accel_lim, decel_lim, and vel_lim by huge values (just to see if it would make the motor move any little bit faster) under trap_traj configs, but it moves at the same speed. I’ve also tried increasing current_lim and still no luck. What do you guys think could be limiting it? Thanks!

Side note: I’m using 0 for my inertia value (if this makes any differnce) because I havent been able to tune it that well. With it being at 0, my motor resistance to external forces works perfectly and I have no issues with that, other than the speed being a little lower than I’d like.

controller.config.vel_limit still applies in trapezoidal planner mode. And of course your bus voltage and Kv give a theoretical max.

ok, I think I got it, thanks guys! On the same topic, my motor’s torque limit is 8 Nm, so should I change torque_lim = inf to 8? What exactly does this parameter refer to by being infinity default? And what would happen if I lowered it to 8? Thanks!

It just ends up clamping the current command. Torque = Current * torque_constant.

1 Like

That makes sense! So what exactly happens to torque when torque_lim is the default Val of inf? Or is it a must that we change it to the torque limit of my motor on its spec sheet?

It just gets clamped by current_lim instead :slight_smile:

Torque is a function of the load. So if you ask for 1 revolution per second, you could be at a very high torque level or a very low one, depending on load.

1 Like

What other parameters affect trap_traj? Specifically…

  • pos_gain
  • vel_gain
  • vel_integrator_gain
  • vel_ramp_rate