Skip to content

Commit 1822d1b

Browse files
committed
Revert "[mppi] constrain velocity & curvature in predict"
This reverts commit c4afab0.
1 parent 6a172a0 commit 1822d1b

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,6 @@ class MotionModel
125125
// state.cwz.col(i - 1) = state.wz.col(i);
126126
// }
127127

128-
// // also apply velocity limits constrains
129-
// state.vx.col(i) = state.vx.col(i)
130-
// .cwiseMax(control_constraints_.vx_min)
131-
// .cwiseMin(control_constraints_.vx_max);
132-
133-
// state.wz.col(i) = state.wz.col(i)
134-
// .cwiseMax(-control_constraints_.wz)
135-
// .cwiseMin(control_constraints_.wz);
136-
137-
138-
// also constrain wz base
139128
if (is_holo) {
140129
auto lower_bound_vy = (state.vy.col(i - 1) >
141130
0).select(state.vy.col(i - 1) + min_delta_vy,
@@ -148,17 +137,8 @@ class MotionModel
148137
.cwiseMax(lower_bound_vy)
149138
.cwiseMin(upper_bound_vy);
150139
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);
154-
155-
// state.vy.col(i) = state.cvy.col(i - 1)
156-
// .cwiseMax(-control_constraints_.vy)
157-
// .cwiseMin(control_constraints_.vy);
158140
}
159141
}
160-
161-
applyConstraints(state);
162142
}
163143

164144
/**
@@ -172,7 +152,6 @@ class MotionModel
172152
* @param control_sequence Control sequence to apply constraints to
173153
*/
174154
virtual void applyConstraints(models::ControlSequence & /*control_sequence*/) {}
175-
virtual void applyConstraints(models::State & /*state*/) {}
176155

177156
protected:
178157
float model_dt_{0.0};
@@ -217,14 +196,6 @@ class AckermannMotionModel : public MotionModel
217196
.min(wz_constrained);
218197
}
219198

220-
void applyConstraints(models::State & state) override
221-
{
222-
const auto wz_constrained = state.vx.abs() / min_turning_r_;
223-
state.wz = state.wz
224-
.max((-wz_constrained))
225-
.min(wz_constrained);
226-
}
227-
228199
/**
229200
* @brief Get minimum turning radius of ackermann drive
230201
* @return Minimum turning radius

0 commit comments

Comments
 (0)