Skip to content

Commit 3b91dcc

Browse files
corotcorot
corot
authored andcommitted
Fix rst-tu-dortmund#359: Remove penalty_epsilon from max_vel_x error calculation
1 parent 839db5c commit 3b91dcc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/teb_local_planner/g2o_types/edge_velocity.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,10 @@ class EdgeVelocityHolonomic : public BaseTebMultiEdge<3, double>
262262
double max_vel_x = std::min(max_vel_trans_remaining_x, cfg_->robot.max_vel_x);
263263
double max_vel_x_backwards = std::min(max_vel_trans_remaining_x, cfg_->robot.max_vel_x_backwards);
264264

265-
_error[0] = penaltyBoundToInterval(vx, -max_vel_x_backwards, max_vel_x, cfg_->optim.penalty_epsilon);
266-
_error[1] = penaltyBoundToInterval(vy, max_vel_y, 0.0); // we do not apply the penalty epsilon here, since the velocity could be close to zero
265+
// we do not apply the penalty epsilon for linear velocities on
266+
// holonomic robots, since either vx or yy could be close to zero
267+
_error[0] = penaltyBoundToInterval(vx, -max_vel_x_backwards, max_vel_x, 0.0);
268+
_error[1] = penaltyBoundToInterval(vy, max_vel_y, 0.0);
267269
_error[2] = penaltyBoundToInterval(omega, cfg_->robot.max_vel_theta,cfg_->optim.penalty_epsilon);
268270

269271
ROS_ASSERT_MSG(std::isfinite(_error[0]) && std::isfinite(_error[1]) && std::isfinite(_error[2]),

0 commit comments

Comments
 (0)