Skip to content

Commit 9d85475

Browse files
committed
fixed a minor bug
1 parent 99cd96d commit 9d85475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swarm-playground/main_ws/src/planner/traj_opt/src/poly_traj_optimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace ego_planner
143143
for (int i = 0; i < durations.size(); ++i)
144144
t_seg_start(i + 1) = t_seg_start(i) + durations(i);
145145
const double DURATION = durations.sum();
146-
double t = 0.0, t_step = RES / max_vel_;
146+
double t = 0.0, t_step = min(RES / max_vel_, durations.minCoeff() / max(cps_num_prePiece_, 1) / 1.5);
147147
Eigen::Vector3d pt_last = traj.getPos(0.0);
148148
// pts_check[0].push_back(pt_last);
149149
int id_cps_curr = 0, id_piece_curr = 0;

0 commit comments

Comments
 (0)