Skip to content

Commit

Permalink
change size of reaction angle
Browse files Browse the repository at this point in the history
  • Loading branch information
baumanta authored and RomanBapst committed Aug 7, 2019
1 parent b26d3ac commit 150b5df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/CollisionPrevention/CollisionPrevention.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ void CollisionPrevention::_calculateConstrainedSetpoint(Vector2f &setpoint,
float vel_setpoint_bin = setpoint.dot(bin_direction);

//limit the velocity
//do not react to obstacles more than 70 degree off the given stick input
if (vel_setpoint_bin > 0.94f * setpoint_length && vel_max_bin >= 0) {
//do not react to obstacles more than 45 degree off the given stick input cos(45deg) = 0.71
if (vel_setpoint_bin > 0.71f * setpoint_length && vel_max_bin >= 0) {
vel_max = math::min(vel_max, vel_max_bin);
}
}
Expand Down

0 comments on commit 150b5df

Please sign in to comment.