Skip to content

[Nav] Possible issue when calculating the duration of fluctiation #1

Description

@MrKeith99

Thank you for your amazing work sharing this simulator with the world!

I was looking around the Navigation plugin for Gazebo simulator and I have noticed that there might be an error when calculating the duration for the control fluctuation.

The assertion assert(std::abs(freq > EPS)) checks that the absolute value of the boolean expression freq > EPS is true.
However, as written, it's taking the absolute value of a boolean result, which will always be either 0 or 1.

I think that it should likely be assert(std::abs(freq) > EPS) to check that the absolute value of the frequency itself is greater than the epsilon threshold.

Is there any reason, why the std::abs is applied to both freq > EPS?

Thank you in advance for your replay and your valuable time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions