Skip to content

Commit

Permalink
Fixed maxW selection in createDynamicWindow by changing max() to min(…
Browse files Browse the repository at this point in the history
…) - possible angular velocities were tilted towards positive values
  • Loading branch information
ihazucha committed Mar 30, 2021
1 parent 980bf63 commit d6d86cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dwa.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ createDynamicWindow(Velocity velocity, Config config, DynamicWindow **dynamicWin
float minW =
max(-config.maxYawrate, velocity.angularVelocity - config.maxdYawrate * config.dt);
float maxW =
max(config.maxYawrate, velocity.angularVelocity + config.maxdYawrate * config.dt);
min(config.maxYawrate, velocity.angularVelocity + config.maxdYawrate * config.dt);

int nPossibleV = (maxV - minV) / config.velocityResolution;
int nPossibleW = (maxW - minW) / config.yawrateResolution;
Expand Down

0 comments on commit d6d86cf

Please sign in to comment.