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

[Doc] Document positive_direction for DriveBase #992

Closed
laurensvalk opened this issue Mar 17, 2023 · 6 comments
Closed

[Doc] Document positive_direction for DriveBase #992

laurensvalk opened this issue Mar 17, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation topic: motors Issues involving motors

Comments

@laurensvalk
Copy link
Member

Describe the issue
Need to document this new feature: pybricks/pybricks-micropython@6e2f703

@laurensvalk laurensvalk added documentation Improvements or additions to documentation topic: motors Issues involving motors labels Mar 17, 2023
@laurensvalk
Copy link
Member Author

While we do that, also document deceleration setting consistent with single motors: pybricks/pybricks-micropython@77f3ebd

@laurensvalk laurensvalk self-assigned this Mar 17, 2023
laurensvalk added a commit to pybricks/pybricks-api that referenced this issue Mar 20, 2023
@laurensvalk
Copy link
Member Author

laurensvalk commented Mar 20, 2023

Auto-close did not work, so close manually.

@laurensvalk
Copy link
Member Author

laurensvalk commented Apr 15, 2023

Since this isn't released yet, I think it's worth giving this a closer look.

Based on user feedback on gyros, I'm starting to think it could be worth having a separate GyroDriveBase class instead of adding the use_gyro option to the DriveBase.

  • This makes it a more obvious separation between two rather different behaviors.
  • Users could switch between the two to see these differences, instead of messing with setup arguments.
  • We can also transparently take care of the positive_direction this way.
  • This whole class can be disabled on platforms without a gyro, instead of raising exceptions for certain combinations of arguments
  • And, well, the pybricks.robotics module is a bit empty after all.

Internally, all of the code is still shared, so this is not a increase in code size. On Move Hub, it should even go down a bit since we'd omit the positive_direction and use_gyro arguments this way.

@laurensvalk
Copy link
Member Author

And separately from this, maybe heading() does need to be positive clockwise, as well. This seems to be more common than I though in navigation systems, including compasses.

There will still be the rotation() method to get the rotations around each axis matching the right-hand rule common in engineering (counterclockwise-is-positive)`.

@laurensvalk
Copy link
Member Author

And separately from this, maybe heading() does need to be positive clockwise, as well. This seems to be more common than I though in navigation systems, including compasses.

Ran a poll:

image

@laurensvalk
Copy link
Member Author

Based on user feedback on gyros, I'm starting to think it could be worth having a separate GyroDriveBase class instead of adding the use_gyro option to the DriveBase.

Done, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation topic: motors Issues involving motors
Projects
None yet
Development

No branches or pull requests

1 participant