Hello, and thank you for making this amazing work available on GitHub.
I have a question regarding to the clamping of control inputs in the #mppi.py and also #barebone_mppi_numba.ipynb notebook
I understand from the paper of MPPI usually they clamp the control sequence before it passes through the dynamics, which is in the mppi.py code file, it is inside the #rollout_numba function
v_noisy = max(vrange_d[0], min(vrange_d[1], v_nom))
w_noisy = max(wrange_d[0], min(wrange_d[1], w_nom))
My confusion is why there is another clamping function again after we weight the control sequence inside of the #update_useq_numba function?,
# Blocks crop the control together
tgap = int(math.ceil(timesteps / num_threads))
starti = min(tid*tgap, timesteps)
endi = min(starti+tgap, timesteps)
for ti in range(starti, endi):
u_cur_d[ti, 0] = max(vrange_d[0], min(vrange_d[1], u_cur_d[ti, 0]))
u_cur_d[ti, 1] = max(wrange_d[0], min(wrange_d[1], u_cur_d[ti, 1]))
Isn't it enough to just clamp it inside the rollout function?, I am looking forward to hearing from you Thank you