@@ -89,10 +89,10 @@ class MotionModel
8989 0 ).select (state.vx .col (i - 1 ) + max_delta_vx,
9090 state.vx .col (i - 1 ) - min_delta_vx);
9191
92- // state.cvx.col(i - 1) = state.cvx.col(i - 1)
93- // .cwiseMax(lower_bound_vx)
94- // .cwiseMin(upper_bound_vx);
95- // state.vx.col(i) = state.cvx.col(i - 1);
92+ state.cvx .col (i - 1 ) = state.cvx .col (i - 1 )
93+ .cwiseMax (lower_bound_vx)
94+ .cwiseMin (upper_bound_vx);
95+ state.vx .col (i) = state.cvx .col (i - 1 );
9696
9797 // state.u(i) = state.cu(i-1)
9898 // => we start from current robot speed (state.u(0)) and then apply u_virt (state.cu(i-1))
@@ -104,18 +104,18 @@ class MotionModel
104104 // u_app(0) should be limited on acceleration relative to either feedback (state.u(0)) as done now
105105 // TODO 3 or ideally based on last published command
106106
107- state.vx .col (i) = state.cvx .col (i - 1 )
108- .cwiseMax (lower_bound_vx)
109- .cwiseMin (upper_bound_vx);
110-
111- // state.cwz.col(i - 1) = state.cwz.col(i - 1)
112- // .cwiseMax(state.wz.col(i - 1) - max_delta_wz)
113- // .cwiseMin(state.wz.col(i - 1) + max_delta_wz);
114- // state.wz.col(i) = state.cwz.col(i - 1);
107+ // state.vx.col(i) = state.cvx.col(i - 1)
108+ // .cwiseMax(lower_bound_vx)
109+ // .cwiseMin(upper_bound_vx);
115110
116- state.wz .col (i) = state.cwz .col (i - 1 )
111+ state.cwz .col (i - 1 ) = state.cwz .col (i - 1 )
117112 .cwiseMax (state.wz .col (i - 1 ) - max_delta_wz)
118113 .cwiseMin (state.wz .col (i - 1 ) + max_delta_wz);
114+ state.wz .col (i) = state.cwz .col (i - 1 );
115+
116+ // state.wz.col(i) = state.cwz.col(i - 1)
117+ // .cwiseMax(state.wz.col(i - 1) - max_delta_wz)
118+ // .cwiseMin(state.wz.col(i - 1) + max_delta_wz);
119119
120120 // constrain u_virt 0 & 1 to make sure accelerations are limited at the first step (state.vx(0) is from feedback)
121121 // also constrain u_virt_1 as this is published as command
@@ -144,9 +144,13 @@ class MotionModel
144144 0 ).select (state.vy .col (i - 1 ) + max_delta_vy,
145145 state.vy .col (i - 1 ) - min_delta_vy);
146146
147- state.vy .col (i) = state.cvy .col (i - 1 )
147+ state.cvy .col (i - 1 ) = state.cvy .col (i - 1 )
148148 .cwiseMax (lower_bound_vy)
149149 .cwiseMin (upper_bound_vy);
150+ state.vy .col (i) = state.cvy .col (i - 1 );
151+ // state.vy.col(i) = state.cvy.col(i - 1)
152+ // .cwiseMax(lower_bound_vy)
153+ // .cwiseMin(upper_bound_vy);
150154
151155 // state.vy.col(i) = state.cvy.col(i - 1)
152156 // .cwiseMax(-control_constraints_.vy)
0 commit comments