Skip to content

Commit

Permalink
Add static polygon check before simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
BriceRenaudeau committed May 21, 2024
1 parent 76f160c commit 2cef9a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nav2_collision_monitor/src/polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ double Polygon::getCollisionTime(
Velocity vel = velocity;

// Array of points transformed to the frame concerned with pose on each simulation step
std::vector<Point> points_transformed;
std::vector<Point> points_transformed = collision_points;

// Check static polygon
if (getPointsInside(points_transformed) >= min_points_) {
return 0.0;
}

// Robot movement simulation
for (double time = 0.0; time <= time_before_collision_; time += simulation_time_step_) {
Expand Down

0 comments on commit 2cef9a5

Please sign in to comment.