robotpy / robotpy-wpilib

Moved to https://github.com/robotpy/mostrobotpy
https://robotpy.github.io
Other
170 stars 60 forks source link

Fix Mechanism2D #695

Closed virtuald closed 2 years ago

virtuald commented 2 years ago

It was changed a lot in 2022, and it's going to be tricky to wrap. Will revisit after the first release.

PeterJohnson commented 2 years ago

You might want to do pure Python for it if it's tricky to wrap, as it's really just convenience wrappers around sticking stuff into NT.

virtuald commented 2 years ago

Looked at it tonight, I've got a solution for it. Didn't understand the intent of the API originally.

In particular, it would have been really difficult to allow users to create their own custom MechanismObject2d objects without some kind of append function that would accept an already constructed object (or we would need to constrain the arguments passed to custom object constructors). However, I see that it doesn't really make sense to make your own custom objects with the current API, so that is no longer a problem.