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

[BUG]: Missing functions with DCMotorSim #104

Open
daltzctr opened this issue Oct 11, 2024 · 1 comment
Open

[BUG]: Missing functions with DCMotorSim #104

daltzctr opened this issue Oct 11, 2024 · 1 comment
Labels
enhancement New feature or request package: wpimath subprojects/robotpy-wpimath

Comments

@daltzctr
Copy link

Problem description

WPILib has various getPosition and getVelocity in specified units: https://github.wpilib.org/allwpilib/docs/development/java/edu/wpi/first/wpilibj/simulation/DCMotorSim.html#getAngularVelocity()

but RobotPy is missing getAngularPositionRotations, getAngularVelocityRotations, and maybe other functions: https://robotpy.readthedocs.io/projects/robotpy/en/stable/wpilib.simulation/DCMotorSim.html#wpilib.simulation.DCMotorSim.getAngularVelocity

Operating System

Windows, MacOS, Linux, RoboRIO, Raspbian

Installed Python Packages

No response

Reproducible example code

No response

@virtuald
Copy link
Member

virtuald commented Oct 11, 2024

Those functions do not exist in C++: https://github.com/wpilibsuite/allwpilib/blob/28cb7cf757e8dce89aab6d8181203b665afca62a/wpilibc/src/main/native/include/frc/simulation/DCMotorSim.h#L60

My guess is it's just a unit conversion, so C++ doesn't need them? If you can provide which units you need we can add the corresponding functions.

Edit: I see, Java has the units specified. We can probably add those extra functions too.

@virtuald virtuald added enhancement New feature or request package: wpimath subprojects/robotpy-wpimath labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package: wpimath subprojects/robotpy-wpimath
Projects
Status: No status
Development

No branches or pull requests

2 participants