This repository was archived by the owner on Oct 8, 2024. It is now read-only.
Update the simulated robot API to (mostly) match sr.robot3 - #350
Merged
Conversation
This actually changed back in 21ba150, but this check was missed.
Not because this does anything useful, but rather because adding this is easy for compatbility.
The other change here is the name of the 'note' -> 'pitch' argument.
We only expose those which actually work in the simulator, though this gets the rest of them present internally should we want them.
PeterJCLaw
force-pushed
the
update-api
branch
from
October 17, 2022 20:49
dc4e3c5 to
a11585c
Compare
This doesn't update the markers, which will be much more involved to update.
PeterJCLaw
force-pushed
the
update-api
branch
from
October 17, 2022 20:52
a11585c to
9b1f457
Compare
Now we're trying a bit harder to match the sr.robot3 API this makes a bit more sense to be private. It also makes it a bit less likely that competitors will find/use it.
PeterJCLaw
force-pushed
the
update-api
branch
from
October 17, 2022 21:08
9b1f457 to
725efd4
Compare
This matches sr.robot3.
PeterJCLaw
force-pushed
the
update-api
branch
from
October 17, 2022 21:25
fe28d65 to
ee314ea
Compare
PeterJCLaw
marked this pull request as ready for review
October 17, 2022 21:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the simulated
sr.robot3API to mostly match the one in the published package of the same name.There are some differences here, mostly driven by what the simulator doesn't (usually cannot) support. In general I've gone with completely omitting members which don't work in the simulator, though in a few places I've implemented dummy versions that record the nature of the simulator.
The split here is approximately between things that it seems "safe" to emulate as a no-op versus those which are likely to change the behaviour of the robot substantially. Many of these are fuzzy, so we might want to revisit the decisions, but it probably makes sense to get these changes live first and iterate.
The changes here were determined through a mixture of code inspection of the
sr.robot3source and comparison against the docs. The latter was a mix of manual comparison and using https://gist.github.com/PeterJCLaw/318d392c46daff36577df5e24866d5b0 to gather sample code to runmypyagainst.Not included here are:
libkokiand b) a bit of a mess right now (Make the Spherical coordinates useful RealOrangeOne/zoloto#302, Improve coordinate type names RealOrangeOne/zoloto#304). I plan to also pick this up as a separate PR.If we have any example robot code which works for
sr.robot3it would be handy to try it against this PR's simulator and see what works/what doesn't.Fixes #199