Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbio/drivebase: Reverse turn rate for negative drive speed. #212

Closed
wants to merge 1 commit into from

Conversation

laurensvalk
Copy link
Member

Changed steering direction with DriveBase.drive() when reversing. Now, a positive angle or turn rate means the robot travels along a circle to its right. The speed or radius can be negated to travel in reverse along that same circle.

See pybricks/support#1191

@coveralls
Copy link

Coverage Status

coverage: 56.071% (-0.002%) from 56.073%
when pulling 74d6b2b on drivebase-circle
into bdf20a8 on master.

@laurensvalk
Copy link
Member Author

@JDwyer009, would you like to give this a try?

To try it, download one of the firmware links in the post above.

In Pybricks, begin installing the firmware as usual. Instead of choosing a hub on the first dialog, pick "Advanced" and pick the file you just downloaded.

Proceed normally and try out the updated drive command 😄

Thanks!

@dlech
Copy link
Member

dlech commented Nov 15, 2023

I feel like this would make things a bit weird when the drive speed is zero. Since zero is neither positive nor negative, it seems arbitrary that when drive speed is zero that the positive rules should apply. And the fact that the requested turn rate would no longer match the turn rate return by state() only when speed is negative also makes it feel weird.

So I still think it makes more sense to leave drive() as it is (and introduce a new method if we want something else).

@laurensvalk
Copy link
Member Author

For what it's worth, this variant doesn't have special treatment or siding it one way for the zero case.

@laurensvalk
Copy link
Member Author

So I still think it makes more sense to leave drive() as it is (and introduce a new method if we want something else).

Agreed, so we should close this. Further discussion for other methods is in pybricks/support#1414

@laurensvalk laurensvalk deleted the drivebase-circle branch September 16, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants