Skip to content

Fix turning tolerance on escaping cone and recovering #38

Description

@merose

Currently the turning code depends on an angle tolerance. This is problematic because the rate at which we get robot state updates is only about 4Hz, and we may pass through the angle tolerance between updates. Instead, we should turn until the total turning exceeds a desired value. (Could exceed the value positively, for counter-clockwise turning, or negatively, for clockwise turning.)

This change will eliminate the need for an angle tolerance, so long as the desired turning is far enough away from 360 deg (= 0 deg) that we don't wrap around. Testing on 04-20 shows that an angle tolerance of +/- 30 deg works OK with the current code, so desired turning anywhere from 0-330 deg should work OK, and we'll probably never use more than 180 deg of desired turning.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions