There was an error while loading. Please reload this page.
1 parent f5bc281 commit d48ff16Copy full SHA for d48ff16
nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp
@@ -97,6 +97,14 @@ class MotionModel
97
.cwiseMax(state.wz.col(i - 1) - max_delta_wz)
98
.cwiseMin(state.wz.col(i - 1) + max_delta_wz);
99
100
+ // constrain u_virt 0 & 1 to make sure accelerations are limited at the first step (state.vx(0) is from feedback)
101
+ // also constrain u_virt_1 as this is published as command
102
+ if (i <= 2)
103
+ {
104
+ state.cvx.col(i - 1) = state.vx.col(i);
105
+ state.cwz.col(i - 1) = state.wz.col(i);
106
+ }
107
+
108
if (is_holo) {
109
auto lower_bound_vy = (state.vy.col(i - 1) >
110
0).select(state.vy.col(i - 1) + min_delta_vy,
0 commit comments