Skip to content

Commit 05a54b9

Browse files
authored
[trajoptlib] Remove anti-tunneling constraint (#1109)
1 parent db2aa31 commit 05a54b9

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

trajoptlib/src/DifferentialTrajectoryGenerator.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,8 @@ DifferentialTrajectoryGenerator::DifferentialTrajectoryGenerator(
132132
Fr.emplace_back(problem.DecisionVariable());
133133
}
134134

135-
double minWidth = path.drivetrain.trackwidth;
136-
137135
for (size_t sgmtIndex = 0; sgmtIndex < sgmtCnt; ++sgmtIndex) {
138136
dts.emplace_back(problem.DecisionVariable());
139-
140-
// Prevent drivetrain tunneling through keep-out regions
141-
problem.SubjectTo(dts.at(sgmtIndex) * path.drivetrain.wheelRadius *
142-
path.drivetrain.wheelMaxAngularVelocity <=
143-
minWidth);
144137
}
145138

146139
// Minimize total time

trajoptlib/src/SwerveTrajectoryGenerator.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,8 @@ SwerveTrajectoryGenerator::SwerveTrajectoryGenerator(
101101
}
102102
}
103103

104-
double minWidth = INFINITY;
105-
for (size_t i = 0; i < path.drivetrain.modules.size(); ++i) {
106-
auto mod_a = path.drivetrain.modules.at(i);
107-
size_t mod_b_idx = i == 0 ? path.drivetrain.modules.size() - 1 : i - 1;
108-
auto mod_b = path.drivetrain.modules.at(mod_b_idx);
109-
minWidth = std::min(
110-
minWidth, std::hypot(mod_a.X() - mod_b.X(), mod_a.Y() - mod_b.Y()));
111-
}
112-
113104
for (size_t sgmtIndex = 0; sgmtIndex < sgmtCnt; ++sgmtIndex) {
114105
dts.emplace_back(problem.DecisionVariable());
115-
116-
// Prevent drivetrain tunneling through keep-out regions
117-
problem.SubjectTo(dts.at(sgmtIndex) * path.drivetrain.wheelRadius *
118-
path.drivetrain.wheelMaxAngularVelocity <=
119-
minWidth);
120106
}
121107

122108
// Minimize total time

0 commit comments

Comments
 (0)